From 42354876de823f52a431eac900d360c074c6198d Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 15 Jul 2021 14:56:58 -0300 Subject: aux/lib.sh: Add mkstemp and mkdtemp, and copy uuid over The tests were relying on the unspecified and non-standartized behaviour of "mktemp". Now they use "mkstemp()", a shim sh function to provide the expected behaviour, and an accompanying "mkdtemp()" function is also defined. To further decouple from specific implementations and OS-behaviours and quirks, a aux/lib.sh file containing both those functions was added. Its purpose is to also allow code under aux/ to not depend on specific behaviour. "mkdtemp()" had to be replicated in aux/ci/ci-build.sh, since it runs outside the repository. --- aux/ci/report.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'aux/ci/report.sh') diff --git a/aux/ci/report.sh b/aux/ci/report.sh index 710451c..a90d10a 100755 --- a/aux/ci/report.sh +++ b/aux/ci/report.sh @@ -2,6 +2,8 @@ set -eu TLD="$(cat aux/tld.txt)" +. aux/lib.sh + while getopts 'n:o:' flag; do case "$flag" in n) @@ -32,7 +34,7 @@ FAIL='❌' mkdir -p "$OUTDIR/ci-logs" "$OUTDIR/ci-data" -OUT="$(mktemp)" +OUT="$(mkstemp)" chmod 644 "$OUT" git fetch origin refs/notes/ci-data:refs/notes/ci-data ||: & -- cgit v1.2.3