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

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