From 345fcfecc120dfa5036ecdf0b70847094ffd3433 Mon Sep 17 00:00:00 2001 From: lugi0 Date: Wed, 12 Jun 2024 09:56:19 +0200 Subject: [PATCH 1/2] fix mktemp on macOS Signed-off-by: lugi0 --- ods_ci/run_robot_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ods_ci/run_robot_test.sh b/ods_ci/run_robot_test.sh index 1a51ab99b..7e5ab6330 100755 --- a/ods_ci/run_robot_test.sh +++ b/ods_ci/run_robot_test.sh @@ -362,7 +362,7 @@ if ! ${SUBFOLDER}; then case "$(uname -s)" in Darwin) # shellcheck disable=SC2046 - TEST_ARTIFACT_DIR=$(mktemp -d "${TEST_ARTIFACT_DIR}" -t "${TEST_ARTIFACT_DIR}"/ods-ci-$(date +%Y-%m-%d-%H-%M)-XXXXXXXXXX) + TEST_ARTIFACT_DIR=$(mktemp -d -t ods-ci-$(date +%Y-%m-%d-%H-%M)-XXXXXXXXXX) -p "${TEST_ARTIFACT_DIR}" ;; Linux) # shellcheck disable=SC2046 From a5eca989b5921d103f55d4382a2994c623dee756 Mon Sep 17 00:00:00 2001 From: lugi0 Date: Wed, 12 Jun 2024 11:46:23 +0200 Subject: [PATCH 2/2] use single case for both Linux and MacOS Signed-off-by: lugi0 --- ods_ci/run_robot_test.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ods_ci/run_robot_test.sh b/ods_ci/run_robot_test.sh index 7e5ab6330..4c7e11a54 100755 --- a/ods_ci/run_robot_test.sh +++ b/ods_ci/run_robot_test.sh @@ -360,14 +360,14 @@ if [[ ! -d "${TEST_ARTIFACT_DIR}" ]]; then fi if ! ${SUBFOLDER}; then case "$(uname -s)" in - Darwin) - # shellcheck disable=SC2046 - TEST_ARTIFACT_DIR=$(mktemp -d -t ods-ci-$(date +%Y-%m-%d-%H-%M)-XXXXXXXXXX) -p "${TEST_ARTIFACT_DIR}" - ;; - Linux) - # shellcheck disable=SC2046 - TEST_ARTIFACT_DIR=$(mktemp -d -p "${TEST_ARTIFACT_DIR}" -t ods-ci-$(date +%Y-%m-%d-%H-%M)-XXXXXXXXXX) - ;; + Darwin | Linux) + # shellcheck disable=SC2046 + echo "Currently using the same mktemp command on Linux and MacOS" + TEST_ARTIFACT_DIR=$(mktemp -d -p "${TEST_ARTIFACT_DIR}" -t ods-ci-$(date +%Y-%m-%d-%H-%M)-XXXXXXXXXX) + ;; + *) + echo "Unrecognized OS" + ;; esac fi