Francois Gouget : testbot/TestLauncher: Report CreateProcess() errors like WineTest.

Alexandre Julliard julliard at winehq.org
Mon Aug 16 17:40:56 CDT 2021


Module: tools
Branch: master
Commit: 3115062baa5aaabf2539abc08c57f6ef680b9a8c
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=3115062baa5aaabf2539abc08c57f6ef680b9a8c

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Sat Aug 14 12:58:38 2021 +0200

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

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>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 fc67f92..41fb904 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;




More information about the wine-cvs mailing list