summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-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: