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.h | |
| 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.h')
| -rw-r--r-- | tools/slang-test/test-context.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/tools/slang-test/test-context.h b/tools/slang-test/test-context.h index 203005943..03b74217f 100644 --- a/tools/slang-test/test-context.h +++ b/tools/slang-test/test-context.h @@ -107,6 +107,12 @@ class TestContext /// True if can run unit tests bool canRunUnitTests() const { return options.apiOnly == false; } + /// Given a spawn type, return the final spawn type. + /// In particular we want 'Default' spawn type to vary by the environment (for example running on test server on CI) + SpawnType getFinalSpawnType(SpawnType spawnType); + + SpawnType getFinalSpawnType(); + /// Get compiler set Slang::DownstreamCompilerSet* getCompilerSet(); Slang::DownstreamCompiler* getDefaultCompiler(SlangSourceLanguage sourceLanguage); @@ -134,8 +140,18 @@ class TestContext Slang::String exeDirectoryPath; - Slang::Int timeOutInMs = 100 * 1000; - + /// Timeout time for communication over connection. + /// NOTE! If the timeout is hit, the connection will be destroyed, and then recreated. + /// For tests that compile the stdlib, if that takes this time, the stdlib will be + /// repeatedly compiled and each time fail. + /// NOTE! This timeout may be altered in the ctor for a specific target, the initializatoin + /// value is just the default. + /// + /// TODO(JS): We could split the stdlib compilation from other actions, and have timeout specific for + /// that. To do this we could have a 'compileStdLib' RPC method. + /// + /// Current default is 2 mins. + Slang::Int connectionTimeOutInMs = 2 * 60 * 1000; protected: SlangResult _createJSONRPCConnection(Slang::RefPtr<Slang::JSONRPCConnection>& out); |
