summaryrefslogtreecommitdiff
path: root/print-error-reftest
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 /print-error-reftest
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
Diffstat (limited to 'print-error-reftest')
-rwxr-xr-xprint-error-reftest13
1 files changed, 13 insertions, 0 deletions
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
bgstack15