Mixed-mode Windows tests need 32-bit build from 64-bit job
We have a number of mixed-mode Windows tests where we run a 32-bit app on WOW64 from our 64-bit suite build:
- win32.mixedmode_late
- win32.mixedmode
- win32.x86_to_x64
- win32.x86_to_x64_ibl_opt
However, with the move to Github Actions in #4131 (closed) with parallel jobs, we now run a 64-bit build without first running a 32-bit build and so we cannot use the already-built 32-bit test binary.
Plus, with #803 (closed) cross-arch injection, we will want more tests of one bitwidth launching a different bitwidth child.
What we want is to do what UNIX does and have a build-and-test test that goes and creates what we need using a different toolchain config from the current. For Windows this is a lot more complicated since the @($*&@% compiler doesn't have a nice flag like -m32
, but we can share our env var swapping from runsuite_common_pre.cmake.
Here is a list of ways to do the switch including env vars:
-
Generalize the env var setting code in runsuite_common_pre.cmake and set test ENVIRONMENT properties like we do for -m32 for the unix build-and-test. Hopefully escaping the ;'s in Windows PATH, etc. will work.
-
Try -DCMAKE_GENERATOR_PLATFORM=x64 Similarly there's the -A switch. This is cmake 3.13+ which separates out the arch part. And "--build-generator-platform Win32". But: that doesn't work w/ Ninja. And if the outer is Ninja: how figure out which VS generator to use?
-
Use different generator for different dir: https://cmake.org/pipermail/cmake/2011-November/047221.html Build that subdirectory not using add_subdirectory(), but using externalproject_add() and use the -G switch in the command line there.
-
Make a toolchain file to set a whole bunch of stuff
-
Just check in a 32-bit mixedmode.exe! But that's not good enough for forthcoming #803 (closed) cross-arch injection where we need dynamorio.dll.
For now, these tests just fail every time and are on the ignore list.