diff options
Diffstat (limited to 'meta/lib/oeqa/runtime/cases/gcc.py')
-rw-r--r-- | meta/lib/oeqa/runtime/cases/gcc.py | 19 |
1 files changed, 8 insertions, 11 deletions
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 |