From 5f18971afbf6a308f47b55db1afe7d6a47f5c0f6 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Thu, 23 May 2024 16:57:50 -0700 Subject: [PATCH] SRFI-64 Handle run-test returning the runner instead of pass status. Guile 3.0.5 fixed what they thought was a bug whering run-test returned the rv of test-runner-on-final instead of the current test runner. Ctest considered the returned object to be a successful test and always reported the test passing. --- common/cmake_modules/GncAddTest.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/cmake_modules/GncAddTest.cmake b/common/cmake_modules/GncAddTest.cmake index ef3c96aa45..ce12e8b3df 100644 --- a/common/cmake_modules/GncAddTest.cmake +++ b/common/cmake_modules/GncAddTest.cmake @@ -149,7 +149,11 @@ function(gnc_add_scheme_test _TARGET _SOURCE_FILE) (format #t \"%load-compiled-path = ~s~%\" %load-compiled-path) (error \"Loading guile/site file from outside build tree!\" filename)))) (load-from-path \"${_TARGET}\") - (exit (run-test))" + (let ((result (run-test))) + (if (boolean? result) + (exit result) + (exit (test-runner-fail-count result)))) +" ) endif() get_guile_env()