From: Naftaly RALAMBOARIVONY <[email protected]>

Add an optional extra_args parameter to test() and append it to the
patchtest command when provided.

Signed-off-by: Naftaly RALAMBOARIVONY <[email protected]>
---
 meta/lib/patchtest/selftest/selftest | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/lib/patchtest/selftest/selftest 
b/meta/lib/patchtest/selftest/selftest
index 43cccf4c85..51681bec38 100755
--- a/meta/lib/patchtest/selftest/selftest
+++ b/meta/lib/patchtest/selftest/selftest
@@ -130,11 +130,14 @@ def git_detach_head():
     return get_git_state()
 
 # Once the tests are in oe-core, we can remove the testdir param and use 
os.path.dirname to get relative paths
-def test(root, patch):
+def test(root, patch, extra_args=None):
     res = True
     patchpath = os.path.abspath(os.path.join(root, patch))
     
     cmd     = 'patchtest --base-commit HEAD --repodir %s --testdir %s/tests 
--patch %s' % (repodir, topdir, patchpath)
+    if extra_args:
+        cmd += " " + extra_args
+
     results = subprocess.check_output(cmd, stderr=subprocess.STDOUT, 
universal_newlines=True, shell=True)
 
     return results
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#233413): 
https://lists.openembedded.org/g/openembedded-core/message/233413
Mute This Topic: https://lists.openembedded.org/mt/118385557/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to