summaryrefslogtreecommitdiff
path: root/tools/slang-test/slang-test-main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/slang-test/slang-test-main.cpp')
-rw-r--r--tools/slang-test/slang-test-main.cpp23
1 files changed, 8 insertions, 15 deletions
diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp
index 1144b4034..b2e2bb55c 100644
--- a/tools/slang-test/slang-test-main.cpp
+++ b/tools/slang-test/slang-test-main.cpp
@@ -495,6 +495,7 @@ Result spawnAndWaitSharedLibrary(TestContext* context, const String& testPath, c
if (options.shouldBeVerbose)
{
CommandLine testCmdLine;
+
testCmdLine.setExecutableFilename("slang-test");
if (options.binDir.getLength())
@@ -531,8 +532,10 @@ Result spawnAndWaitSharedLibrary(TestContext* context, const String& testPath, c
stdWriters.setWriter(SLANG_WRITER_CHANNEL_DIAGNOSTIC, &stdError);
}
+ String exePath = Path::combine(context->exeDirectoryPath, exeName);
+
List<const char*> args;
- args.add(exeName.getBuffer());
+ args.add(exePath.getBuffer());
for (Index i = 0; i < cmdLine.m_args.getCount(); ++i)
{
args.add(cmdLine.m_args[i].value.getBuffer());
@@ -3191,7 +3194,7 @@ SlangResult innerMain(int argc, char** argv)
// The context holds useful things used during testing
TestContext context;
- SLANG_RETURN_ON_FAIL(SLANG_FAILED(context.init()))
+ SLANG_RETURN_ON_FAIL(SLANG_FAILED(context.init(argv[0])))
auto& categorySet = context.categorySet;
@@ -3272,19 +3275,9 @@ SlangResult innerMain(int argc, char** argv)
Options& options = context.options;
- // Set up the prelude
- {
- TestToolUtil::PreludeInfo info;
- info.exePath = argv[0];
-
- if (options.nvapiPath.getLength())
- {
- info.nvapiPath = options.nvapiPath.getBuffer();
- }
-
- TestToolUtil::setSessionDefaultPrelude(info, context.getSession());
- }
-
+ // Set up the prelude/s
+ TestToolUtil::setSessionDefaultPreludeFromExePath(argv[0], context.getSession());
+
if (options.outputMode == TestOutputMode::TeamCity)
{
// On TeamCity CI there is an issue with unix/linux targets where test system may be different from the build system