diff options
| author | bspeice <bspeice@users.noreply.github.com> | 2025-01-01 18:26:43 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-01 18:26:43 -0800 |
| commit | e3b71cf0356692bda5f0b3a06aed9d49ad3314a4 (patch) | |
| tree | 6bb5dd847275f5f940d974727ef738cd296bf6c3 /tools/slang-test/slang-test-main.cpp | |
| parent | a13ef050996c2792ff3c16b6424d3a6336e56a58 (diff) | |
Allow explicit test root (#5980)
Diffstat (limited to 'tools/slang-test/slang-test-main.cpp')
| -rw-r--r-- | tools/slang-test/slang-test-main.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp index 376d0e0bd..0987cbf80 100644 --- a/tools/slang-test/slang-test-main.cpp +++ b/tools/slang-test/slang-test-main.cpp @@ -4427,10 +4427,10 @@ void runTestsInParallel(TestContext* context, int count, const F& f) context->setTestReporter(originalReporter); } -void runTestsInDirectory(TestContext* context, String directoryPath) +void runTestsInDirectory(TestContext* context) { List<String> files; - getFilesInDirectory(directoryPath, files); + getFilesInDirectory(context->options.testDir, files); auto processFile = [&](String file) { if (shouldRunTest(context, file)) @@ -4865,9 +4865,7 @@ SlangResult innerMain(int argc, char** argv) { TestReporter::SuiteScope suiteScope(&reporter, "tests"); // Enumerate test files according to policy - // TODO: add more directories to this list - // TODO: allow for a command-line argument to select a particular directory - runTestsInDirectory(&context, "tests/"); + runTestsInDirectory(&context); } // Run the unit tests (these are internal C++ tests - not specified via files in a |
