From a9dda511ae79a1f64627809029d454f356526c0b Mon Sep 17 00:00:00 2001 From: Christophe Favergeon Date: Thu, 23 Jan 2025 09:57:13 +0100 Subject: [PATCH] Corrected python script for Neon testing in gh action Exit code 1 is no more reported so that we can get the list of all failing tests. --- .github/workflows/runneontest.yaml | 14 +++++++------- Testing/processResult.py | 7 +++++-- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/runneontest.yaml b/.github/workflows/runneontest.yaml index b1c458384..6803e8eb4 100644 --- a/.github/workflows/runneontest.yaml +++ b/.github/workflows/runneontest.yaml @@ -65,7 +65,7 @@ jobs: cd build - cmake -G "Unix Makefiles" .. + cmake -G "Ninja" .. - name: Setup tmate session uses: mxschmitt/action-tmate@v3 @@ -75,27 +75,27 @@ jobs: cd Testing/build python ../processTests.py -p ../Patterns -d ../Parameters -gen .. -e -f ../Output.pickle - make VERBOSE=1 + ninja ./test > result.txt - python ../processResult.py -e -f ../Output.pickle -r result.txt -html > result.html + python ../processResult.py --noerr -e -f ../Output.pickle -r result.txt -html > result.html - name: Execute neon specific C tests run: | cd Testing/build python ../processTests.py -p ../Patterns -d ../Parameters -gen .. -e -f ../Output_neon.pickle - make + ninja ./test > result_neon.txt - python ../processResult.py -e -f ../Output_neon.pickle -r result_neon.txt -html > result_neon.html + python ../processResult.py --noerr -e -f ../Output_neon.pickle -r result_neon.txt -html > result_neon.html - name: Execute f16 C tests run: | cd Testing/build python ../processTests.py -p ../Patterns -d ../Parameters -gen .. -e -f ../Output_f16.pickle - make + ninja ./test > result_f16.txt - python ../processResult.py -e -f ../Output_f16.pickle -r result_f16.txt -html > result_f16.html + python ../processResult.py --noerr -e -f ../Output_f16.pickle -r result_f16.txt -html > result_f16.html - name: Upload test report uses: actions/upload-artifact@v4 diff --git a/Testing/processResult.py b/Testing/processResult.py index baecc0880..0d2f9d09c 100644 --- a/Testing/processResult.py +++ b/Testing/processResult.py @@ -185,7 +185,6 @@ def printTest(self,elem, theId, theError,errorDetail,theLine,passed,cycles,param print("") if passed != 1: - print("%s at line %d" % (errorStr(theError), theLine)) if (len(errorDetail)>0): print("" + errorDetail + "") @@ -578,6 +577,7 @@ def analyze(root,results,args,trace): parser.add_argument('-b', nargs='?',type = str, default="FullBenchmark", help="Full Benchmark dir path") parser.add_argument('-m', action='store_true', help="Mathematica output") parser.add_argument('-t', nargs='?',type = str, default=None, help="External trace file") +parser.add_argument('--noerr', action='store_true', help="Exit code forced to 0") args = parser.parse_args() @@ -601,7 +601,10 @@ def analyze(root,results,args,trace): with open(args.r,"r") as results: extractDataFiles(results,args.o) - sys.exit(resultStatus) + if args.noerr: + sys.exit(0) + else: + sys.exit(resultStatus) else: parser.print_help() \ No newline at end of file