Martin Storsjö
241a1cd148
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.
2023-01-21 23:48:24 +02:00
Martin Storsjö
e16ba0772f
run-tests: Split out building and running of tests into a Makefile
...
This allows building and running the tests in parallel.
2022-10-29 23:22:56 +03:00
Martin Storsjö
710f2f055a
run-tests: Rename HAS_CFGUARD to HAVE_CFGUARD
...
This picks a different naming style for flags like this.
2022-10-29 23:22:56 +03:00
Martin Storsjö
64dffd28a5
run-tests: Merge TESTS_CPP_LOAD_DLL back into TESTS_CPP
...
This was split in 591a5c2ddc since
we couldn't/shouldn't test these for UWP targets.
When the testing for UWP targets was reduced in
551b046498 , there was no longer any
distinction between TESTS_CPP_LOAD_DLL and TESTS_CPP, so merge
them back.
2022-10-27 00:40:06 +03:00
Martin Storsjö
c541aa87b8
run-tests: Fix a missed rename/split of RUN_X86
...
This was missed in 3eb7f64593 .
2022-10-27 00:40:06 +03:00
Martin Storsjö
3eb7f64593
run-tests: Allow overriding the command for running separately for i686 and x86_64
2022-10-25 11:09:38 +03:00
Martin Storsjö
22b1ff128b
Consistently use the --pdb= form in scripts
...
Stop using the separate argument form (-Wl,-pdb,<filename>), and
prefer using the option form with an implicit output name.
2022-10-12 15:28:45 +03:00
Alvin Wong
039ee72a68
Add CFGuard test
2022-10-01 13:25:52 +03:00
Martin Storsjö
f4f25e241b
run-tests: Verify that sanitizers and buffer/stack protections work as they should
2022-09-16 20:23:32 +03:00
Martin Storsjö
b395a2f26b
run-tests: Build and run crt-test with fortification
2022-09-16 20:23:32 +03:00
Martin Storsjö
4c29469eac
test: Add a test for fortification of string functions
...
We currently only run the testcase where it doesn't trigger the
failed checks though.
2022-09-16 19:43:40 +03:00
Martin Storsjö
2013c9c165
run-tests: Swap the nesting of a loop/condition
...
There's no point in running the whole loop if each iteration is
going to be skipped.
2022-09-16 19:43:40 +03:00
Martin Storsjö
332193b7ec
run-tests: Build the ubsan test case with -fno-sanitize-recover=all
...
This allows easier programmatic checking that the sanitizer actually
caught the tested issue, when triggering the issue.
2022-09-16 19:42:21 +03:00
Martin Storsjö
fa02f14aea
run-tests: Actually try to run the asan-instrumented test binaries
...
Previously we would just run the plain version of them.
2022-09-15 13:55:15 +03:00
Martin Storsjö
5456a77fe3
run-tests: Wipe out an older libunwind.dll in the same way as libc++.dll
...
Ideally we'd wipe the whole test/<arch> directory before running
the tests (we do that if CLEAN is set), but here we only wipe out
the specific ones that can affect how new tests are built and linked.
2022-09-15 13:54:51 +03:00
Martin Storsjö
b6429b6632
run-tests: Move resetting of the TESTS_EXTRA variable earlier in the loop
...
A test that was added to TESTS_EXTRA in
e934c04ef4 wasn't actually ever
executed; this makes it be executed as expected.
2022-09-14 10:03:36 +03:00
Martin Storsjö
00abcdbe6a
run-tests: Remove is-ucrt.c after testing
2022-04-08 09:44:56 +03:00
Martin Storsjö
e2ad2d4b64
run-tests: Don't assume running on x86
...
Also use $COPY_X86 for consistency.
2021-07-01 22:36:54 +03:00
Martin Storsjö
1629861108
run-tests: Move a comment closer to the line it refers to
2021-07-01 22:36:54 +03:00
Martin Storsjö
0200472671
test: Add a testcase for cleanup of C++ destructors while doing longjmp
...
For x86_64 and aarch64, this requires https://reviews.llvm.org/D89231 .
The C++ destructors aren't executed while doing the longjmp (contrary
to how it works MSVC's C++ exceptions), but it no longer crashes.
2021-04-15 11:36:20 +03:00
Martin Storsjö
790bc40855
test: Add a testcase for throwing/catching C++ exceptions across DLLs
2021-02-19 16:19:47 +02:00
Martin Storsjö
5533a5ad53
run-tests: Fix running with a relative path to the toolchain
...
This fixes github issue #181 .
2021-01-25 14:45:34 +02:00
Martin Storsjö
2377f1a839
test: Explicitly test linking the C++ runtime statically
2020-10-23 12:17:35 +03:00
Martin Storsjö
9031eb6791
Build the OpenMP runtime in docker based builds
...
LLVM's OpenMP implementation only supports Windows on x86, and it
requires a MASM-compatible assembler to build it. Build UASM
for this purpose, for now. (UASM isn't available packaged in
debian/ubuntu repos.) In the future, llvm-ml should be able
to handle it instead, but it's not currently mature enough.
Not including it in the regular build-all.sh for now, as UASM
isn't generally available.
2020-10-15 23:23:05 +03:00
Martin Storsjö
c82a6f2340
test: Add a testcase for the global termminate handler
2020-09-16 00:07:46 +03:00
Martin Storsjö
308f7227c5
test: Add an idl testcase
2020-09-16 00:03:57 +03:00
Martin Storsjö
63add77368
run-tests: Run exception tests on wine on aarch64 as well
...
Current git versions of wine can handle the exception unwinding
properly.
2020-09-16 00:03:57 +03:00
Martin Storsjö
e934c04ef4
run-tests: Execute the uwp test executables now that they don't rely on vcruntime140_app
2020-06-16 11:32:17 +03:00
Martin Storsjö
8e461131cf
Clean the build dirs before building, if the env var CLEAN is set
2020-03-25 23:24:31 +02:00
Martin Storsjö
3110e27f64
run-tests: Transfer all tested files in one go
...
This should speed up testing a bit, especially if $COPY has a long
startup overhead.
2020-03-05 16:00:06 +02:00
Martin Storsjö
20d3b32b30
run-tests: Silence errors from trying to build uwp-error which intentionally should fail in certain configurations
2020-03-05 15:39:30 +02:00
Martin Storsjö
551b046498
run-tests: Don't build all tests for mingw32uwp, restrict it to the specific uwp-error test
...
Build one single test to verify that building generic code for mingw32uwp
works, but skip building all of the tests for this target.
Keep building the uwp-error test for all targets, to verify that it
builds successfully for mingw32 but fails for mingw32uwp.
This reduces the runtime for the tests by around a third.
2020-03-05 15:39:30 +02:00
Martin Storsjö
c1882530c3
Add copyright and license headers to all shell script files, for clarity
2020-03-05 11:31:31 +02:00
Martin Storsjö
f023c3416f
run-tests: Test building and running crt-test with -D__USE_MINGW_ANSI_STDIO=1
2019-12-20 09:39:08 +02:00
Martin Storsjö
f7fd04dd42
run-tests: Print a message if all tests ran successfully
2019-12-18 11:32:31 +02:00
Martin Storsjö
ca329c1cd4
run-tests: Check for the _UCRT define that latest upstream mingw-w64 defines
...
The __MSVCRT_VERSION__ define has been changed and now is set to
0xE00 for UCRT, but the _UCRT define has been added.
2019-05-07 09:04:06 +03:00
Martin Storsjö
82324fcff5
run-tests: Build optimized versions of the exception handling tests
...
Exception handling codegen can be greatly affected by optimization.
2019-04-30 00:03:28 +03:00
Martin Storsjö
8cf83f259e
Add the testcase from llvm PR40322
2019-04-30 00:03:19 +03:00
Martin Storsjö
1dd468bb4a
run-tests: Only run aarch64 exception tests if running on native windows
2019-04-19 00:09:06 +03:00
Steve Lhomme
cd73ed8308
wrappers: link with the Windows Store specific runtime for UWP
2019-04-18 12:35:25 +03:00
Steve Lhomme
707fda6348
tests: add a test to make sure compiling forbidden UWP APIs fails
...
When building for UWP and works otherwise
2019-04-18 12:23:28 +03:00
Steve Lhomme
591a5c2ddc
tests: also test UWP targets
...
the tests with LoadLibrary will not work on these, so skip them
2019-04-18 11:30:59 +03:00
Martin Storsjö
47acbb667e
run-tests: Handle uname MSYS* in the same way as MINGW*
2019-04-18 10:16:41 +03:00
Martin Storsjö
8c5bac6cb7
run-tests: Actually run the asan test binary when running on native windows
2019-04-18 10:15:26 +03:00
Martin Storsjö
2e31d11bfd
run-tests: Make sure to actually run tests when run on native windows
2019-04-18 10:09:00 +03:00
Steve Lhomme
975ed24984
tests: set the output folder in one variable
...
And use it everywhere
2019-03-12 10:42:43 +02:00
Steve Lhomme
3de09f9e25
tests: don't run using wine on mingw
2019-03-12 10:41:42 +02:00
Martin Storsjö
c9817eca35
Add a testcase for ubsan
2018-10-17 22:45:54 +03:00
Martin Storsjö
3c6e1fe8bc
Make a shell script case more compact
2018-10-13 23:57:41 +03:00
Martin Storsjö
a38e52fff5
Build address sanitizer
2018-10-02 14:53:53 +03:00