Fix diff-canonifier-external to use basename of input file

Use basename of the input filename because sometimes it will have
directory components, such as for the baseline files.
This commit is contained in:
Daniel Thayer 2015-08-15 21:05:40 -05:00
parent ac5c4f117f
commit f3fb2b2f52

View file

@ -2,13 +2,15 @@
# #
# Default canonifier used with the trace-based tests in testing/external/*. # Default canonifier used with the trace-based tests in testing/external/*.
filename=`basename $1`
addl="cat" addl="cat"
if [ "$1" == "capture_loss.log" ]; then if [ "$filename" == "capture_loss.log" ]; then
addl="`dirname $0`/diff-remove-fractions" addl="`dirname $0`/diff-remove-fractions"
fi fi
if [ "$1" == "ssh.log" ]; then if [ "$filename" == "ssh.log" ]; then
addl="`dirname $0`/diff-remove-fields remote_location" addl="`dirname $0`/diff-remove-fields remote_location"
fi fi