diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2021-11-30 16:34:52 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-30 16:34:52 -0500 |
| commit | ace4e334bc5fb299d2890b5e3f35dfd84ea32606 (patch) | |
| tree | 9a18aa01dda4c8e8b7305bddfd7009fdb8e11a95 /tools/slang-test/test-context.cpp | |
| parent | dd18f2bff2abd13548742e30c25a31b9ea9a0cbd (diff) | |
Use test-server on CI (#2034)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Vary what SpawnType is used, if one isn't explicitly set.
* Terminate on linux if exec fails.
* Use a more sophisticated sleeping mechanism.
* Attempt to make CI tests to work on aarch64 debug.
Small fixes.
Diffstat (limited to 'tools/slang-test/test-context.cpp')
| -rw-r--r-- | tools/slang-test/test-context.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/slang-test/test-context.cpp b/tools/slang-test/test-context.cpp index eeb23b695..39dd52313 100644 --- a/tools/slang-test/test-context.cpp +++ b/tools/slang-test/test-context.cpp @@ -15,6 +15,12 @@ using namespace Slang; TestContext::TestContext() { m_session = nullptr; + + /// if we are testing on arm, debug, we may want to increase the connection timeout +#if (SLANG_PROCESSOR_ARM || SLANG_PROCESSOR_ARM_64) && defined(_DEBUG) + // 5 mins(!). This seems to be the order of time needed for timeout on a CI ARM test system on debug + connectionTimeOutInMs = 1000 * 60 * 5; +#endif } Result TestContext::init(const char* exePath) @@ -170,4 +176,25 @@ bool TestContext::canRunTestWithRenderApiFlags(Slang::RenderApiFlags requiredFla return (requiredFlags & options.enabledApis) == requiredFlags; } +SpawnType TestContext::getFinalSpawnType(SpawnType spawnType) +{ + if (spawnType == SpawnType::Default) + { + if (options.outputMode == TestOutputMode::Default) + { + return SpawnType::UseSharedLibrary; + } + else + { + return SpawnType::UseTestServer; + } + } + + // Just return whatever spawnType was passed in + return spawnType; +} +SpawnType TestContext::getFinalSpawnType() +{ + return getFinalSpawnType(options.defaultSpawnType); +} |
