Last change
on this file since 264 was
174,
checked in by tim, 15 years ago
|
minor improvements to test scripts
|
-
Property svn:executable set to
*
|
File size:
811 bytes
|
Rev | Line | |
---|
[171] | 1 | #!/bin/sh |
---|
| 2 | |
---|
| 3 | mkdir -p tmp |
---|
| 4 | TMP_DIR=tmp |
---|
| 5 | OUTPUT_DIR=tmp |
---|
| 6 | |
---|
| 7 | OLD=reglookup |
---|
| 8 | NEW=../trunk/build/bin/reglookup |
---|
| 9 | |
---|
| 10 | |
---|
| 11 | compareOneFile() |
---|
| 12 | { |
---|
[174] | 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` |
---|
[171] | 23 | if [ "x$SIZE" = "x0" ]; then |
---|
[174] | 24 | rm $OUTPUT_DIR/$CASE-${BNAME}.diff |
---|
[171] | 25 | fi |
---|
| 26 | } |
---|
| 27 | |
---|
| 28 | for F in hives/*; do |
---|
| 29 | { |
---|
| 30 | BNAME=`basename $F` |
---|
| 31 | |
---|
[174] | 32 | CASE=basic |
---|
[171] | 33 | OPTS='' |
---|
| 34 | compareOneFile |
---|
| 35 | |
---|
[174] | 36 | CASE=security |
---|
[171] | 37 | OPTS='-s' |
---|
| 38 | compareOneFile |
---|
| 39 | |
---|
[174] | 40 | CASE=type |
---|
[171] | 41 | OPTS='-t MULTI_SZ' |
---|
| 42 | compareOneFile |
---|
| 43 | |
---|
[174] | 44 | CASE=security+type |
---|
[171] | 45 | OPTS='-s -t KEY' |
---|
| 46 | compareOneFile |
---|
| 47 | } done |
---|
| 48 | |
---|
| 49 | rm $TMP_DIR/old.csv $TMP_DIR/new.csv |
---|
Note: See
TracBrowser
for help on using the repository browser.