]> code.ossystems Code Review - openembedded-core.git/commitdiff
testsdk.py: remove workspace/sources to avoid failure in case of multilib
authorChen Qi <Qi.Chen@windriver.com>
Tue, 29 Sep 2020 03:22:15 +0000 (11:22 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 30 Sep 2020 14:01:47 +0000 (15:01 +0100)
When multilib is enabled, there are multiple environment scripts, and the
test cases for eSDK are executed for each environment script.

And we will have the following problem when executing test cases for the
second environment script.

  ERROR: Source tree path /.../workspace/sources/librdfa already exists and is not empty

So after executing test cases for one environment, we clean up the sources
diretory to avoid such failure.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/sdkext/testsdk.py

index c5c46df6cda33193aedcb02319f725ed1cc229c3..ffd185ec55f43a0712542a2153b16f142c23dbef 100644 (file)
@@ -99,6 +99,9 @@ class TestSDKExt(TestSDKBase):
             if not result.wasSuccessful():
                 fail = True
 
+            # Clean the workspace/sources to avoid `devtool add' failure because of non-empty source directory
+            bb.utils.remove(sdk_dir+'workspace/sources', True)
+
         if fail:
             bb.fatal("%s - FAILED - check the task log and the commands log" % pn)