diff mbox series

[V4,2/2] testsdk.py: ensure the testsdk directory is writable before removing it

Message ID 20221006112712.23062-3-liu.ming50@gmail.com
State New
Headers show
Series bluez5: change configuration directory mode | expand

Commit Message

Ming Liu Oct. 6, 2022, 11:27 a.m. UTC
From: Ming Liu <liu.ming50@gmail.com>

We have to make sure all users have write permission to testsdk
directory before removing it, this is to avoid potential 'rm' failures.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
 meta/lib/oeqa/sdk/testsdk.py | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series


diff --git a/meta/lib/oeqa/sdk/testsdk.py b/meta/lib/oeqa/sdk/testsdk.py
index 35e40187bc..e0179c9849 100644
--- a/meta/lib/oeqa/sdk/testsdk.py
+++ b/meta/lib/oeqa/sdk/testsdk.py
@@ -101,6 +101,10 @@  class TestSDK(TestSDKBase):
                 processes = None
         sdk_dir = d.expand("${WORKDIR}/testimage-sdk/")
+        # Ensure the Test SDK directory is writable for all users.
+        subprocess.check_output(['chmod', 'ugo+w', '-R', sdk_dir], stderr=subprocess.STDOUT)
         bb.utils.remove(sdk_dir, True)