73cc96
#!/usr/bin/bash
73cc96
# Analyze and print specialized (basic/webrender) test results
73cc96
73cc96
TEST_DIR=$1
73cc96
TEST_FLAVOUR=$2
73cc96
73cc96
MPASS=`grep "TEST_END: Test OK" $TEST_DIR/mochitest$TEST_FLAVOUR | wc -l`
73cc96
MERR=`grep "TEST_END: Test ERROR" $TEST_DIR/mochitest$TEST_FLAVOUR | wc -l`
73cc96
MUNEX=`grep "TEST-UNEXPECTED-FAIL" $TEST_DIR/mochitest$TEST_FLAVOUR | wc  -l`
73cc96
echo "Mochitest   PASSED: $MPASS FAILED: $MERR UNEXPECTED-FAILURES: $MUNEX"
73cc96
73cc96
XPCPASS=`grep --text "Expected results:" $TEST_DIR/xpcshell$TEST_FLAVOUR | cut -d ' ' -f 3`
73cc96
XPCFAIL=`grep --text "Unexpected results:" $TEST_DIR/xpcshell$TEST_FLAVOUR | cut -d ' ' -f 3`
73cc96
echo "XPCShell:   PASSED: $XPCPASS FAILED: $XPCFAIL"
73cc96
73cc96
CRPASS=`grep "REFTEST INFO | Successful:" $TEST_DIR/crashtest$TEST_FLAVOUR | cut -d ' ' -f 5`
73cc96
CRFAIL=`grep "^REFTEST INFO | Unexpected:" $TEST_DIR/crashtest$TEST_FLAVOUR | cut -d ' ' -f 5`
73cc96
echo "Crashtest:  PASSED: $CRPASS FAILED: $CRFAIL"
73cc96
73cc96
RFPASS=`grep --text "REFTEST INFO | Successful:" $TEST_DIR/reftest$TEST_FLAVOUR | cut -d ' ' -f 5`
73cc96
RFUN=`grep --text "^REFTEST INFO | Unexpected:" $TEST_DIR/reftest$TEST_FLAVOUR | cut -d ' ' -f 5`
73cc96
RFKNOWN=`grep --text "REFTEST INFO | Known problems:" $TEST_DIR/reftest$TEST_FLAVOUR | cut -d ' ' -f 6`
73cc96
echo "Reftest:    PASSED: $RFPASS FAILED: $RFUN Known issues: $RFKNOWN"