Skip to content

Commit

Permalink
Add the list of fail ids at the end of the script.
Browse files Browse the repository at this point in the history
  • Loading branch information
kouchy committed Jan 31, 2018
1 parent 44657a2 commit 35f5556
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions ci/test-regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def getFileNames(currentPath, fileNames):
else:
print("# (WW) There is no simulation to replay.")

failIds = []
nErrors = 0
testId = 0
for fn in fileNames:
Expand Down Expand Up @@ -212,6 +213,8 @@ def getFileNames(currentPath, fileNames):
print(" - ABORTED.", end="\n");
print("Error message:", end="\n");
print(err)
nErrors = nErrors +1
failIds.append(testId +1)
else:
# begin to write the results into a file
os.chdir(PathOrigin)
Expand Down Expand Up @@ -279,6 +282,7 @@ def getFileNames(currentPath, fileNames):
else:
print(" - FAILED.", end="\n");
nErrors = nErrors +1
failIds.append(testId +1)

if args.verbose:
avgSensibility = 0
Expand Down Expand Up @@ -319,6 +323,22 @@ def getFileNames(currentPath, fileNames):

testId = testId + 1


if len(fileNames) - (args.startId -1) > 0:
if nErrors == 0:
print("# (II) All the tests PASSED !", end="\n");
else:
print("# (II) Some tests FAILED: ", end="")
f = 0
for failId in failIds:
print("n°", end="")
print(str(failId), end="")
if f == len(failIds) -1:
print(".", end="\n")
else:
print(", ", end="")
f = f + 1

sys.exit(nErrors);

# ======================================================================== MAIN
Expand Down

0 comments on commit 35f5556

Please sign in to comment.