12e947
#!/usr/bin/bash
12e947
# Print reftest failures and compose them to html
12e947
12e947
TEST_DIR="$1"
12e947
TEST_FLAVOUR="$2"
12e947
OUTPUT_FILE="failures-reftest$TEST_FLAVOUR.html"
12e947
12e947
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
12e947
sed -i '/REFTEST   IMAGE 1/a ">' $OUTPUT_FILE
12e947
sed -i '/REFTEST   IMAGE 2/a ">

' $OUTPUT_FILE
12e947
sed -i '/REFTEST TEST/a 
' $OUTPUT_FILE
12e947
sed -i -e 's/^REFTEST   IMAGE 1 (TEST): /
12e947
sed -i -e 's/^REFTEST   IMAGE 2 (REFERENCE): /