diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-04-23 17:19:20 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-23 17:19:20 -0400 |
| commit | 9cb75371f5ea45640ae0e3998eb27bcda0a22cd9 (patch) | |
| tree | 8e4c18099888d88860c54c0a23c5fe345f3fd4b7 /tools/slang-test/slang-test-main.cpp | |
| parent | 7a71b86aadda83d16dadf809be137c7551f31464 (diff) | |
Feature/premake build (#951)
* * Remove Makefile
* Document how to create build using premake5
* Added support for finding the executable path
* If binDir not set on command line use the executable path
* Fix getting exe path on linux.
* Removed CalcExecutablePath from Path:: interface, made implementation internal.
* Documentation improvements.
* Fixes based on review
* Fix some typos
* Removed unused/needed global
Diffstat (limited to 'tools/slang-test/slang-test-main.cpp')
| -rw-r--r-- | tools/slang-test/slang-test-main.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp index e475d4b5a..232ec5d53 100644 --- a/tools/slang-test/slang-test-main.cpp +++ b/tools/slang-test/slang-test-main.cpp @@ -413,7 +413,7 @@ OSError spawnAndWaitSharedLibrary(TestContext* context, const String& testPath, builder << "slang-test"; - if (options.binDir) + if (options.binDir.Length()) { builder << " -bindir " << options.binDir; } @@ -430,7 +430,7 @@ OSError spawnAndWaitSharedLibrary(TestContext* context, const String& testPath, context->reporter->messageFormat(TestMessageType::Info, "%s\n", builder.begin()); } - auto func = context->getInnerMainFunc(String(context->options.binDir), exeName); + auto func = context->getInnerMainFunc(context->options.binDir, exeName); if (func) { StringBuilder stdErrorString; @@ -765,7 +765,7 @@ static RenderApiFlags _getAvailableRenderApiFlags(TestContext* context) { // Try starting up the device OSProcessSpawner spawner; - spawner.pushExecutablePath(String(context->options.binDir) + "render-test" + osGetExecutableSuffix()); + spawner.pushExecutablePath(Path::Combine(context->options.binDir, String("render-test") + osGetExecutableSuffix())); _addRenderTestOptions(context->options, spawner); // We just want to see if the device can be started up spawner.pushArgument("-only-startup"); @@ -895,7 +895,7 @@ String findExpectedPath(const TestInput& input, const char* postFix) static void _initSlangCompiler(TestContext* context, OSProcessSpawner& spawnerOut) { - spawnerOut.pushExecutablePath(String(context->options.binDir) + "slangc" + osGetExecutableSuffix()); + spawnerOut.pushExecutablePath(Path::Combine(context->options.binDir, String("slangc") + osGetExecutableSuffix())); if (context->options.verbosePaths) { @@ -1007,7 +1007,7 @@ TestResult runReflectionTest(TestContext* context, TestInput& input) OSProcessSpawner spawner; - spawner.pushExecutablePath(String(options.binDir) + "slang-reflection-test" + osGetExecutableSuffix()); + spawner.pushExecutablePath(Path::Combine(options.binDir, String("slang-reflection-test") + osGetExecutableSuffix())); spawner.pushArgument(filePath); for( auto arg : input.testOptions->args ) @@ -1471,7 +1471,7 @@ TestResult runComputeComparisonImpl(TestContext* context, TestInput& input, cons OSProcessSpawner spawner; - spawner.pushExecutablePath(String(context->options.binDir) + "render-test" + osGetExecutableSuffix()); + spawner.pushExecutablePath(Path::Combine(context->options.binDir, String("render-test") + osGetExecutableSuffix())); spawner.pushArgument(filePath999); _addRenderTestOptions(context->options, spawner); @@ -1589,7 +1589,7 @@ TestResult doRenderComparisonTestRun(TestContext* context, TestInput& input, cha OSProcessSpawner spawner; - spawner.pushExecutablePath(String(context->options.binDir) + "render-test" + osGetExecutableSuffix()); + spawner.pushExecutablePath(Path::Combine(context->options.binDir, String("render-test") + osGetExecutableSuffix())); spawner.pushArgument(filePath); _addRenderTestOptions(context->options, spawner); |
