mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-20 07:00:08 +01:00
test: Add script to summarize the test results from a run
This commit is contained in:
parent
e0963f6c8e
commit
60c2f69535
1 changed files with 29 additions and 0 deletions
29
test/summarize-test-results.sh
Executable file
29
test/summarize-test-results.sh
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Must be run from inside a test/output directory after a cairo
|
||||
# test has finished running.
|
||||
|
||||
grep -h ^TEST *.log > results.txt
|
||||
echo "Results written to results.txt"
|
||||
|
||||
total=$(grep "RESULT:" results.txt | wc -l)
|
||||
total_pass=$(grep "RESULT: PASS" results.txt | wc -l)
|
||||
total_fail=$(grep "RESULT: FAIL" results.txt | wc -l)
|
||||
total_xfail=$(grep "RESULT: XFAIL" results.txt | wc -l)
|
||||
total_error=$(grep "RESULT: ERROR" results.txt | wc -l)
|
||||
total_crash=$(grep "RESULT: CRASHED" results.txt | wc -l)
|
||||
total_untested=$(grep "RESULT: UNTESTED" results.txt | wc -l)
|
||||
total_calc=$((total_pass + total_fail + total_error + total_xfail + total_crash + total_untested))
|
||||
|
||||
echo "#######" | tee -a results.txt
|
||||
echo "# Tests run: $total" | tee -a results.txt
|
||||
echo "# Passed: $total_pass" | tee -a results.txt
|
||||
echo "# Failed: $total_fail" | tee -a results.txt
|
||||
echo "# Expected Failed: $total_xfail" | tee -a results.txt
|
||||
echo "# Error: $total_error" | tee -a results.txt
|
||||
echo "# Crashed: $total_crash" | tee -a results.txt
|
||||
echo "# Untested: $total_untested" | tee -a results.txt
|
||||
echo "# Total: $total_calc" | tee -a results.txt
|
||||
echo "#######" | tee -a results.txt
|
||||
|
||||
|
||||
Loading…
Add table
Reference in a new issue