7 # DiffOutput.sh <diff&opts> <testtype> <testname> [<goodoutput>]
10 # DiffOutput.sh looks for a file named Output/<testname>.out-<testtype>
11 # and uses GNU diff to compare it against the file
12 # Output/<testname>.out-<goodoutput>. This script is used to verify the
13 # results of programs run in the LLVM test suite. By default,
14 # <goodoutput> is "nat"; that is, test results are compared with output
15 # from the program compiled with the native compiler.
16 # If the files differ, DiffOutput.sh prints a portion of the
20 # DiffOutput.sh always exits with a zero (successful) exit code.
23 # Command line parameters:
29 DIFFOUTPUT
=Output
/${PROG}.diff-
${WHICHOUTPUT}
31 TESTOUTPUT
=Output
/${PROG}.out-
${WHICHOUTPUT}
32 GOODOUTPUT
=Output
/${PROG}.out-
${GOODOUTPUT}
35 $DIFF $GOODOUTPUT $TESTOUTPUT > $DIFFOUTPUT 2>&1 ||
(
37 echo "******************** TEST ($WHICHOUTPUT) '$PROG' FAILED! ********************"
38 echo "Execution Context Diff:"
39 head -n 200 $DIFFOUTPUT |
cat -v
41 echo "******************** TEST ($WHICHOUTPUT) '$PROG' ****************************"