Last change
on this file since 290 was
174,
checked in by tim, 15 years ago
|
minor improvements to test scripts
|
-
Property svn:executable set to
*
|
File size:
714 bytes
|
Rev | Line | |
---|
[174] | 1 | #!/bin/sh |
---|
| 2 | |
---|
| 3 | mkdir -p tmp |
---|
| 4 | TMP_DIR=tmp |
---|
| 5 | OUTPUT_DIR=tmp |
---|
| 6 | |
---|
| 7 | OLD=reglookup-recover |
---|
| 8 | NEW=../trunk/build/bin/reglookup-recover |
---|
| 9 | |
---|
| 10 | |
---|
| 11 | compareOneFile() |
---|
| 12 | { |
---|
| 13 | echo "Comparing output on $BNAME, test case: $CASE" 1>&2 |
---|
| 14 | |
---|
| 15 | echo " $OLD $OPTS $F" 1>&2 |
---|
| 16 | $OLD $OPTS $F > $TMP_DIR/old.csv |
---|
| 17 | |
---|
| 18 | echo " $NEW $OPTS $F" 1>&2 |
---|
| 19 | $NEW $OPTS $F > $TMP_DIR/new.csv |
---|
| 20 | |
---|
| 21 | diff -ud $TMP_DIR/old.csv $TMP_DIR/new.csv > $OUTPUT_DIR/$CASE-${BNAME}.diff |
---|
| 22 | SIZE=`stat -c '%s' $OUTPUT_DIR/$CASE-${BNAME}.diff` |
---|
| 23 | if [ "x$SIZE" = "x0" ]; then |
---|
| 24 | rm $OUTPUT_DIR/$CASE-${BNAME}.diff |
---|
| 25 | fi |
---|
| 26 | } |
---|
| 27 | |
---|
| 28 | for F in hives/*; do |
---|
| 29 | { |
---|
| 30 | |
---|
| 31 | BNAME=`basename $F` |
---|
| 32 | |
---|
| 33 | CASE=basic |
---|
| 34 | OPTS='' |
---|
| 35 | compareOneFile |
---|
| 36 | |
---|
| 37 | CASE=raw |
---|
| 38 | OPTS='-r' |
---|
| 39 | compareOneFile |
---|
| 40 | } done |
---|
| 41 | |
---|
| 42 | rm $TMP_DIR/old.csv $TMP_DIR/new.csv |
---|
Note: See
TracBrowser
for help on using the repository browser.