OLD | NEW |
1 """The main job wrapper | 1 """The main job wrapper |
2 | 2 |
3 This is the core infrastructure. | 3 This is the core infrastructure. |
4 | 4 |
5 Copyright Andy Whitcroft, Martin J. Bligh 2006 | 5 Copyright Andy Whitcroft, Martin J. Bligh 2006 |
6 """ | 6 """ |
7 | 7 |
8 import copy, os, platform, re, shutil, sys, time, traceback, types, glob | 8 import copy, os, platform, re, shutil, sys, time, traceback, types, glob |
9 import logging, getpass, errno, weakref | 9 import logging, getpass, errno, weakref |
10 import cPickle as pickle | 10 import cPickle as pickle |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 self.install_pkg(dep, 'dep', dep_dir) | 496 self.install_pkg(dep, 'dep', dep_dir) |
497 except error.PackageInstallError: | 497 except error.PackageInstallError: |
498 # see if the dep is there locally | 498 # see if the dep is there locally |
499 pass | 499 pass |
500 | 500 |
501 # dep_dir might not exist if it is not fetched from the repos | 501 # dep_dir might not exist if it is not fetched from the repos |
502 if not os.path.exists(dep_dir): | 502 if not os.path.exists(dep_dir): |
503 raise error.TestError("Dependency %s does not exist" % dep) | 503 raise error.TestError("Dependency %s does not exist" % dep) |
504 | 504 |
505 os.chdir(dep_dir) | 505 os.chdir(dep_dir) |
506 utils.system('./' + dep + '.py') | 506 if execfile('%s.py' % dep, {}) is None: |
| 507 logging.info('Dependency %s successfuly built', dep) |
507 | 508 |
508 | 509 |
509 def _runtest(self, url, tag, args, dargs): | 510 def _runtest(self, url, tag, args, dargs): |
510 try: | 511 try: |
511 l = lambda : test.runtest(self, url, tag, args, dargs) | 512 l = lambda : test.runtest(self, url, tag, args, dargs) |
512 pid = parallel.fork_start(self.resultdir, l) | 513 pid = parallel.fork_start(self.resultdir, l) |
513 parallel.fork_waitfor(self.resultdir, pid) | 514 parallel.fork_waitfor(self.resultdir, pid) |
514 except error.TestBaseException: | 515 except error.TestBaseException: |
515 # These are already classified with an error type (exit_status) | 516 # These are already classified with an error type (exit_status) |
516 raise | 517 raise |
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1209 assert myjob._record_indent == 0 | 1210 assert myjob._record_indent == 0 |
1210 | 1211 |
1211 myjob.complete(0) | 1212 myjob.complete(0) |
1212 | 1213 |
1213 | 1214 |
1214 site_job = utils.import_site_class( | 1215 site_job = utils.import_site_class( |
1215 __file__, "autotest_lib.client.bin.site_job", "site_job", base_client_job) | 1216 __file__, "autotest_lib.client.bin.site_job", "site_job", base_client_job) |
1216 | 1217 |
1217 class job(site_job): | 1218 class job(site_job): |
1218 pass | 1219 pass |
OLD | NEW |