BUG: Expanded difference in timeouts between tests 4 and 5 so that 5 does not timeout while waiting for 4 to timeout. This should fix the intermittent failure of test 5 on cygwin. ENH: When a mismatch is reported it now reports what it was as well as what it should have been.
This commit is contained in:
parent
8df3dfd4dc
commit
f362d6e2ef
|
@ -97,7 +97,7 @@ int test5(int argc, const char* argv[])
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
r = runChild(cmd, kwsysProcess_State_Exception,
|
r = runChild(cmd, kwsysProcess_State_Exception,
|
||||||
kwsysProcess_Exception_Fault, 1, 1, 1, 0, 2);
|
kwsysProcess_Exception_Fault, 1, 1, 1, 0, 1);
|
||||||
fprintf(stdout, "Output on stdout after recursive test.\n");
|
fprintf(stdout, "Output on stdout after recursive test.\n");
|
||||||
fprintf(stderr, "Output on stderr after recursive test.\n");
|
fprintf(stderr, "Output on stderr after recursive test.\n");
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
@ -198,19 +198,23 @@ int runChild(const char* cmd[], int state, int exception, int value,
|
||||||
{
|
{
|
||||||
if(exception != kwsysProcess_GetExitException(kp))
|
if(exception != kwsysProcess_GetExitException(kp))
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Mismatch in exit exception. Should have been %d.\n",
|
fprintf(stderr, "Mismatch in exit exception. "
|
||||||
exception);
|
"Should have been %d, was %d.\n",
|
||||||
|
exception, kwsysProcess_GetExitException(kp));
|
||||||
}
|
}
|
||||||
if(value != kwsysProcess_GetExitValue(kp))
|
if(value != kwsysProcess_GetExitValue(kp))
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Mismatch in exit value. Should have been %d.\n",
|
fprintf(stderr, "Mismatch in exit value. "
|
||||||
value);
|
"Should have been %d, was %d.\n",
|
||||||
|
value, kwsysProcess_GetExitValue(kp));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(kwsysProcess_GetState(kp) != state)
|
if(kwsysProcess_GetState(kp) != state)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Mismatch in state. Should have been %d.\n", state);
|
fprintf(stderr, "Mismatch in state. "
|
||||||
|
"Should have been %d, was %d.\n",
|
||||||
|
state, kwsysProcess_GetState(kp));
|
||||||
result = 1;
|
result = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -289,7 +293,7 @@ int main(int argc, const char* argv[])
|
||||||
int values[6] = {0, 123, 1, 1, 0, 0};
|
int values[6] = {0, 123, 1, 1, 0, 0};
|
||||||
int outputs[6] = {1, 1, 1, 1, 1, 0};
|
int outputs[6] = {1, 1, 1, 1, 1, 0};
|
||||||
int delays[6] = {0, 0, 0, 0, 0, 1};
|
int delays[6] = {0, 0, 0, 0, 0, 1};
|
||||||
double timeouts[6] = {3, 3, 3, 3, 3, 0.1};
|
double timeouts[6] = {3, 3, 3, 3, 5, 0.1};
|
||||||
int r;
|
int r;
|
||||||
const char* cmd[4];
|
const char* cmd[4];
|
||||||
cmd[0] = argv[0];
|
cmd[0] = argv[0];
|
||||||
|
|
Loading…
Reference in New Issue