From 35f55568588a9e8872d7235288e5d3ede2d73fc5 Mon Sep 17 00:00:00 2001 From: Adrien Cassagne Date: Wed, 31 Jan 2018 10:50:56 +0100 Subject: [PATCH] Add the list of fail ids at the end of the script. --- ci/test-regression.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ci/test-regression.py b/ci/test-regression.py index 26b91b5de..c4227de27 100755 --- a/ci/test-regression.py +++ b/ci/test-regression.py @@ -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: @@ -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) @@ -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 @@ -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