[OE-core] [PATCH] oeqa/runexported: Add ability to run tests grouped in folders.
Lucian Musat
george.l.musat at intel.com
Tue Oct 13 13:43:21 UTC 2015
It can accept parameters like oeqa.runtime.<foldername> and it
will run all test files from that folder.
Also a small fix for detecting ssh_target_log symlink when it
points to a nonexisting file.
Signed-off-by: Lucian Musat <george.l.musat at intel.com>
---
meta/lib/oeqa/runexported.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/runexported.py b/meta/lib/oeqa/runexported.py
index d273d2f..c3ce79a 100755
--- a/meta/lib/oeqa/runexported.py
+++ b/meta/lib/oeqa/runexported.py
@@ -49,7 +49,7 @@ class FakeTarget(object):
def exportStart(self):
self.sshlog = os.path.join(self.testdir, "ssh_target_log.%s" % self.datetime)
sshloglink = os.path.join(self.testdir, "ssh_target_log")
- if os.path.exists(sshloglink):
+ if os.path.lexists(sshloglink):
os.remove(sshloglink)
os.symlink(self.sshlog, sshloglink)
print("SSH log file: %s" % self.sshlog)
@@ -138,6 +138,12 @@ def main():
for test in tc.testslist:
print test
else:
+ for index, test in enumerate(tc.testslist):
+ if os.path.isdir(os.sep.join(test.split('.'))):
+ del tc.testslist[index]
+ for files in os.listdir(os.sep.join(test.split('.'))):
+ if (files.endswith(".py")) and not files.startswith("_"):
+ tc.testslist.insert(index, test+'.'+files.split('.')[0])
target.exportStart()
runTests(tc)
--
2.1.4
More information about the Openembedded-core
mailing list