Skip to content

Commit

Permalink
Use single quotes to make tests pass on Windows
Browse files Browse the repository at this point in the history
Our use of test.pl requires single quotes for tests to the same way
across all platforms.
  • Loading branch information
tautschnig committed Aug 15, 2023
1 parent fc8cd89 commit c9afc1e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 17 deletions.
4 changes: 2 additions & 2 deletions regression/cbmc/export-symex-ready-goto/test-bad-usage.desc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CORE winbug
CORE
test.c
--export-symex-ready-goto ""
--export-symex-ready-goto ''
^ERROR: Please provide a filename to write the goto-binary to.$
^EXIT=6$
^SIGNAL=0$
Expand Down
4 changes: 1 addition & 3 deletions regression/goto-inspect/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
set(is_windows true)
set(exclude_win_broken_tests -X winbug)
else()
set(is_windows false)
set(exclude_win_broken_tests "")
endif()

add_test_pl_tests(
"${CMAKE_CURRENT_SOURCE_DIR}/chain.sh $<TARGET_FILE:goto-cc> $<TARGET_FILE:goto-inspect> ${is_windows}" ${exclude_win_broken_tests}
"${CMAKE_CURRENT_SOURCE_DIR}/chain.sh $<TARGET_FILE:goto-cc> $<TARGET_FILE:goto-inspect> ${is_windows}"
)
5 changes: 2 additions & 3 deletions regression/goto-inspect/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@ include ../../src/common
ifeq ($(BUILD_ENV_),MSVC)
exe=../../../src/goto-cc/goto-cl
is_windows=true
excluded_tests = -X winbug
else
exe=../../../src/goto-cc/goto-cc
is_windows=false
endif

test:
@../test.pl -e -p -c '../chain.sh $(exe) ../../../src/goto-inspect/goto-inspect $(is_windows)' $(excluded_tests)
@../test.pl -e -p -c '../chain.sh $(exe) ../../../src/goto-inspect/goto-inspect $(is_windows)'

tests.log:
@../test.pl -e -p -c '../chain.sh $(exe) ../../../src/goto-inspect/goto-inspect $(is_windows)' $(excluded_tests)
@../test.pl -e -p -c '../chain.sh $(exe) ../../../src/goto-inspect/goto-inspect $(is_windows)'

clean:
find . -name '*.out' -execdir $(RM) '{}' \;
Expand Down
11 changes: 2 additions & 9 deletions regression/goto-inspect/show-goto-functions/negative.desc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CORE winbug
CORE
main.c
" "
' '
^EXIT=6$
^SIGNAL=0$
--
Expand All @@ -13,10 +13,3 @@ END_FUNCTION
--
This is testing the behaviour of the goto-inspect binary in case a binary
is present, but no inspection option is present.

This is labelled `winbug` to avoid running on windows because of issues with
the empty string in line 3 (simulating the lack of an option) not working as
it should (it is contrary to the behaviour of unix systems). The behaviour
has been verified manually on a machine as working as expected, but getting
the test to run automatically is a lot more involved, so we're opting to
skipping this on that platform for now.

0 comments on commit c9afc1e

Please sign in to comment.