Skip to content

Commit

Permalink
cmake: Search for sh instead of bash
Browse files Browse the repository at this point in the history
We only need POSIX sh for the test suite. While bash(1) is guaranteed
to be a compatible Bourne shell, we probably can assume that sh(1)
is too on any system.
  • Loading branch information
Conan-Kudo committed Jan 18, 2023
1 parent 31874ff commit 0788cb2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ endforeach()

configure_file(test-poptrc.in test-poptrc @ONLY)

find_program (BASH_PROGRAM bash)
find_program (SH_PROGRAM sh)

if (BASH_PROGRAM)
add_test (testit ${BASH_PROGRAM} -c "srcdir=${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/testit.sh")
if (SH_PROGRAM)
add_test (testit ${SH_PROGRAM} -c "srcdir=${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/testit.sh")
set_tests_properties(testit PROPERTIES FIXTURES_REQUIRED testit_fixture)
endif (BASH_PROGRAM)
endif (SH_PROGRAM)

0 comments on commit 0788cb2

Please sign in to comment.