summaryrefslogtreecommitdiffstats
path: root/tools/render-test
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2021-04-29 15:45:25 -0400
committerGitHub <noreply@github.com>2021-04-29 15:45:25 -0400
commitad6f3070251f25cf022c231b8567d78e98061127 (patch)
tree1fa9d2058f8e86710a9e716e493473217b6dff77 /tools/render-test
parent972bd3c4c24b06501c52127416afb763a066b8ad (diff)
Simplify CommandLine by removing Escaping (#1825)
* #include an absolute path didn't work - because paths were taken to always be relative. * Split out StringEscapeUtil. * Added StringEscapeUtil. * Fix typo in unix quoting type. * Small comment improvements. * Try to fix linux linking issue. * Fix typo. * Attempt to fix linux link issue. * Update VS proj even though nothing really changed. * Fix another typo issue. * Fix for windows issue. Fixed bug. * Make separate Utils for escaping. * Fix typo. * Split out into StringEscapeHandler. * Windows shell does handle removing quotes (so remove code to remove them). * Handle unescaping if not initiating using the shell. * Slight improvement around shell like decoding. * Simplify command extraction. * Add shared-library category type. * Fix bug in command extraction. * Typo in transcendental category. * Enable unit-test on in smoke test category. * Make parsing failing output as a failing test. * Fixes for transcendental tests. Disable tests that do not work. * Changed category parsing. * Removed the TestResult parameter from _gatherTestsForFile. Made testsList only output. * Remove testing if all tests were disabled. * Make args of CommandLine always unescaped. * Add category. * Don't need escaping on unix/linux. * Remove some no longer used functions.
Diffstat (limited to 'tools/render-test')
-rw-r--r--tools/render-test/options.cpp6
-rw-r--r--tools/render-test/options.h2
-rw-r--r--tools/render-test/slang-support.cpp2
-rw-r--r--tools/render-test/slang-support.h2
4 files changed, 5 insertions, 7 deletions
diff --git a/tools/render-test/options.cpp b/tools/render-test/options.cpp
index b5d75adf2..dcf0b77b1 100644
--- a/tools/render-test/options.cpp
+++ b/tools/render-test/options.cpp
@@ -168,10 +168,8 @@ static SlangResult _setRendererType(DeviceType type, const char* arg, Slang::Wri
return SLANG_FAIL;
}
- CommandLine::Arg arg;
- arg.type = CommandLine::ArgType::Escaped;
- arg.value = *argCursor++;
- outOptions.compileArgs.add(arg);
+ const char* compileArg = *argCursor++;
+ outOptions.compileArgs.add(compileArg);
}
else if (strcmp(arg, "-performance-profile") == 0)
{
diff --git a/tools/render-test/options.h b/tools/render-test/options.h
index 6ca1ef499..2945113fe 100644
--- a/tools/render-test/options.h
+++ b/tools/render-test/options.h
@@ -73,7 +73,7 @@ struct Options
Slang::List<Slang::String> renderFeatures; /// Required render features for this test to run
- Slang::List<Slang::CommandLine::Arg> compileArgs;
+ Slang::List<Slang::String> compileArgs;
Slang::String adapter; ///< The adapter to use either name or index
diff --git a/tools/render-test/slang-support.cpp b/tools/render-test/slang-support.cpp
index 840b0d3e2..5470ea35a 100644
--- a/tools/render-test/slang-support.cpp
+++ b/tools/render-test/slang-support.cpp
@@ -93,7 +93,7 @@ void ShaderCompilerUtil::Output::reset()
List<const char*> args;
for (const auto& arg : request.compileArgs)
{
- args.add(arg.value.getBuffer());
+ args.add(arg.getBuffer());
}
SLANG_RETURN_ON_FAIL(spProcessCommandLineArguments(slangRequest, args.getBuffer(), int(args.getCount())));
}
diff --git a/tools/render-test/slang-support.h b/tools/render-test/slang-support.h
index 7e00a2c72..59d422bc7 100644
--- a/tools/render-test/slang-support.h
+++ b/tools/render-test/slang-support.h
@@ -39,7 +39,7 @@ struct ShaderCompileRequest
Slang::List<Slang::String> globalSpecializationArgs;
Slang::List<Slang::String> entryPointSpecializationArgs;
- Slang::List<Slang::CommandLine::Arg> compileArgs;
+ Slang::List<Slang::String> compileArgs;
};