| OLD | NEW |
| 1 import os, shutil, glob, logging | 1 import os, shutil, glob, logging |
| 2 from autotest_lib.client.bin import test, utils | 2 from autotest_lib.client.bin import test, utils |
| 3 from autotest_lib.client.common_lib import error | 3 from autotest_lib.client.common_lib import error |
| 4 | 4 |
| 5 class cerberus(test.test): | 5 class cerberus(test.test): |
| 6 """ | 6 """ |
| 7 This autotest module runs CTCS2 (Cerberus Test Control System 2), which | 7 This autotest module runs CTCS2 (Cerberus Test Control System 2), which |
| 8 intents to revive the original CTCS project. | 8 intents to revive the original CTCS project. |
| 9 | 9 |
| 10 The original test suite (Cerberus Test Control System) was developed for | 10 The original test suite (Cerberus Test Control System) was developed for |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 os.chdir(self.srcdir) | 46 os.chdir(self.srcdir) |
| 47 # Apply patch to fix build problems on newer distros (absence of | 47 # Apply patch to fix build problems on newer distros (absence of |
| 48 # asm/page.h include, and platform(32/64bit) related issues. | 48 # asm/page.h include, and platform(32/64bit) related issues. |
| 49 p1 = 'patch -p1 < ../0001-Fix-CTCS2-Build.patch' | 49 p1 = 'patch -p1 < ../0001-Fix-CTCS2-Build.patch' |
| 50 utils.system(p1) | 50 utils.system(p1) |
| 51 | 51 |
| 52 if utils.get_cpu_arch() == 'x86_64': | 52 if utils.get_cpu_arch() == 'x86_64': |
| 53 p2 = 'patch -p1 < ../0002-Fix-CTCS2-build-in-64-bit-boxes.patch' | 53 p2 = 'patch -p1 < ../0002-Fix-CTCS2-build-in-64-bit-boxes.patch' |
| 54 utils.system(p2) | 54 utils.system(p2) |
| 55 | 55 |
| 56 utils.system('make') | 56 utils.make() |
| 57 | 57 |
| 58 # Here we define the cerberus suite control file that will be used. | 58 # Here we define the cerberus suite control file that will be used. |
| 59 # It will be kept on the debug directory for further analysis. | 59 # It will be kept on the debug directory for further analysis. |
| 60 self.tcf_path = os.path.join(self.debugdir, 'autotest.tcf') | 60 self.tcf_path = os.path.join(self.debugdir, 'autotest.tcf') |
| 61 | 61 |
| 62 if not tcf_contents: | 62 if not tcf_contents: |
| 63 logging.info('Generating cerberus control file') | 63 logging.info('Generating cerberus control file') |
| 64 # Note about the control file generation command - we are creating | 64 # Note about the control file generation command - we are creating |
| 65 # a control file with the default tests, except for the kernel | 65 # a control file with the default tests, except for the kernel |
| 66 # compilation test (flag -k). | 66 # compilation test (flag -k). |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 | 101 |
| 102 def cleanup(self): | 102 def cleanup(self): |
| 103 """ | 103 """ |
| 104 Cleans up source directory and raises on failure. | 104 Cleans up source directory and raises on failure. |
| 105 """ | 105 """ |
| 106 if os.path.isdir(self.srcdir): | 106 if os.path.isdir(self.srcdir): |
| 107 shutil.rmtree(self.srcdir) | 107 shutil.rmtree(self.srcdir) |
| 108 if self.nfail != 0: | 108 if self.nfail != 0: |
| 109 raise error.TestFail('Cerberus test suite failed.') | 109 raise error.TestFail('Cerberus test suite failed.') |
| OLD | NEW |