diff options
author | Daniel Istrate <daniel.alexandrux.istrate@intel.com> | 2015-10-23 15:07:51 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-10-27 07:24:28 +0000 |
commit | 426a9b78d0018a739ec06c5dddcd0f8b6c4194cf (patch) | |
tree | cc33f531c7c2aa59b43f18c97223efb1b250f6b6 /meta/lib/oeqa/selftest/devtool.py | |
parent | 835525c8bb79007b262b10e9f473ebfa1e4c8ceb (diff) | |
download | poky-426a9b78d0018a739ec06c5dddcd0f8b6c4194cf.tar.gz |
oeqa/selftest: Added testcase decorators.
Added testcase decorators for testopia integration.
(From OE-Core rev: 9c7ffd397c8232d53c87017e58e03e3056863edf)
Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@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/oeqa/selftest/devtool.py')
-rw-r--r-- | meta/lib/oeqa/selftest/devtool.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py index fb46559eec..f48e6a2557 100644 --- a/meta/lib/oeqa/selftest/devtool.py +++ b/meta/lib/oeqa/selftest/devtool.py | |||
@@ -378,6 +378,7 @@ class DevtoolTests(DevtoolBase): | |||
378 | self.assertNotEqual(result.status, 0, 'devtool modify on %s should have failed. devtool output: %s' % (testrecipe, result.output)) | 378 | self.assertNotEqual(result.status, 0, 'devtool modify on %s should have failed. devtool output: %s' % (testrecipe, result.output)) |
379 | self.assertIn('ERROR: ', result.output, 'devtool modify on %s should have given an ERROR' % testrecipe) | 379 | self.assertIn('ERROR: ', result.output, 'devtool modify on %s should have given an ERROR' % testrecipe) |
380 | 380 | ||
381 | @testcase(1365) | ||
381 | def test_devtool_modify_native(self): | 382 | def test_devtool_modify_native(self): |
382 | # Check preconditions | 383 | # Check preconditions |
383 | self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory') | 384 | self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory') |
@@ -466,6 +467,7 @@ class DevtoolTests(DevtoolBase): | |||
466 | # Try building | 467 | # Try building |
467 | bitbake(testrecipe) | 468 | bitbake(testrecipe) |
468 | 469 | ||
470 | @testcase(1378) | ||
469 | def test_devtool_modify_virtual(self): | 471 | def test_devtool_modify_virtual(self): |
470 | # Try modifying a virtual recipe | 472 | # Try modifying a virtual recipe |
471 | virtrecipe = 'virtual/libx11' | 473 | virtrecipe = 'virtual/libx11' |
@@ -745,7 +747,7 @@ class DevtoolTests(DevtoolBase): | |||
745 | self.assertEqual(expectedlines, f.readlines()) | 747 | self.assertEqual(expectedlines, f.readlines()) |
746 | # Deleting isn't expected to work under these circumstances | 748 | # Deleting isn't expected to work under these circumstances |
747 | 749 | ||
748 | @testcase(1173) | 750 | @testcase(1370) |
749 | def test_devtool_update_recipe_local_files(self): | 751 | def test_devtool_update_recipe_local_files(self): |
750 | """Check that local source files are copied over instead of patched""" | 752 | """Check that local source files are copied over instead of patched""" |
751 | testrecipe = 'makedevs' | 753 | testrecipe = 'makedevs' |
@@ -775,7 +777,7 @@ class DevtoolTests(DevtoolBase): | |||
775 | ('??', '.*/makedevs/0001-Add-new-file.patch$')] | 777 | ('??', '.*/makedevs/0001-Add-new-file.patch$')] |
776 | self._check_repo_status(os.path.dirname(recipefile), expected_status) | 778 | self._check_repo_status(os.path.dirname(recipefile), expected_status) |
777 | 779 | ||
778 | @testcase(1174) | 780 | @testcase(1371) |
779 | def test_devtool_update_recipe_local_files_2(self): | 781 | def test_devtool_update_recipe_local_files_2(self): |
780 | """Check local source files support when oe-local-files is in Git""" | 782 | """Check local source files support when oe-local-files is in Git""" |
781 | testrecipe = 'lzo' | 783 | testrecipe = 'lzo' |
@@ -827,6 +829,7 @@ class DevtoolTests(DevtoolBase): | |||
827 | self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile.am')), 'Extracted source could not be found') | 829 | self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile.am')), 'Extracted source could not be found') |
828 | self._check_src_repo(tempdir) | 830 | self._check_src_repo(tempdir) |
829 | 831 | ||
832 | @testcase(1379) | ||
830 | def test_devtool_extract_virtual(self): | 833 | def test_devtool_extract_virtual(self): |
831 | tempdir = tempfile.mkdtemp(prefix='devtoolqa') | 834 | tempdir = tempfile.mkdtemp(prefix='devtoolqa') |
832 | # Try devtool extract | 835 | # Try devtool extract |
@@ -864,6 +867,7 @@ class DevtoolTests(DevtoolBase): | |||
864 | matches2 = glob.glob(stampprefix2 + '*') | 867 | matches2 = glob.glob(stampprefix2 + '*') |
865 | self.assertFalse(matches2, 'Stamp files exist for recipe %s that should have been cleaned' % testrecipe2) | 868 | self.assertFalse(matches2, 'Stamp files exist for recipe %s that should have been cleaned' % testrecipe2) |
866 | 869 | ||
870 | @testcase(1272) | ||
867 | def test_devtool_deploy_target(self): | 871 | def test_devtool_deploy_target(self): |
868 | # NOTE: Whilst this test would seemingly be better placed as a runtime test, | 872 | # NOTE: Whilst this test would seemingly be better placed as a runtime test, |
869 | # unfortunately the runtime tests run under bitbake and you can't run | 873 | # unfortunately the runtime tests run under bitbake and you can't run |
@@ -948,6 +952,7 @@ class DevtoolTests(DevtoolBase): | |||
948 | result = runCmd('ssh %s root@%s %s' % (sshargs, qemu.ip, testcommand), ignore_status=True) | 952 | result = runCmd('ssh %s root@%s %s' % (sshargs, qemu.ip, testcommand), ignore_status=True) |
949 | self.assertNotEqual(result, 0, 'undeploy-target did not remove command as it should have') | 953 | self.assertNotEqual(result, 0, 'undeploy-target did not remove command as it should have') |
950 | 954 | ||
955 | @testcase(1366) | ||
951 | def test_devtool_build_image(self): | 956 | def test_devtool_build_image(self): |
952 | """Test devtool build-image plugin""" | 957 | """Test devtool build-image plugin""" |
953 | # Check preconditions | 958 | # Check preconditions |
@@ -981,6 +986,7 @@ class DevtoolTests(DevtoolBase): | |||
981 | if reqpkgs: | 986 | if reqpkgs: |
982 | self.fail('The following packages were not present in the image as expected: %s' % ', '.join(reqpkgs)) | 987 | self.fail('The following packages were not present in the image as expected: %s' % ', '.join(reqpkgs)) |
983 | 988 | ||
989 | @testcase(1367) | ||
984 | def test_devtool_upgrade(self): | 990 | def test_devtool_upgrade(self): |
985 | # Check preconditions | 991 | # Check preconditions |
986 | self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory') | 992 | self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory') |
@@ -1016,6 +1022,7 @@ class DevtoolTests(DevtoolBase): | |||
1016 | self.track_for_cleanup(self.workspacedir) | 1022 | self.track_for_cleanup(self.workspacedir) |
1017 | self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') | 1023 | self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') |
1018 | 1024 | ||
1025 | @testcase(1352) | ||
1019 | def test_devtool_layer_plugins(self): | 1026 | def test_devtool_layer_plugins(self): |
1020 | """Test that devtool can use plugins from other layers. | 1027 | """Test that devtool can use plugins from other layers. |
1021 | 1028 | ||