From b95137623569df4bd170e6a6906b5d0fc5e3fc8f Mon Sep 17 00:00:00 2001 From: David Declerck Date: Mon, 11 Dec 2023 13:28:40 +0100 Subject: [PATCH] Fix testsuite 8, 808 and 809 on Windows/MSYS2 --- tests/testsuite.src/used_binaries.at | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/testsuite.src/used_binaries.at b/tests/testsuite.src/used_binaries.at index d7266092..a15e915b 100644 --- a/tests/testsuite.src/used_binaries.at +++ b/tests/testsuite.src/used_binaries.at @@ -396,11 +396,16 @@ AT_DATA([prog.cob], [ EXIT PROGRAM. ]) -AT_CHECK([TMPDIR="" TMP="notthere" TEMP="" $COMPILE prog.cob], [0], [], +# Note: on Windows, GCC/MinGW randomly fails when it can't access the temporary directory, +# so we only perform the COBOL-to-C translation. This is sufficient since the error we want +# to check is a compile-time error. Note that we nevertheless perform a full compilation +# afterwards, without tweaking the temporary, so that we can test the actual execution. +AT_CHECK([TMPDIR="" TMP="notthere" TEMP="" $COMPILE_ONLY prog.cob], [0], [], [libcob: warning: Temporary directory TMP is invalid, adjust TMPDIR! ]) +AT_CHECK([$COMPILE prog.cob], [0], [], []) AT_CHECK([$COBCRUN_DIRECT ./prog], [0], [OK], []) -AT_CHECK([TMPDIR="" TMP="" TEMP="./prog.cob" $COMPILE prog.cob], [0], [], +AT_CHECK([TMPDIR="" TMP="" TEMP="./prog.cob" $COMPILE_ONLY prog.cob], [0], [], [libcob: warning: Temporary directory TEMP is invalid, adjust TMPDIR! ]) # TMPDIR is only checked when actually needed which is currently only the case