summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib/selftests
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2014-01-17 09:28:58 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-18 09:19:38 +0100
commitf504287e80e55442620343227a99000d84ad603a (patch)
tree171c714c8fe87d6f11439da5586fd905612a485c /tests/auto/testlib/selftests
parent30e677e2bb21f45bbb3bc538d6c02f20dbbdfb11 (diff)
Testlib/generate_expected_output.py: Pass tests as command line arguments.
Evaluate command line arguments and use directories only when empty. Change-Id: I818ec13c686018a3f607e91174e57d8f8bbf15f7 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Diffstat (limited to 'tests/auto/testlib/selftests')
-rwxr-xr-xtests/auto/testlib/selftests/generate_expected_output.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/auto/testlib/selftests/generate_expected_output.py b/tests/auto/testlib/selftests/generate_expected_output.py
index 3212bcda2e..049bd4f448 100755
--- a/tests/auto/testlib/selftests/generate_expected_output.py
+++ b/tests/auto/testlib/selftests/generate_expected_output.py
@@ -85,9 +85,11 @@ def replaceInFile(file):
sys.stdout.write(line)
def subdirs():
+ result = []
for path in os.listdir('.'):
if os.path.isdir('./' + path):
- yield path
+ result.append(path)
+ return result
def getTestForPath(path):
if isWindows:
@@ -111,8 +113,11 @@ if isWindows:
print("This script does not work on Windows.")
exit()
-print("Generating test results for: " + qtver + " in: " + rootPath)
-for path in subdirs():
+tests = sys.argv[1:]
+if len(tests) == 0:
+ tests = subdirs()
+print("Generating " + str(len(tests)) + " test results for: " + qtver + " in: " + rootPath)
+for path in tests:
if os.path.isfile(getTestForPath(path)):
generateTestData(path)
else: