diff options
| -rw-r--r-- | meta/lib/oeqa/runtime/cases/buildcpio.py | 9 | ||||
| -rw-r--r-- | meta/lib/oeqa/runtime/cases/buildgalculator.py | 9 | ||||
| -rw-r--r-- | meta/lib/oeqa/runtime/cases/buildlzip.py | 12 | ||||
| -rw-r--r-- | meta/lib/oeqa/runtime/cases/gcc.py | 19 | ||||
| -rw-r--r-- | meta/lib/oeqa/runtime/cases/kernelmodule.py | 8 | ||||
| -rw-r--r-- | meta/lib/oeqa/runtime/cases/stap.py | 4 |
6 files changed, 31 insertions, 30 deletions
diff --git a/meta/lib/oeqa/runtime/cases/buildcpio.py b/meta/lib/oeqa/runtime/cases/buildcpio.py index 79b22d04dd..a61d1e0304 100644 --- a/meta/lib/oeqa/runtime/cases/buildcpio.py +++ b/meta/lib/oeqa/runtime/cases/buildcpio.py | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | from oeqa.runtime.case import OERuntimeTestCase | 1 | from oeqa.runtime.case import OERuntimeTestCase |
| 2 | from oeqa.core.decorator.depends import OETestDepends | 2 | from oeqa.core.decorator.depends import OETestDepends |
| 3 | from oeqa.core.decorator.oeid import OETestID | 3 | from oeqa.core.decorator.oeid import OETestID |
| 4 | from oeqa.core.decorator.data import skipIfNotFeature | 4 | from oeqa.runtime.decorator.package import OEHasPackage |
| 5 | 5 | ||
| 6 | from oeqa.runtime.utils.targetbuildproject import TargetBuildProject | 6 | from oeqa.runtime.utils.targetbuildproject import TargetBuildProject |
| 7 | 7 | ||
| @@ -13,17 +13,18 @@ class BuildCpioTest(OERuntimeTestCase): | |||
| 13 | cls.project = TargetBuildProject(cls.tc.target, | 13 | cls.project = TargetBuildProject(cls.tc.target, |
| 14 | uri, | 14 | uri, |
| 15 | dl_dir = cls.tc.td['DL_DIR']) | 15 | dl_dir = cls.tc.td['DL_DIR']) |
| 16 | cls.project.download_archive() | ||
| 17 | 16 | ||
| 18 | @classmethod | 17 | @classmethod |
| 19 | def tearDownClass(cls): | 18 | def tearDownClass(cls): |
| 20 | cls.project.clean() | 19 | cls.project.clean() |
| 21 | 20 | ||
| 22 | @OETestID(205) | 21 | @OETestID(205) |
| 23 | @skipIfNotFeature('tools-sdk', | ||
| 24 | 'Test requires tools-sdk to be in IMAGE_FEATURES') | ||
| 25 | @OETestDepends(['ssh.SSHTest.test_ssh']) | 22 | @OETestDepends(['ssh.SSHTest.test_ssh']) |
| 23 | @OEHasPackage(['gcc']) | ||
| 24 | @OEHasPackage(['make']) | ||
| 25 | @OEHasPackage(['autoconf']) | ||
| 26 | def test_cpio(self): | 26 | def test_cpio(self): |
| 27 | self.project.download_archive() | ||
| 27 | self.project.run_configure() | 28 | self.project.run_configure() |
| 28 | self.project.run_make() | 29 | self.project.run_make() |
| 29 | self.project.run_install() | 30 | self.project.run_install() |
diff --git a/meta/lib/oeqa/runtime/cases/buildgalculator.py b/meta/lib/oeqa/runtime/cases/buildgalculator.py index 7c9d4a392b..a0a0032083 100644 --- a/meta/lib/oeqa/runtime/cases/buildgalculator.py +++ b/meta/lib/oeqa/runtime/cases/buildgalculator.py | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | from oeqa.runtime.case import OERuntimeTestCase | 1 | from oeqa.runtime.case import OERuntimeTestCase |
| 2 | from oeqa.core.decorator.depends import OETestDepends | 2 | from oeqa.core.decorator.depends import OETestDepends |
| 3 | from oeqa.core.decorator.oeid import OETestID | 3 | from oeqa.core.decorator.oeid import OETestID |
| 4 | from oeqa.core.decorator.data import skipIfNotFeature | 4 | from oeqa.runtime.decorator.package import OEHasPackage |
| 5 | 5 | ||
| 6 | from oeqa.runtime.utils.targetbuildproject import TargetBuildProject | 6 | from oeqa.runtime.utils.targetbuildproject import TargetBuildProject |
| 7 | 7 | ||
| @@ -13,16 +13,17 @@ class GalculatorTest(OERuntimeTestCase): | |||
| 13 | cls.project = TargetBuildProject(cls.tc.target, | 13 | cls.project = TargetBuildProject(cls.tc.target, |
| 14 | uri, | 14 | uri, |
| 15 | dl_dir = cls.tc.td['DL_DIR']) | 15 | dl_dir = cls.tc.td['DL_DIR']) |
| 16 | cls.project.download_archive() | ||
| 17 | 16 | ||
| 18 | @classmethod | 17 | @classmethod |
| 19 | def tearDownClass(cls): | 18 | def tearDownClass(cls): |
| 20 | cls.project.clean() | 19 | cls.project.clean() |
| 21 | 20 | ||
| 22 | @OETestID(1526) | 21 | @OETestID(1526) |
| 23 | @skipIfNotFeature('tools-sdk', | ||
| 24 | 'Test requires tools-sdk to be in IMAGE_FEATURES') | ||
| 25 | @OETestDepends(['ssh.SSHTest.test_ssh']) | 22 | @OETestDepends(['ssh.SSHTest.test_ssh']) |
| 23 | @OEHasPackage(['gcc']) | ||
| 24 | @OEHasPackage(['make']) | ||
| 25 | @OEHasPackage(['autoconf']) | ||
| 26 | def test_galculator(self): | 26 | def test_galculator(self): |
| 27 | self.project.download_archive() | ||
| 27 | self.project.run_configure() | 28 | self.project.run_configure() |
| 28 | self.project.run_make() | 29 | self.project.run_make() |
diff --git a/meta/lib/oeqa/runtime/cases/buildlzip.py b/meta/lib/oeqa/runtime/cases/buildlzip.py index ca3fead2e4..5b455a0790 100644 --- a/meta/lib/oeqa/runtime/cases/buildlzip.py +++ b/meta/lib/oeqa/runtime/cases/buildlzip.py | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | from oeqa.runtime.case import OERuntimeTestCase | 1 | from oeqa.runtime.case import OERuntimeTestCase |
| 2 | from oeqa.core.decorator.depends import OETestDepends | 2 | from oeqa.core.decorator.depends import OETestDepends |
| 3 | from oeqa.core.decorator.oeid import OETestID | 3 | from oeqa.core.decorator.oeid import OETestID |
| 4 | from oeqa.core.decorator.data import skipIfNotFeature | 4 | from oeqa.runtime.decorator.package import OEHasPackage |
| 5 | 5 | ||
| 6 | from oeqa.runtime.utils.targetbuildproject import TargetBuildProject | 6 | from oeqa.runtime.utils.targetbuildproject import TargetBuildProject |
| 7 | 7 | ||
| @@ -14,21 +14,19 @@ class BuildLzipTest(OERuntimeTestCase): | |||
| 14 | cls.project = TargetBuildProject(cls.tc.target, | 14 | cls.project = TargetBuildProject(cls.tc.target, |
| 15 | uri, | 15 | uri, |
| 16 | dl_dir = cls.tc.td['DL_DIR']) | 16 | dl_dir = cls.tc.td['DL_DIR']) |
| 17 | cls.project.download_archive() | ||
| 18 | 17 | ||
| 19 | @classmethod | 18 | @classmethod |
| 20 | def tearDownClass(cls): | 19 | def tearDownClass(cls): |
| 21 | cls.project.clean() | 20 | cls.project.clean() |
| 22 | 21 | ||
| 23 | @OETestID(206) | 22 | @OETestID(206) |
| 24 | @skipIfNotFeature('tools-sdk', | ||
| 25 | 'Test requires tools-sdk to be in IMAGE_FEATURES') | ||
| 26 | @OETestDepends(['ssh.SSHTest.test_ssh']) | 23 | @OETestDepends(['ssh.SSHTest.test_ssh']) |
| 24 | @OEHasPackage(['gcc']) | ||
| 25 | @OEHasPackage(['make']) | ||
| 26 | @OEHasPackage(['autoconf']) | ||
| 27 | def test_lzip(self): | 27 | def test_lzip(self): |
| 28 | self.project.download_archive() | ||
| 28 | self.project.run_configure() | 29 | self.project.run_configure() |
| 29 | self.project.run_make() | 30 | self.project.run_make() |
| 30 | self.project.run_install() | 31 | self.project.run_install() |
| 31 | 32 | ||
| 32 | @classmethod | ||
| 33 | def tearDownClass(self): | ||
| 34 | self.project.clean() | ||
diff --git a/meta/lib/oeqa/runtime/cases/gcc.py b/meta/lib/oeqa/runtime/cases/gcc.py index 911083156f..8265c59f23 100644 --- a/meta/lib/oeqa/runtime/cases/gcc.py +++ b/meta/lib/oeqa/runtime/cases/gcc.py | |||
| @@ -3,12 +3,12 @@ import os | |||
| 3 | from oeqa.runtime.case import OERuntimeTestCase | 3 | from oeqa.runtime.case import OERuntimeTestCase |
| 4 | from oeqa.core.decorator.depends import OETestDepends | 4 | from oeqa.core.decorator.depends import OETestDepends |
| 5 | from oeqa.core.decorator.oeid import OETestID | 5 | from oeqa.core.decorator.oeid import OETestID |
| 6 | from oeqa.core.decorator.data import skipIfNotFeature | 6 | from oeqa.runtime.decorator.package import OEHasPackage |
| 7 | 7 | ||
| 8 | class GccCompileTest(OERuntimeTestCase): | 8 | class GccCompileTest(OERuntimeTestCase): |
| 9 | 9 | ||
| 10 | @classmethod | 10 | @classmethod |
| 11 | def setUpClass(cls): | 11 | def setUp(cls): |
| 12 | dst = '/tmp/' | 12 | dst = '/tmp/' |
| 13 | src = os.path.join(cls.tc.files_dir, 'test.c') | 13 | src = os.path.join(cls.tc.files_dir, 'test.c') |
| 14 | cls.tc.target.copyTo(src, dst) | 14 | cls.tc.target.copyTo(src, dst) |
| @@ -20,14 +20,13 @@ class GccCompileTest(OERuntimeTestCase): | |||
| 20 | cls.tc.target.copyTo(src, dst) | 20 | cls.tc.target.copyTo(src, dst) |
| 21 | 21 | ||
| 22 | @classmethod | 22 | @classmethod |
| 23 | def tearDownClass(cls): | 23 | def tearDown(cls): |
| 24 | files = '/tmp/test.c /tmp/test.o /tmp/test /tmp/testmakefile' | 24 | files = '/tmp/test.c /tmp/test.o /tmp/test /tmp/testmakefile' |
| 25 | cls.tc.target.run('rm %s' % files) | 25 | cls.tc.target.run('rm %s' % files) |
| 26 | 26 | ||
| 27 | @OETestID(203) | 27 | @OETestID(203) |
| 28 | @skipIfNotFeature('tools-sdk', | ||
| 29 | 'Test requires tools-sdk to be in IMAGE_FEATURES') | ||
| 30 | @OETestDepends(['ssh.SSHTest.test_ssh']) | 28 | @OETestDepends(['ssh.SSHTest.test_ssh']) |
| 29 | @OEHasPackage(['gcc']) | ||
| 31 | def test_gcc_compile(self): | 30 | def test_gcc_compile(self): |
| 32 | status, output = self.target.run('gcc /tmp/test.c -o /tmp/test -lm') | 31 | status, output = self.target.run('gcc /tmp/test.c -o /tmp/test -lm') |
| 33 | msg = 'gcc compile failed, output: %s' % output | 32 | msg = 'gcc compile failed, output: %s' % output |
| @@ -38,9 +37,8 @@ class GccCompileTest(OERuntimeTestCase): | |||
| 38 | self.assertEqual(status, 0, msg=msg) | 37 | self.assertEqual(status, 0, msg=msg) |
| 39 | 38 | ||
| 40 | @OETestID(200) | 39 | @OETestID(200) |
| 41 | @skipIfNotFeature('tools-sdk', | ||
| 42 | 'Test requires tools-sdk to be in IMAGE_FEATURES') | ||
| 43 | @OETestDepends(['ssh.SSHTest.test_ssh']) | 40 | @OETestDepends(['ssh.SSHTest.test_ssh']) |
| 41 | @OEHasPackage(['g++']) | ||
| 44 | def test_gpp_compile(self): | 42 | def test_gpp_compile(self): |
| 45 | status, output = self.target.run('g++ /tmp/test.c -o /tmp/test -lm') | 43 | status, output = self.target.run('g++ /tmp/test.c -o /tmp/test -lm') |
| 46 | msg = 'g++ compile failed, output: %s' % output | 44 | msg = 'g++ compile failed, output: %s' % output |
| @@ -51,9 +49,8 @@ class GccCompileTest(OERuntimeTestCase): | |||
| 51 | self.assertEqual(status, 0, msg=msg) | 49 | self.assertEqual(status, 0, msg=msg) |
| 52 | 50 | ||
| 53 | @OETestID(1142) | 51 | @OETestID(1142) |
| 54 | @skipIfNotFeature('tools-sdk', | ||
| 55 | 'Test requires tools-sdk to be in IMAGE_FEATURES') | ||
| 56 | @OETestDepends(['ssh.SSHTest.test_ssh']) | 52 | @OETestDepends(['ssh.SSHTest.test_ssh']) |
| 53 | @OEHasPackage(['g++']) | ||
| 57 | def test_gpp2_compile(self): | 54 | def test_gpp2_compile(self): |
| 58 | status, output = self.target.run('g++ /tmp/test.cpp -o /tmp/test -lm') | 55 | status, output = self.target.run('g++ /tmp/test.cpp -o /tmp/test -lm') |
| 59 | msg = 'g++ compile failed, output: %s' % output | 56 | msg = 'g++ compile failed, output: %s' % output |
| @@ -64,9 +61,9 @@ class GccCompileTest(OERuntimeTestCase): | |||
| 64 | self.assertEqual(status, 0, msg=msg) | 61 | self.assertEqual(status, 0, msg=msg) |
| 65 | 62 | ||
| 66 | @OETestID(204) | 63 | @OETestID(204) |
| 67 | @skipIfNotFeature('tools-sdk', | ||
| 68 | 'Test requires tools-sdk to be in IMAGE_FEATURES') | ||
| 69 | @OETestDepends(['ssh.SSHTest.test_ssh']) | 64 | @OETestDepends(['ssh.SSHTest.test_ssh']) |
| 65 | @OEHasPackage(['gcc']) | ||
| 66 | @OEHasPackage(['make']) | ||
| 70 | def test_make(self): | 67 | def test_make(self): |
| 71 | status, output = self.target.run('cd /tmp; make -f testmakefile') | 68 | status, output = self.target.run('cd /tmp; make -f testmakefile') |
| 72 | msg = 'running make failed, output %s' % output | 69 | msg = 'running make failed, output %s' % output |
diff --git a/meta/lib/oeqa/runtime/cases/kernelmodule.py b/meta/lib/oeqa/runtime/cases/kernelmodule.py index de1a5aa445..27a2c35b71 100644 --- a/meta/lib/oeqa/runtime/cases/kernelmodule.py +++ b/meta/lib/oeqa/runtime/cases/kernelmodule.py | |||
| @@ -4,11 +4,12 @@ from oeqa.runtime.case import OERuntimeTestCase | |||
| 4 | from oeqa.core.decorator.depends import OETestDepends | 4 | from oeqa.core.decorator.depends import OETestDepends |
| 5 | from oeqa.core.decorator.oeid import OETestID | 5 | from oeqa.core.decorator.oeid import OETestID |
| 6 | from oeqa.core.decorator.data import skipIfNotFeature | 6 | from oeqa.core.decorator.data import skipIfNotFeature |
| 7 | from oeqa.runtime.decorator.package import OEHasPackage | ||
| 7 | 8 | ||
| 8 | class KernelModuleTest(OERuntimeTestCase): | 9 | class KernelModuleTest(OERuntimeTestCase): |
| 9 | 10 | ||
| 10 | @classmethod | 11 | @classmethod |
| 11 | def setUpClass(cls): | 12 | def setUp(cls): |
| 12 | src = os.path.join(cls.tc.runtime_files_dir, 'hellomod.c') | 13 | src = os.path.join(cls.tc.runtime_files_dir, 'hellomod.c') |
| 13 | dst = '/tmp/hellomod.c' | 14 | dst = '/tmp/hellomod.c' |
| 14 | cls.tc.target.copyTo(src, dst) | 15 | cls.tc.target.copyTo(src, dst) |
| @@ -18,7 +19,7 @@ class KernelModuleTest(OERuntimeTestCase): | |||
| 18 | cls.tc.target.copyTo(src, dst) | 19 | cls.tc.target.copyTo(src, dst) |
| 19 | 20 | ||
| 20 | @classmethod | 21 | @classmethod |
| 21 | def tearDownClass(cls): | 22 | def tearDown(cls): |
| 22 | files = '/tmp/Makefile /tmp/hellomod.c' | 23 | files = '/tmp/Makefile /tmp/hellomod.c' |
| 23 | cls.tc.target.run('rm %s' % files) | 24 | cls.tc.target.run('rm %s' % files) |
| 24 | 25 | ||
| @@ -26,6 +27,9 @@ class KernelModuleTest(OERuntimeTestCase): | |||
| 26 | @skipIfNotFeature('tools-sdk', | 27 | @skipIfNotFeature('tools-sdk', |
| 27 | 'Test requires tools-sdk to be in IMAGE_FEATURES') | 28 | 'Test requires tools-sdk to be in IMAGE_FEATURES') |
| 28 | @OETestDepends(['gcc.GccCompileTest.test_gcc_compile']) | 29 | @OETestDepends(['gcc.GccCompileTest.test_gcc_compile']) |
| 30 | @OEHasPackage(['kernel-devsrc']) | ||
| 31 | @OEHasPackage(['make']) | ||
| 32 | @OEHasPackage(['gcc']) | ||
| 29 | def test_kernel_module(self): | 33 | def test_kernel_module(self): |
| 30 | cmds = [ | 34 | cmds = [ |
| 31 | 'cd /usr/src/kernel && make scripts prepare', | 35 | 'cd /usr/src/kernel && make scripts prepare', |
diff --git a/meta/lib/oeqa/runtime/cases/stap.py b/meta/lib/oeqa/runtime/cases/stap.py index 747c1d9517..c492caffd6 100644 --- a/meta/lib/oeqa/runtime/cases/stap.py +++ b/meta/lib/oeqa/runtime/cases/stap.py | |||
| @@ -9,13 +9,13 @@ from oeqa.runtime.decorator.package import OEHasPackage | |||
| 9 | class StapTest(OERuntimeTestCase): | 9 | class StapTest(OERuntimeTestCase): |
| 10 | 10 | ||
| 11 | @classmethod | 11 | @classmethod |
| 12 | def setUpClass(cls): | 12 | def setUp(cls): |
| 13 | src = os.path.join(cls.tc.runtime_files_dir, 'hello.stp') | 13 | src = os.path.join(cls.tc.runtime_files_dir, 'hello.stp') |
| 14 | dst = '/tmp/hello.stp' | 14 | dst = '/tmp/hello.stp' |
| 15 | cls.tc.target.copyTo(src, dst) | 15 | cls.tc.target.copyTo(src, dst) |
| 16 | 16 | ||
| 17 | @classmethod | 17 | @classmethod |
| 18 | def tearDownClass(cls): | 18 | def tearDown(cls): |
| 19 | files = '/tmp/hello.stp' | 19 | files = '/tmp/hello.stp' |
| 20 | cls.tc.target.run('rm %s' % files) | 20 | cls.tc.target.run('rm %s' % files) |
| 21 | 21 | ||
