@@ -55,17 +55,24 @@ static int jmp_buf_index = 0;
55
55
56
56
#ifdef __MINGW32__
57
57
58
- static void GccNoPThreadPlatformSpecificRunTestInASeperateProcess (UtestShell* shell, TestPlugin*, TestResult* result)
58
+ static void GccPlatformSpecificRunTestInASeperateProcess (UtestShell* shell, TestPlugin*, TestResult* result)
59
59
{
60
60
result->addFailure (TestFailure (shell, " -p doesn't work on MinGW as it is lacking fork.\b " ));
61
61
}
62
62
63
- void (*PlatformSpecificRunTestInASeperateProcess)(UtestShell* shell, TestPlugin* plugin, TestResult* result) =
64
- GccNoPThreadPlatformSpecificRunTestInASeperateProcess;
63
+ static pid_t PlatformSpecificForkImplementation (void )
64
+ {
65
+ return (pid_t ) 0 ;
66
+ }
67
+
68
+ static int PlatformSpecificWaitPidImplementation (int , int *, int )
69
+ {
70
+ return 0 ;
71
+ }
65
72
66
73
#else
67
74
68
- static void GccCygwinPlatformSpecificRunTestInASeperateProcess (UtestShell* shell, TestPlugin* plugin, TestResult* result)
75
+ static void GccPlatformSpecificRunTestInASeperateProcess (UtestShell* shell, TestPlugin* plugin, TestResult* result)
69
76
{
70
77
pid_t cpid, w;
71
78
int status;
@@ -106,11 +113,6 @@ static void GccCygwinPlatformSpecificRunTestInASeperateProcess(UtestShell* shell
106
113
}
107
114
}
108
115
109
- void (*PlatformSpecificRunTestInASeperateProcess)(UtestShell* shell, TestPlugin* plugin, TestResult* result) =
110
- GccCygwinPlatformSpecificRunTestInASeperateProcess;
111
-
112
- #endif
113
-
114
116
static pid_t PlatformSpecificForkImplementation (void )
115
117
{
116
118
return fork ();
@@ -121,11 +123,15 @@ static int PlatformSpecificWaitPidImplementation(int pid, int* status, int optio
121
123
return waitpid (pid, status, options);
122
124
}
123
125
126
+ #endif
127
+
124
128
TestOutput::WorkingEnvironment PlatformSpecificGetWorkingEnvironment ()
125
129
{
126
130
return TestOutput::eclipse;
127
131
}
128
132
133
+ void (*PlatformSpecificRunTestInASeperateProcess)(UtestShell* shell, TestPlugin* plugin, TestResult* result) =
134
+ GccPlatformSpecificRunTestInASeperateProcess;
129
135
int (*PlatformSpecificFork)(void ) = PlatformSpecificForkImplementation;
130
136
int (*PlatformSpecificWaitPid)(int , int *, int ) = PlatformSpecificWaitPidImplementation;
131
137
0 commit comments