5 seconds delay when executing 'make test' with cross-compiled applications using wine
REQUIREMENTS
- linux host e.g opensuse Leap 15.1
- cmake version (tested with 3.10.2 or 3.17.3)
HOW TO REPRODUCE
- add repo for cross compiler by running
sudo zypper ar https://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Leap_15.1/windows:mingw:win32.repo
sudo zypper refresh
- install cmake, mingw cross compiler and wine by running
sudo zypper install cmake mingw32-cross-gcc wine
- unpack ctest-wine-run-delay-test.zip into ~/src/ctest-wine-run-delay-test
- configure
mkdir ctest-wine-run-delay-test-build
cd ctest-wine-run-delay-test-build
mingw32-cmake ../ctest-wine-run-delay-test
- run
make
make test
OBSERVED RESULTS
ctest shows that it need about 5 seconds to run this test
xxx@linux-ncx6:~/src/ctest-wine-run-delay-test-build> make test
Running tests...
/usr/bin/ctest --force-new-ctest-process
Test project /home/xxx/src/ctest-wine-run-delay-test-build
Start 1: mytest
1/1 Test #1: mytest ........................... Passed 5.23 sec
100% tests passed, 0 tests failed out of 1
Total Test time (real) = 5.23 sec
EXPECTED RESULTS
The delay should not be there
ADDITIONAL INFORMATION
Running the test in another way does not show this delay
make checktest
time -f *****\ real\ %e\ user\ %U\ sys\ %S /usr/bin/wine /home/xxx/src/ctest-wine-run-delay-test-build/bin/mytest.exe
***** real 0.74 user 0.00 sys 0.00
time -f *****\ real\ %e\ user\ %U\ sys\ %S ctest -VV
...
1: ***** real 0.02 user 0.00 sys 0.00
1/1 Test #1: mytest ........................... Passed 0.06 sec
Total Test time (real) = 0.07 sec
***** real 0.07 user 0.01 sys 0.00
time -f *****\ real\ %e\ user\ %U\ sys\ %S make test
...
1/1 Test #1: mytest ........................... Passed 0.06 sec
Total Test time (real) = 0.06 sec