summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChangqing Li <changqing.li@windriver.com>2019-09-20 10:31:54 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-27 13:02:16 +0100
commitc08c61d2f13ced2d5ff929d09f1876d3eb221e92 (patch)
tree8faeb6b49ae5cbeb24b0873b091c34bc8d22179b
parent4137f5978d31a80f46b8fea1e492a04f03a53fa8 (diff)
downloadpoky-c08c61d2f13ced2d5ff929d09f1876d3eb221e92.tar.gz
devtool.py: change to do clean before remove-layer
if do clean after remove-layer, it will make stamp file not cleaned since variable STAMP has changed, this will cause error like: if testcase buildclean failed, when run next testcase modify, since do_prepare_recipe_sysroot's stamp file exists, sysroot not populated, then do_compile will fail with error: /bin/sh: x86_64-poky-linux-gcc: command not found (From OE-Core rev: 046d7e1de094105db0949c2cf5333ff55d9ad9c8) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/selftest/cases/devtool.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index 6fe145c994..a7c6005c6d 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -518,8 +518,8 @@ class DevtoolModifyTests(DevtoolBase):
518 tempdir = tempfile.mkdtemp(prefix='devtoolqa') 518 tempdir = tempfile.mkdtemp(prefix='devtoolqa')
519 self.track_for_cleanup(tempdir) 519 self.track_for_cleanup(tempdir)
520 self.track_for_cleanup(self.workspacedir) 520 self.track_for_cleanup(self.workspacedir)
521 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
522 self.add_command_to_tearDown('bitbake -c clean mdadm') 521 self.add_command_to_tearDown('bitbake -c clean mdadm')
522 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
523 result = runCmd('devtool modify mdadm -x %s' % tempdir) 523 result = runCmd('devtool modify mdadm -x %s' % tempdir)
524 self.assertExists(os.path.join(tempdir, 'Makefile'), 'Extracted source could not be found') 524 self.assertExists(os.path.join(tempdir, 'Makefile'), 'Extracted source could not be found')
525 self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created') 525 self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created')
@@ -587,8 +587,8 @@ class DevtoolModifyTests(DevtoolBase):
587 self.track_for_cleanup(tempdir_m4) 587 self.track_for_cleanup(tempdir_m4)
588 self.track_for_cleanup(builddir_m4) 588 self.track_for_cleanup(builddir_m4)
589 self.track_for_cleanup(self.workspacedir) 589 self.track_for_cleanup(self.workspacedir)
590 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
591 self.add_command_to_tearDown('bitbake -c clean mdadm m4') 590 self.add_command_to_tearDown('bitbake -c clean mdadm m4')
591 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
592 self.write_recipeinc('m4', 'EXTERNALSRC_BUILD = "%s"\ndo_clean() {\n\t:\n}\n' % builddir_m4) 592 self.write_recipeinc('m4', 'EXTERNALSRC_BUILD = "%s"\ndo_clean() {\n\t:\n}\n' % builddir_m4)
593 try: 593 try:
594 runCmd('devtool modify mdadm -x %s' % tempdir_mdadm) 594 runCmd('devtool modify mdadm -x %s' % tempdir_mdadm)
@@ -683,8 +683,8 @@ class DevtoolModifyTests(DevtoolBase):
683 tempdir = tempfile.mkdtemp(prefix='devtoolqa') 683 tempdir = tempfile.mkdtemp(prefix='devtoolqa')
684 self.track_for_cleanup(tempdir) 684 self.track_for_cleanup(tempdir)
685 self.track_for_cleanup(self.workspacedir) 685 self.track_for_cleanup(self.workspacedir)
686 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
687 self.add_command_to_tearDown('bitbake -c clean %s' % testrecipe) 686 self.add_command_to_tearDown('bitbake -c clean %s' % testrecipe)
687 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
688 result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir)) 688 result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
689 self.assertExists(os.path.join(tempdir, 'Makefile.am'), 'Extracted source could not be found') 689 self.assertExists(os.path.join(tempdir, 'Makefile.am'), 'Extracted source could not be found')
690 self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created. devtool output: %s' % result.output) 690 self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created. devtool output: %s' % result.output)
@@ -715,8 +715,8 @@ class DevtoolModifyTests(DevtoolBase):
715 tempdir = tempfile.mkdtemp(prefix='devtoolqa') 715 tempdir = tempfile.mkdtemp(prefix='devtoolqa')
716 self.track_for_cleanup(tempdir) 716 self.track_for_cleanup(tempdir)
717 self.track_for_cleanup(self.workspacedir) 717 self.track_for_cleanup(self.workspacedir)
718 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
719 self.add_command_to_tearDown('bitbake -c clean %s' % testrecipe) 718 self.add_command_to_tearDown('bitbake -c clean %s' % testrecipe)
719 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
720 result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir)) 720 result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
721 self.assertExists(os.path.join(tempdir, 'configure.ac'), 'Extracted source could not be found') 721 self.assertExists(os.path.join(tempdir, 'configure.ac'), 'Extracted source could not be found')
722 self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created') 722 self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created')
@@ -1246,8 +1246,8 @@ class DevtoolExtractTests(DevtoolBase):
1246 tempdir = tempfile.mkdtemp(prefix='devtoolqa') 1246 tempdir = tempfile.mkdtemp(prefix='devtoolqa')
1247 self.track_for_cleanup(tempdir) 1247 self.track_for_cleanup(tempdir)
1248 self.track_for_cleanup(self.workspacedir) 1248 self.track_for_cleanup(self.workspacedir)
1249 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
1250 self.add_command_to_tearDown('bitbake -c clean %s' % testrecipe) 1249 self.add_command_to_tearDown('bitbake -c clean %s' % testrecipe)
1250 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
1251 result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir)) 1251 result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
1252 # Test that deploy-target at this point fails (properly) 1252 # Test that deploy-target at this point fails (properly)
1253 result = runCmd('devtool deploy-target -n %s root@localhost' % testrecipe, ignore_status=True) 1253 result = runCmd('devtool deploy-target -n %s root@localhost' % testrecipe, ignore_status=True)
@@ -1297,8 +1297,8 @@ class DevtoolExtractTests(DevtoolBase):
1297 self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory') 1297 self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')
1298 image = 'core-image-minimal' 1298 image = 'core-image-minimal'
1299 self.track_for_cleanup(self.workspacedir) 1299 self.track_for_cleanup(self.workspacedir)
1300 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
1301 self.add_command_to_tearDown('bitbake -c clean %s' % image) 1300 self.add_command_to_tearDown('bitbake -c clean %s' % image)
1301 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
1302 bitbake('%s -c clean' % image) 1302 bitbake('%s -c clean' % image)
1303 # Add target and native recipes to workspace 1303 # Add target and native recipes to workspace
1304 recipes = ['mdadm', 'parted-native'] 1304 recipes = ['mdadm', 'parted-native']
@@ -1707,8 +1707,8 @@ class DevtoolUpgradeTests(DevtoolBase):
1707 self.track_for_cleanup(tempdir) 1707 self.track_for_cleanup(tempdir)
1708 self.track_for_cleanup(tempdir_cfg) 1708 self.track_for_cleanup(tempdir_cfg)
1709 self.track_for_cleanup(self.workspacedir) 1709 self.track_for_cleanup(self.workspacedir)
1710 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
1711 self.add_command_to_tearDown('bitbake -c clean %s' % kernel_provider) 1710 self.add_command_to_tearDown('bitbake -c clean %s' % kernel_provider)
1711 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
1712 #Step 1 1712 #Step 1
1713 #Here is just generated the config file instead of all the kernel to optimize the 1713 #Here is just generated the config file instead of all the kernel to optimize the
1714 #time of executing this test case. 1714 #time of executing this test case.