Skip to content

Commit

Permalink
Corrected python script for Neon testing in gh action
Browse files Browse the repository at this point in the history
Exit code 1 is no more reported so that we can get the list of all failing tests.
  • Loading branch information
christophe0606 committed Jan 23, 2025
1 parent 17950e4 commit a9dda51
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/runneontest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
cd build
cmake -G "Unix Makefiles" ..
cmake -G "Ninja" ..
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
Expand All @@ -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
Expand Down
7 changes: 5 additions & 2 deletions Testing/processResult.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ def printTest(self,elem, theId, theError,errorDetail,theLine,passed,cycles,param
print("</tr>")

if passed != 1:

print("<tr><td colspan=4><font color=\"red\">%s at line %d</font></td></tr>" % (errorStr(theError), theLine))
if (len(errorDetail)>0):
print("<tr><td colspan=4><font color=\"red\">" + errorDetail + "</font></td></tr>")
Expand Down Expand Up @@ -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()

Expand All @@ -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()

0 comments on commit a9dda51

Please sign in to comment.