change(test): add an identifiable suffix to zcash-rpc-diff temp directories (#4577)

* Add an identifiable suffix to zcash-rpc-diff temp directories

* Explain why we need a fallback temp command

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
teor 2022-06-21 21:31:34 +10:00 committed by GitHub
parent 3a7c2c8926
commit 1f7e621e34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -27,7 +27,9 @@ fi
ZEBRAD_RPC_PORT=$1
shift
ZCASH_RPC_TMP_DIR=$(mktemp -d)
# Use an easily identified temp directory name,
# but fall back to the default temp name if `mktemp` does not understand `--suffix`.
ZCASH_RPC_TMP_DIR=$(mktemp --suffix=.rpc-diff -d 2>/dev/null || mktemp -d)
ZEBRAD_RELEASE_INFO="$ZCASH_RPC_TMP_DIR/first-check-getinfo.json"
ZCASHD_RELEASE_INFO="$ZCASH_RPC_TMP_DIR/second-check-getinfo.json"