test: Prepare the test scripts for testing native Windows tools via WSL

Use the TOOLEXT variable in run-tests.sh in the same way as in the
Makefile. The Makefile sets this variable automatically if invoked
by mingw32-make, but if running run-tests.sh in WSL with native
Windows compilers, then we need to set TOOLEXT manually when calling
run-tests.sh.

Allow skipping the cfguard failure tests when run in such a
configuration, since Linux make in WSL can't easily run cmd.exe
like in MSYS2.
This commit is contained in:
Martin Storsjö committed 2023-01-21 23:48:24 +02:00
1 parent 9d96e5745f
commit 241a1cd148
2 files changed
+7 -3

No files matched your search

+4
View File
@@ -252,8 +252,12 @@ ifeq ($(CMD),)
FAILURE_TEST_TARGETS = $(addprefix .failtested., $(FAILURE_TESTS))
CUSTOM1_FAILURE_TEST_TARGETS = .customtest1.bufferoverflow-fortify$(EXEEXT)
ifneq ($(HAVE_CFGUARD),)
ifeq ($(WSL),)
# These tests do special calling of cmd.exe, which don't quite
# work when running with Linux make in WSL.
CUSTOM2_FAILURE_TEST_TARGETS = .customtest2.cfguard-test$(EXEEXT)
endif
endif
endif
endif