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

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