summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Stransky <stransky@redhat.com>2021-03-02 08:11:18 +0100
committerMartin Stransky <stransky@redhat.com>2021-03-02 08:11:18 +0100
commiteda702a95211a18d2e247dd7dfff7029e707c2c0 (patch)
tree20c4c0c1f5e39c3773e29350ce9ddb2580353ada
parentRun xpcshell tests sequential (diff)
downloadlibrewolf-fedora-ff-eda702a95211a18d2e247dd7dfff7029e707c2c0.tar.gz
librewolf-fedora-ff-eda702a95211a18d2e247dd7dfff7029e707c2c0.tar.bz2
librewolf-fedora-ff-eda702a95211a18d2e247dd7dfff7029e707c2c0.zip
Log reftest results as HTML
-rw-r--r--firefox.spec5
-rwxr-xr-xprint-error-reftest13
-rwxr-xr-xprint-errors (renamed from perrors)2
-rwxr-xr-xprint_failures6
4 files changed, 21 insertions, 5 deletions
diff --git a/firefox.spec b/firefox.spec
index c6ee5f7..857aa37 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -201,11 +201,12 @@ Source34: firefox-search-provider.ini
Source35: google-loc-api-key
Source37: mochitest-python.tar.gz
Source38: print_results
-Source39: perrors
+Source39: print-errors
Source40: run-tests-x11
Source41: run-tests-wayland
Source42: psummary
Source43: print_failures
+Source44: print-error-reftest
# Build patches
Patch3: mozilla-build-arm.patch
@@ -792,7 +793,7 @@ find-links=`pwd`/mochitest-python
no-index=true
EOF
tar xf %{SOURCE37}
-cp %{SOURCE40} %{SOURCE41} %{SOURCE42} %{SOURCE38} %{SOURCE39} %{SOURCE43} .
+cp %{SOURCE40} %{SOURCE41} %{SOURCE42} %{SOURCE38} %{SOURCE39} %{SOURCE43} %{SOURCE44} .
mkdir -p test_results
%if %{test_on_wayland}
./run-tests-wayland %{test_offscreen} || true
diff --git a/print-error-reftest b/print-error-reftest
new file mode 100755
index 0000000..7a58c1c
--- /dev/null
+++ b/print-error-reftest
@@ -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
diff --git a/perrors b/print-errors
index 537a4d0..b3ddba6 100755
--- a/perrors
+++ b/print-errors
@@ -6,4 +6,4 @@ TEST_FLAVOUR=$2
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 "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
diff --git a/print_failures b/print_failures
index 3827601..e3b8b63 100755
--- a/print_failures
+++ b/print_failures
@@ -3,5 +3,7 @@
export TEST_DIR="test_results"
-./perrors $TEST_DIR ""
-./perrors $TEST_DIR "-wr"
+./print-errors $TEST_DIR ""
+./print-errors $TEST_DIR "-wr"
+./print-error-reftest $TEST_DIR ""
+./print-error-reftest $TEST_DIR "-wr"
bgstack15