diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2021-11-30 16:50:05 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-30 16:50:05 -0500 |
| commit | ce12e1d64d6b0b62609f061d3773a7e8b35849c3 (patch) | |
| tree | 72da79208edff4fdebfc32db759ecca21716c260 /tools/slang-test/slang-test-main.cpp | |
| parent | ace4e334bc5fb299d2890b5e3f35dfd84ea32606 (diff) | |
Auto flush for streams for stdin/out in slang-test (#2035)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Move StreamType from Process to StdStreamType in slang-stream.h
* Disable buffering for stdout/stderr for slang-test.
* Improve comment.
Diffstat (limited to 'tools/slang-test/slang-test-main.cpp')
| -rw-r--r-- | tools/slang-test/slang-test-main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp index e734e1c4c..68c7aeec7 100644 --- a/tools/slang-test/slang-test-main.cpp +++ b/tools/slang-test/slang-test-main.cpp @@ -3559,6 +3559,10 @@ static SlangResult runUnitTestModule(TestContext* context, TestOptions& testOpti SlangResult innerMain(int argc, char** argv) { + // Disable buffering for out and std out + StreamUtil::setStreamBufferStyle(StdStreamType::Out, StreamBufferStyle::None); + StreamUtil::setStreamBufferStyle(StdStreamType::ErrorOut, StreamBufferStyle::None); + auto stdWriters = StdWriters::initDefaultSingleton(); // The context holds useful things used during testing |
