tests/idxdiff-2
raw| 1 | #! /bin/sh |
| 2 | # |
| 3 | # Check whether idx1 and idx3 indices are same. |
| 4 | # |
| 5 | # idx1: simply indexed. |
| 6 | # idx3: indexed with --checkpoint and $ON_MEMORY_MAX is 0. |
| 7 | # |
| 8 | LOG=`pwd`/test-log |
| 9 | echo ' *** starting ' $0 >>$LOG |
| 10 | |
| 11 | cd idx1 |
| 12 | targets=`find . -type f -name 'NMZ.*' -print | \ |
| 13 | egrep -v "NMZ\.(log|r|slog|status|err)$"` # Exclude them. |
| 14 | cd .. |
| 15 | |
| 16 | for target in $targets; do |
| 17 | diff "idx1/$target" "idx3/$target" |
| 18 | test "$?" != "0" && exit 1 # error if not success |
| 19 | done |
| 20 | exit 0 |