| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | # Diff a test result against the reference log |
| 3 | # |
| 4 | # The reference log is in $T3_LOG |
| 5 | # The result file to compare is in $T3_OUT |
| 6 | # |
| 7 | # We'll store a .diff or a .succ file in $T3_OUT based on the result |
| 8 | |
| 9 | # clean up any old success/difference files we have hanging around |
| 10 | rmscip-shell system . . rm. -f $T3_OUT/$1.succ |
| 11 | rmscip-shell system . . rm. -f $T3_OUT/$1.diff |
| 12 | |
| 13 | if [scip-shell system . . `[`. ! -f $T3_OUT/$1.log ]; then |
| 14 | echoscip-shell system . . echo. 'Output file $T3_OUT/$1.log not created - test failed' > $T3_OUT/$1.diff |
| 15 | exit |
| 16 | fi |
| 17 | |
| 18 | diffscip-shell system . . diff. $T3_OUT/$1.log $T3_LOG/$1.log > $T3_OUT/$1.diff |
| 19 | if [scip-shell system . . `[`. $? = "0" ]; then |
| 20 | # test was successful, create the .succ file and remove .log and .diff |
| 21 | echoscip-shell system . . echo. Success > $T3_OUT/$1.succ |
| 22 | rmscip-shell system . . rm. $T3_OUT/$1.log |
| 23 | rmscip-shell system . . rm. $T3_OUT/$1.diff |
| 24 | fi |