diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-07-08 09:17:32 +1200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-08 10:29:44 +0100 |
commit | a14d30f7de192b9a2bffc65f567483abff962f22 (patch) | |
tree | a1967831b4960b556bd271d90d7e0a49c61ddf6d /meta/lib | |
parent | 8dc159dd9372100a96bcbc9e7670894417897f92 (diff) | |
download | poky-a14d30f7de192b9a2bffc65f567483abff962f22.tar.gz |
oe-selftest: drop test_prepare_unexpected
This test refers to a function that no longer exists after the eSDK
install double execution of bitbake has been removed, and since
test_prepare_unexpected is the only test in this module, drop the
entire module. We can easily resurrect it if we have unit tests to add
in the future.
(From OE-Core rev: 7e792a22e62904ed2dafb1ea214911235e3f3efc)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rwxr-xr-x | meta/lib/oeqa/selftest/esdk_prepare.py | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/meta/lib/oeqa/selftest/esdk_prepare.py b/meta/lib/oeqa/selftest/esdk_prepare.py deleted file mode 100755 index 406089787d..0000000000 --- a/meta/lib/oeqa/selftest/esdk_prepare.py +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | #!/usr/bin/env python | ||
2 | |||
3 | import shutil, tempfile | ||
4 | import sys | ||
5 | import os | ||
6 | import imp | ||
7 | import unittest | ||
8 | try: | ||
9 | from oeqa.utils.commands import get_bb_var | ||
10 | except ImportError: | ||
11 | pass | ||
12 | |||
13 | # module under test | ||
14 | module_file_name = "ext-sdk-prepare.py" | ||
15 | module_path = "" | ||
16 | |||
17 | class ExtSdkPrepareTest(unittest.TestCase): | ||
18 | |||
19 | """ unit test for fix for Yocto #9019 """ | ||
20 | |||
21 | @classmethod | ||
22 | def setUpClass(self): | ||
23 | # copy module under test to temp dir | ||
24 | self.test_dir = tempfile.mkdtemp() | ||
25 | module_dest_path = os.path.join(self.test_dir, module_file_name) | ||
26 | try: | ||
27 | shutil.copy(module_path, self.test_dir) | ||
28 | # load module under test | ||
29 | self.test_mod = imp.load_source("", module_dest_path) | ||
30 | except: | ||
31 | print("error: unable to copy or load %s [src: %s, dst: %s]" % \ | ||
32 | (module_file_name, module_path, module_dest_path)) | ||
33 | sys.exit(1) | ||
34 | |||
35 | def test_prepare_unexpected(self): | ||
36 | # test data | ||
37 | # note: pathnames have been truncated from the actual bitbake | ||
38 | # output as they are not important for the test. | ||
39 | test_data = ( | ||
40 | 'NOTE: Running noexec task 9 of 6539 (ID: 28, quilt/quilt-native_0.64.bb, do_build)\n' | ||
41 | 'NOTE: Running task 10 of 6539 (ID: 29, quilt/quilt-native_0.64.bb, do_package)\n' | ||
42 | 'NOTE: Running task 11 of 6539 (ID: 30, quilt/quilt-native_0.64.bb, do_rm_work)\n' | ||
43 | 'NOTE: Running noexec task 6402 of 6539 (ID: 1, images/core-image-sato.bb, do_patch)\n' | ||
44 | 'NOTE: Running task 6538 of 6539 (ID: 14, images/core-image-sato.bb, do_rm_work)\n' | ||
45 | ) | ||
46 | # expected warning output | ||
47 | expected = [ (' task 10 of 6539 (ID: 29, quilt/quilt-native_0.64.bb, do_package)') ] | ||
48 | # recipe to test, matching test input data | ||
49 | recipes = [ "core-image-sato.bb" ] | ||
50 | |||
51 | # run the test | ||
52 | output = self.test_mod.check_unexpected(test_data, recipes) | ||
53 | self.assertEqual(output, expected) | ||
54 | |||
55 | @classmethod | ||
56 | def tearDownClass(self): | ||
57 | # remove temp dir | ||
58 | shutil.rmtree(self.test_dir) | ||
59 | |||
60 | if __name__ == '__main__': | ||
61 | # running from command line - i.e., not under oe-selftest | ||
62 | # directory containing module under test comes from command line | ||
63 | if len(sys.argv) == 2 and os.path.isdir(sys.argv[1]): | ||
64 | module_path = os.path.join(sys.argv[1], module_file_name) | ||
65 | suite = unittest.TestLoader().loadTestsFromTestCase(ExtSdkPrepareTest) | ||
66 | unittest.TextTestRunner().run(suite) | ||
67 | else: | ||
68 | progname = os.path.basename(sys.argv[0]) | ||
69 | print("%s: missing directory path" % progname) | ||
70 | print("usage: %s /path/to/directory-of(ext-sdk-prepare.py)" % progname) | ||
71 | sys.exit(1) | ||
72 | else: | ||
73 | # running under oe-selftest | ||
74 | # determine module source dir from COREBASE and expected path | ||
75 | module_path = os.path.join(get_bb_var("COREBASE"), "meta", "files", module_file_name) | ||