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