Make wxExecute() unit test work when using Wine too

Use wxTEST_RUNNER in this test, which can be/is set to "wine" by the
GitHub wxMSW CI workflow and can also be set manually if necessary, to
make executing MSW commands under non-MSW systems have a chance to
actually work (but note that the tests still fail when run under Wine).
This commit is contained in:
Vadim Zeitlin
2021-06-28 01:05:03 +01:00
parent 1051d9f0da
commit 2be8f78982

View File

@@ -116,7 +116,13 @@ private:
wxProcess* callback_ = NULL)
{
forceExitLoop = forceExitLoop_;
command = command_;
// Prepend the command with the value of wxTEST_RUNNER if it's
// defined to make this test work when using Wine too.
if ( wxGetEnv("wxTEST_RUNNER", &command) )
command += ' ';
command += command_;
flags = flags_;
callback = callback_;