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

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