Summary
When running ctest on Windows (both MinGW gfortran and Intel ifx), two tests fail with BAD_COMMAND:
command_line_filtering
shuffle_integration
Root Cause
In tests/funit-core/CMakeLists.txt:141-160:
add_test(NAME command_line_filtering
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/test_command_line_filtering.sh
${CMAKE_CURRENT_BINARY_DIR}/filter_cmdline_tests.x
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
...
add_test(NAME shuffle_integration
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/test_shuffle.sh
${CMAKE_CURRENT_BINARY_DIR}/shuffle_int_tests.x
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
On Windows, CTest uses CreateProcess(), which cannot invoke .sh shell scripts directly as executables, resulting in:
[inappropriate file type or format]
***Not Run (BAD_COMMAND)
Furthermore, test_command_line_filtering.sh tests regex filtering (-f/-e), which is disabled on Windows (#ifndef _WIN32).
Suggested Fix
Guard these tests with if (NOT WIN32) in tests/funit-core/CMakeLists.txt (similar to how Test_RegexFilter.pf is guarded).
Summary
When running
cteston Windows (both MinGW gfortran and Intel ifx), two tests fail withBAD_COMMAND:command_line_filteringshuffle_integrationRoot Cause
In
tests/funit-core/CMakeLists.txt:141-160:On Windows, CTest uses
CreateProcess(), which cannot invoke.shshell scripts directly as executables, resulting in:Furthermore,
test_command_line_filtering.shtests regex filtering (-f/-e), which is disabled on Windows (#ifndef _WIN32).Suggested Fix
Guard these tests with
if (NOT WIN32)intests/funit-core/CMakeLists.txt(similar to howTest_RegexFilter.pfis guarded).