[tools] testbot/TestLauncher: Report CreateProcess() errors like WineTest.

Francois Gouget fgouget at codeweavers.com
Sat Aug 14 05:58:38 CDT 2021


Show the GetLastError() value on the done line instead of exiting with
a non-standard error message.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/src/TestLauncher/TestLauncher.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/testbot/src/TestLauncher/TestLauncher.c b/testbot/src/TestLauncher/TestLauncher.c
index fc67f92ae..41fb90427 100644
--- a/testbot/src/TestLauncher/TestLauncher.c
+++ b/testbot/src/TestLauncher/TestLauncher.c
@@ -238,16 +238,15 @@ DWORD RunTest(char *TestExeFileName, char* CommandLine, DWORD TimeOut, DWORD *Pi
     */
    if (! CreateProcessA(NULL, CommandLine, NULL, NULL, TRUE, CREATE_DEFAULT_ERROR_MODE, NULL, NULL, &StartupInfo, &ProcessInformation))
    {
+      *Pid = 0;
       if (GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX)
       {
          Skips++;
          printf("%s.c:0: Tests skipped: Side-by-side dll version not found\n",
                 (*Subtest ? Subtest : "testlauncher"));
-         *Pid = 0;
          return 0;
       }
-      Error("CreateProcess failed (error %lu)\n", GetLastError());
-      ExitProcess(1);
+      return -GetLastError();
    }
    CloseHandle(ProcessInformation.hThread);
    *Pid = ProcessInformation.dwProcessId;
-- 
2.20.1




More information about the wine-devel mailing list