Skip to content

Commit 433680c

Browse files
committed
WIP: Merge with main. Use the not executable to check for crashes. Not tested
yet.
1 parent feac944 commit 433680c

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

Fortran/gfortran/CMakeLists.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -540,19 +540,17 @@ function(gfortran_add_execute_test expect_error main others fflags ldflags)
540540
get_filename_component(working_dir_name "${working_dir}" NAME)
541541

542542
llvm_test_executable_no_test(${target} ${main} ${others})
543-
llvm_test_run(WORKDIR "%S/${working_dir_name}")
544-
# FIXME: All we need is to negate the exit code. LLVM's not utility can do
545-
# this, but if it is not already installed on the system, it will have to be
546-
# obtained from LLVM's build directory. It is not clear that we can rely on
547-
# this when running the test suite.
543+
548544
if (WIN32)
549545
# Probably need to check %errorlevel% here.
550546
message(FATAL_ERROR "Verification not implemented on Windows.")
551547
else ()
552548
if (expect_error)
553-
llvm_test_verify(${TESTCMD} $? -ne 0)
549+
llvm_test_run(
550+
EXECUTABLE "%b/not --crash ${target}"
551+
WORKDIR "%S/${working_dir_name}")
554552
else ()
555-
llvm_test_verify(${TESTCMD} $? -eq 0)
553+
llvm_test_run(WORKDIR "%S/${working_dir_name}")
556554
endif ()
557555
endif ()
558556
llvm_add_test_for_target(${target})

0 commit comments

Comments
 (0)