mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-08 14:49:59 -04:00
Stop selftest hanging when run on CI
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
This commit is contained in:
parent
20458c0963
commit
9149e12767
@ -70,7 +70,7 @@ jobs:
|
||||
os: windows
|
||||
script:
|
||||
- scripts/windows_msbuild.bat v141 # Visual Studio 2017
|
||||
- visualc/VS2010/x64/Release/selftest.exe
|
||||
- visualc/VS2010/x64/Release/selftest.exe --ci
|
||||
|
||||
after_failure:
|
||||
- tests/scripts/travis-log-failure.sh
|
||||
|
@ -353,6 +353,9 @@ int main(int argc, char *argv[])
|
||||
unsigned char buf[1000000];
|
||||
#endif
|
||||
void *pointer;
|
||||
#if defined(_WIN32)
|
||||
int ci = 0; /* ci = 1 => running in CI, so don't wait for a key press */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The C standard doesn't guarantee that all-bits-0 is the representation
|
||||
@ -380,6 +383,10 @@ int main(int argc, char *argv[])
|
||||
} else if (strcmp(*argp, "--exclude") == 0 ||
|
||||
strcmp(*argp, "-x") == 0) {
|
||||
exclude_mode = 1;
|
||||
#if defined(_WIN32)
|
||||
} else if (strcmp(*argp, "--ci") == 0) {
|
||||
ci = 1;
|
||||
#endif
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
@ -450,8 +457,10 @@ int main(int argc, char *argv[])
|
||||
mbedtls_printf(" [ All tests PASS ]\n\n");
|
||||
}
|
||||
#if defined(_WIN32)
|
||||
mbedtls_printf(" Press Enter to exit this program.\n");
|
||||
fflush(stdout); getchar();
|
||||
if (!ci) {
|
||||
mbedtls_printf(" Press Enter to exit this program.\n");
|
||||
fflush(stdout); getchar();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user