Log reftest results as HTML

This commit is contained in:
Martin Stransky 2021-03-02 08:11:18 +01:00
parent 2859c0f127
commit eda702a952
4 changed files with 21 additions and 5 deletions

View File

@ -201,11 +201,12 @@ Source34: firefox-search-provider.ini
Source35: google-loc-api-key Source35: google-loc-api-key
Source37: mochitest-python.tar.gz Source37: mochitest-python.tar.gz
Source38: print_results Source38: print_results
Source39: perrors Source39: print-errors
Source40: run-tests-x11 Source40: run-tests-x11
Source41: run-tests-wayland Source41: run-tests-wayland
Source42: psummary Source42: psummary
Source43: print_failures Source43: print_failures
Source44: print-error-reftest
# Build patches # Build patches
Patch3: mozilla-build-arm.patch Patch3: mozilla-build-arm.patch
@ -792,7 +793,7 @@ find-links=`pwd`/mochitest-python
no-index=true no-index=true
EOF EOF
tar xf %{SOURCE37} tar xf %{SOURCE37}
cp %{SOURCE40} %{SOURCE41} %{SOURCE42} %{SOURCE38} %{SOURCE39} %{SOURCE43} . cp %{SOURCE40} %{SOURCE41} %{SOURCE42} %{SOURCE38} %{SOURCE39} %{SOURCE43} %{SOURCE44} .
mkdir -p test_results mkdir -p test_results
%if %{test_on_wayland} %if %{test_on_wayland}
./run-tests-wayland %{test_offscreen} || true ./run-tests-wayland %{test_offscreen} || true

13
print-error-reftest Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/bash
# Print reftest failures and compose them to html
TEST_DIR="$1"
TEST_FLAVOUR="$2"
OUTPUT_FILE="failures-reftest$TEST_FLAVOUR.html"
grep --text -e "REFTEST TEST-UNEXPECTED-PASS" -e "REFTEST TEST-UNEXPECTED-FAIL" -e "IMAGE 1 (TEST):" -e "IMAGE 2 (REFERENCE):" $TEST_DIR/reftest$TEST_FLAVOUR 2>&1 > $OUTPUT_FILE
sed -i '/REFTEST IMAGE 1/a ">' $OUTPUT_FILE
sed -i '/REFTEST IMAGE 2/a "><BR><BR>' $OUTPUT_FILE
sed -i '/REFTEST TEST/a <BR>' $OUTPUT_FILE
sed -i -e 's/^REFTEST IMAGE 1 (TEST): /<img border=2 src="/' $OUTPUT_FILE
sed -i -e 's/^REFTEST IMAGE 2 (REFERENCE): /<img border=2 src="/' $OUTPUT_FILE

View File

@ -6,4 +6,4 @@ TEST_FLAVOUR=$2
grep "TEST-UNEXPECTED-FAIL" $TEST_DIR/mochitest$TEST_FLAVOUR 2>&1 > failures-mochitest$TEST_FLAVOUR grep "TEST-UNEXPECTED-FAIL" $TEST_DIR/mochitest$TEST_FLAVOUR 2>&1 > failures-mochitest$TEST_FLAVOUR
grep --text " FAIL " $TEST_DIR/xpcshell$TEST_FLAVOUR 2>&1 > failures-xpcshell$TEST_FLAVOUR grep --text " FAIL " $TEST_DIR/xpcshell$TEST_FLAVOUR 2>&1 > failures-xpcshell$TEST_FLAVOUR
grep --text "REFTEST TEST-UNEXPECTED-FAIL" $TEST_DIR/reftest$TEST_FLAVOUR 2>&1 > failures-reftest$TEST_FLAVOUR grep --text -e "REFTEST TEST-UNEXPECTED-PASS" -e "REFTEST TEST-UNEXPECTED-FAIL" $TEST_DIR/reftest$TEST_FLAVOUR 2>&1 > failures-reftest$TEST_FLAVOUR

View File

@ -3,5 +3,7 @@
export TEST_DIR="test_results" export TEST_DIR="test_results"
./perrors $TEST_DIR "" ./print-errors $TEST_DIR ""
./perrors $TEST_DIR "-wr" ./print-errors $TEST_DIR "-wr"
./print-error-reftest $TEST_DIR ""
./print-error-reftest $TEST_DIR "-wr"