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

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