summaryrefslogtreecommitdiff
path: root/tools/slang-test/main.cpp
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2018-12-10 12:42:15 -0800
committerGitHub <noreply@github.com>2018-12-10 12:42:15 -0800
commitb2997170df7cc2703de714a946a38dc35058e7f8 (patch)
treebbd19208ba07a2f45a2c25f28f6cf77be16f0b49 /tools/slang-test/main.cpp
parent32f57c30cfce1681f5fe617e4fe230e88eb7b840 (diff)
Remove the "VM" and "bytecode" features (#745)
* Remove the "VM" and "bytecode" features The "bytecode" in `bc.{h,cpp}` was an initial attempt at a serialized encoding for the Slang IR, but we now have the `ir-serialize.{h,cpp}` approach which was has been kept up to date much better. Similarly, the "VM" in `vm.{h,cpp}` was intended to be a system for interpreting Slang code in the bytecode format directly (so that you could load and evaluate code in a Slang module in a lightweight fashion). This never got used past a single test, which we eventually disabled. There are good ideas in some of this code, but at this point the implementations have bit-rotted to a point where trying to maintain it is more costly than it would be to re-created it if/when we ever decide these features are important again. * fixup: remove slang-eval-test from Makefile
Diffstat (limited to 'tools/slang-test/main.cpp')
-rw-r--r--tools/slang-test/main.cpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/tools/slang-test/main.cpp b/tools/slang-test/main.cpp
index f710d63f2..943e82cef 100644
--- a/tools/slang-test/main.cpp
+++ b/tools/slang-test/main.cpp
@@ -853,53 +853,6 @@ String getExpectedOutput(String const& outputStem)
return expectedOutput;
}
-TestResult runEvalTest(TestContext* context, TestInput& input)
-{
- // We are going to load and evaluate the code
-
- auto filePath = input.filePath;
- auto outputStem = input.outputStem;
-
- OSProcessSpawner spawner;
-
- spawner.pushExecutablePath(String(g_options.binDir) + "slang-eval-test" + osGetExecutableSuffix());
- spawner.pushArgument(filePath);
-
- for( auto arg : input.testOptions->args )
- {
- spawner.pushArgument(arg);
- }
-
- if (spawnAndWait(context, outputStem, spawner) != kOSError_None)
- {
- return TestResult::Fail;
- }
-
- String actualOutput = getOutput(spawner);
- String expectedOutput = getExpectedOutput(outputStem);
-
- TestResult result = TestResult::Pass;
-
- // Otherwise we compare to the expected output
- if (actualOutput != expectedOutput)
- {
- result = TestResult::Fail;
- }
-
- // If the test failed, then we write the actual output to a file
- // so that we can easily diff it from the command line and
- // diagnose the problem.
- if (result == TestResult::Fail)
- {
- String actualOutputPath = outputStem + ".actual";
- Slang::File::WriteAllText(actualOutputPath, actualOutput);
-
- context->dumpOutputDifference(expectedOutput, actualOutput);
- }
-
- return result;
-}
-
static SlangCompileTarget _getCompileTarget(const UnownedStringSlice& name)
{
#define CASE(NAME, TARGET) if(name == NAME) return SLANG_##TARGET;
@@ -1706,7 +1659,6 @@ TestResult runTest(
#endif
{ "COMPARE_GLSL", &runGLSLComparisonTest },
{ "CROSS_COMPILE", &runCrossCompilerTest },
- { "EVAL", &runEvalTest },
{ nullptr, nullptr },
};