Merge pull request #2765 from citusdata/fix_diff

Fix test name detection in bin/diff
pull/2772/head
Hadi Moshayedi 2019-06-17 12:39:34 +02:00 committed by GitHub
commit ee37e3da89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -12,7 +12,12 @@
file1="${@:(-2):1}" file1="${@:(-2):1}"
file2="${@:(-1):1}" file2="${@:(-1):1}"
test=$(basename $file1 .out) # pg_regress passes the expected file as the first argument ($file1 above),
# and results file as the second argument ($file2 above). We take the base
# filename of the expected file as the test name. We can have multiple
# expected files for a single test with _0, _1, ... suffixes.
# So for the test name, we also strip the additional suffix.
test=$(basename $file1 .out | sed -E "s/_[0-9]+$//")
args=${@:1:$#-2} args=${@:1:$#-2}
BASEDIR=$(dirname "$0") BASEDIR=$(dirname "$0")