diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/testsdk.bbclass | 4 | ||||
-rw-r--r-- | meta/lib/oeqa/sdkext/cases/devtool.py | 35 |
2 files changed, 13 insertions, 26 deletions
diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass index 802e57f55d..0e6949ed9f 100644 --- a/meta/classes/testsdk.bbclass +++ b/meta/classes/testsdk.bbclass | |||
@@ -100,7 +100,7 @@ def testsdkext_main(d): | |||
100 | import logging | 100 | import logging |
101 | 101 | ||
102 | from bb.utils import export_proxies | 102 | from bb.utils import export_proxies |
103 | from oeqa.utils import avoid_paths_in_environ, make_logger_bitbake_compatible | 103 | from oeqa.utils import avoid_paths_in_environ, make_logger_bitbake_compatible, subprocesstweak |
104 | from oeqa.sdkext.context import OESDKExtTestContext, OESDKExtTestContextExecutor | 104 | from oeqa.sdkext.context import OESDKExtTestContext, OESDKExtTestContextExecutor |
105 | 105 | ||
106 | pn = d.getVar("PN") | 106 | pn = d.getVar("PN") |
@@ -109,6 +109,8 @@ def testsdkext_main(d): | |||
109 | # extensible sdk use network | 109 | # extensible sdk use network |
110 | export_proxies(d) | 110 | export_proxies(d) |
111 | 111 | ||
112 | subprocesstweak.errors_have_output() | ||
113 | |||
112 | # extensible sdk can be contaminated if native programs are | 114 | # extensible sdk can be contaminated if native programs are |
113 | # in PATH, i.e. use perl-native instead of eSDK one. | 115 | # in PATH, i.e. use perl-native instead of eSDK one. |
114 | paths_to_avoid = [d.getVar('STAGING_DIR'), | 116 | paths_to_avoid = [d.getVar('STAGING_DIR'), |
diff --git a/meta/lib/oeqa/sdkext/cases/devtool.py b/meta/lib/oeqa/sdkext/cases/devtool.py index ffaa2f00a5..63431aaa95 100644 --- a/meta/lib/oeqa/sdkext/cases/devtool.py +++ b/meta/lib/oeqa/sdkext/cases/devtool.py | |||
@@ -29,38 +29,32 @@ class DevtoolTest(OESDKExtTestCase): | |||
29 | self._run('devtool add myapp %s' % directory) | 29 | self._run('devtool add myapp %s' % directory) |
30 | try: | 30 | try: |
31 | self._run('devtool build myapp') | 31 | self._run('devtool build myapp') |
32 | except Exception as e: | 32 | finally: |
33 | print(e.output) | ||
34 | self._run('devtool reset myapp') | 33 | self._run('devtool reset myapp') |
35 | raise e | ||
36 | self._run('devtool reset myapp') | ||
37 | 34 | ||
38 | def _test_devtool_build_package(self, directory): | 35 | def _test_devtool_build_package(self, directory): |
39 | self._run('devtool add myapp %s' % directory) | 36 | self._run('devtool add myapp %s' % directory) |
40 | try: | 37 | try: |
41 | self._run('devtool package myapp') | 38 | self._run('devtool package myapp') |
42 | except Exception as e: | 39 | finally: |
43 | print(e.output) | ||
44 | self._run('devtool reset myapp') | 40 | self._run('devtool reset myapp') |
45 | raise e | ||
46 | self._run('devtool reset myapp') | ||
47 | 41 | ||
48 | def test_devtool_location(self): | 42 | def test_devtool_location(self): |
49 | output = self._run('which devtool') | 43 | output = self._run('which devtool') |
50 | self.assertEqual(output.startswith(self.tc.sdk_dir), True, \ | 44 | self.assertEqual(output.startswith(self.tc.sdk_dir), True, \ |
51 | msg="Seems that devtool isn't the eSDK one: %s" % output) | 45 | msg="Seems that devtool isn't the eSDK one: %s" % output) |
52 | 46 | ||
53 | @OETestDepends(['test_devtool_location']) | 47 | @OETestDepends(['test_devtool_location']) |
54 | def test_devtool_add_reset(self): | 48 | def test_devtool_add_reset(self): |
55 | self._run('devtool add myapp %s' % self.myapp_dst) | 49 | self._run('devtool add myapp %s' % self.myapp_dst) |
56 | self._run('devtool reset myapp') | 50 | self._run('devtool reset myapp') |
57 | 51 | ||
58 | @OETestID(1605) | 52 | @OETestID(1605) |
59 | @OETestDepends(['test_devtool_location']) | 53 | @OETestDepends(['test_devtool_location']) |
60 | @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain') | 54 | @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain') |
61 | def test_devtool_build_make(self): | 55 | def test_devtool_build_make(self): |
62 | self._test_devtool_build(self.myapp_dst) | 56 | self._test_devtool_build(self.myapp_dst) |
63 | 57 | ||
64 | @OETestID(1606) | 58 | @OETestID(1606) |
65 | @OETestDepends(['test_devtool_location']) | 59 | @OETestDepends(['test_devtool_location']) |
66 | @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain') | 60 | @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain') |
@@ -72,7 +66,7 @@ class DevtoolTest(OESDKExtTestCase): | |||
72 | @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain') | 66 | @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain') |
73 | def test_devtool_build_cmake(self): | 67 | def test_devtool_build_cmake(self): |
74 | self._test_devtool_build(self.myapp_cmake_dst) | 68 | self._test_devtool_build(self.myapp_cmake_dst) |
75 | 69 | ||
76 | @OETestID(1608) | 70 | @OETestID(1608) |
77 | @OETestDepends(['test_devtool_location']) | 71 | @OETestDepends(['test_devtool_location']) |
78 | @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain') | 72 | @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain') |
@@ -82,11 +76,8 @@ class DevtoolTest(OESDKExtTestCase): | |||
82 | self._run('devtool add %s %s' % (recipe, req) ) | 76 | self._run('devtool add %s %s' % (recipe, req) ) |
83 | try: | 77 | try: |
84 | self._run('devtool build %s' % recipe) | 78 | self._run('devtool build %s' % recipe) |
85 | except Exception as e: | 79 | finally: |
86 | print(e.output) | ||
87 | self._run('devtool reset %s' % recipe) | 80 | self._run('devtool reset %s' % recipe) |
88 | raise e | ||
89 | self._run('devtool reset %s' % recipe) | ||
90 | 81 | ||
91 | @OETestID(1609) | 82 | @OETestID(1609) |
92 | @OETestDepends(['test_devtool_location']) | 83 | @OETestDepends(['test_devtool_location']) |
@@ -97,11 +88,8 @@ class DevtoolTest(OESDKExtTestCase): | |||
97 | self._run('devtool add %s %s' % (recipe, docfile) ) | 88 | self._run('devtool add %s %s' % (recipe, docfile) ) |
98 | try: | 89 | try: |
99 | self._run('devtool build %s' % recipe) | 90 | self._run('devtool build %s' % recipe) |
100 | except Exception as e: | 91 | finally: |
101 | print(e.output) | ||
102 | self._run('devtool reset %s' % recipe) | 92 | self._run('devtool reset %s' % recipe) |
103 | raise e | ||
104 | self._run('devtool reset %s' % recipe) | ||
105 | 93 | ||
106 | @OETestID(1610) | 94 | @OETestID(1610) |
107 | @OETestDepends(['test_devtool_location']) | 95 | @OETestDepends(['test_devtool_location']) |
@@ -111,8 +99,5 @@ class DevtoolTest(OESDKExtTestCase): | |||
111 | self._run('devtool add %s ' % package_nodejs) | 99 | self._run('devtool add %s ' % package_nodejs) |
112 | try: | 100 | try: |
113 | self._run('devtool build %s ' % package_nodejs) | 101 | self._run('devtool build %s ' % package_nodejs) |
114 | except Exception as e: | 102 | finally: |
115 | print(e.output) | 103 | self._run('devtool reset %s '% package_nodejs) |
116 | self._run('devtool reset %s' % package_nodejs) | ||
117 | raise e | ||
118 | self._run('devtool reset %s '% package_nodejs) | ||