aboutsummaryrefslogtreecommitdiff
path: root/DiffOutput.sh
blob: 054cedab1ee1a8855e9975791b09119b4dbd82cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
#
# Program:  DiffOutput.sh
#
# Synopsis: Check two output files for program executions and make sure they
#           match.
#
# Syntax:  ./DiffOutput [lli|llc] <testname>
#

# DIFFOUTPUT - The output filename to make
DIFFOUTPUT=Output/$2.diff.$1

# Diff the two files.
gdiff -u Output/$2.out.nat Output/$2.out.$1 > $DIFFOUTPUT || (
  # They are different!
  echo "******************** TEST '$2' FAILED! ********************"
  echo "Execution Context Diff:"
  cat $DIFFOUTPUT
  rm $DIFFOUTPUT
  echo "******************** TEST '$2' FAILED! ********************"
)