diff options
Diffstat (limited to 'tools/slang-test/options.cpp')
| -rw-r--r-- | tools/slang-test/options.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/slang-test/options.cpp b/tools/slang-test/options.cpp index 10f98f3a2..9dd831afa 100644 --- a/tools/slang-test/options.cpp +++ b/tools/slang-test/options.cpp @@ -327,6 +327,15 @@ static bool _isSubCommand(const char* arg) optionsOut->expectedFailureList.add(line); } } + else if (strcmp(arg, "-test-dir") == 0) + { + if (argCursor == argEnd) + { + stdError.print("error: expected operand for '%s'\n", arg); + return SLANG_FAIL; + } + optionsOut->testDir = *argCursor++; + } else { stdError.print("unknown option '%s'\n", arg); @@ -365,5 +374,11 @@ static bool _isSubCommand(const char* arg) } } + if (optionsOut->testDir.getLength() == 0) + { + // If the test directory isn't set, use the "tests" directory + optionsOut->testDir = String("tests/"); + } + return SLANG_OK; } |
