Check test suit preparation exit code
@@ -20,7 +20,12 @@ def run(pytest, output_file, repeatUntilFailure, testDir, test_slice):
log("Is going to repeat the test suite until failure")
log("Preparing test suite with {}".format(pytest))
testListFile = "test_list.txt"
- os.system('{} --collect-only {} > {}'.format(pytest, testDir, testListFile))
+ collect_status = os.system('{} --collect-only {} > {}'.format(pytest, testDir, testListFile))
+
+ if collect_status != 0:
+ log("Test suit preparation error {}".format(collect_status))
+ return -1
+
log("Reading collected modules file")
collectedData = open(testListFile).read()
os.remove(testListFile)
