]> code.ossystems Code Review - openembedded-core.git/commitdiff
selftest/cases/devtool.py: fix workspace layer checking
authorRobert Yang <liezhi.yang@windriver.com>
Thu, 21 Dec 2017 10:47:09 +0000 (18:47 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 14 Jan 2018 09:11:26 +0000 (09:11 +0000)
Fixed:
$ oe-selftest -r devtool.DevtoolTests.test_create_workspace
[snip]
2017-12-20 18:28:59,404 - oe-selftest - INFO - Traceback (most recent call last):
  File "/workspace2/lyang1/poky/meta/lib/oeqa/core/decorator/__init__.py", line 32, in wrapped_f
    return func(*args, **kwargs)
  File "/workspace2/lyang1/poky/meta/lib/oeqa/selftest/cases/devtool.py", line 177, in test_create_workspace
    self.assertTrue('/workspace' not in result.output, 'This test cannot be run with a workspace layer in bblayers.conf')
AssertionError: False is not true : This test cannot be run with a workspace layer in bblayers.conf
[snip]

$ bitbake-layers show-layers
NOTE: Starting bitbake server...
layer                 path                                      priority
==========================================================================
meta                  /workspace2/lyang1/poky/meta              5
meta-poky             /workspace2/lyang1/poky/meta-poky         5
meta-yocto-bsp        /workspace2/lyang1/poky/meta-yocto-bsp    5
meta-selftest         /workspace2/lyang1/poky/meta-selftest     5

There is no workspace layer, but I'm in /workspace2, this patch can fix the problem.

[YOCTO #12442]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oeqa/selftest/cases/devtool.py

index 6989de939e9a098de0e959f4d63871c3b5277a8f..67df5819430fcaa7ec2b7c7f7784683001868911 100644 (file)
@@ -174,7 +174,7 @@ class DevtoolTests(DevtoolBase):
     def test_create_workspace(self):
         # Check preconditions
         result = runCmd('bitbake-layers show-layers')
-        self.assertTrue('/workspace' not in result.output, 'This test cannot be run with a workspace layer in bblayers.conf')
+        self.assertTrue('\nworkspace' not in result.output, 'This test cannot be run with a workspace layer in bblayers.conf')
         # Try creating a workspace layer with a specific path
         tempdir = tempfile.mkdtemp(prefix='devtoolqa')
         self.track_for_cleanup(tempdir)