summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/slang-test/slang-test-main.cpp6
-rw-r--r--tools/slang-test/test-context.cpp15
-rw-r--r--tools/slang-test/test-context.h1
3 files changed, 6 insertions, 16 deletions
diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp
index 053201c70..cfd61d97b 100644
--- a/tools/slang-test/slang-test-main.cpp
+++ b/tools/slang-test/slang-test-main.cpp
@@ -636,13 +636,9 @@ static TestResult _fileCheckTest(
if(!fc)
{
// TODO(JS):
- // For now if IFileCheck isn't available ignore...
-#if 0
+ // Do we want to fail or ignore if we don't find file check?
testReporter.message(TestMessageType::RunError, "FileCheck is not available");
return TestResult::Fail;
-#else
- return TestResult::Ignored;
-#endif
}
const bool coloredOutput = true;
diff --git a/tools/slang-test/test-context.cpp b/tools/slang-test/test-context.cpp
index 97c53679e..15b07444c 100644
--- a/tools/slang-test/test-context.cpp
+++ b/tools/slang-test/test-context.cpp
@@ -61,29 +61,22 @@ TestReporter* TestContext::getTestReporter()
SlangResult TestContext::locateFileCheck()
{
- // TODO(JS):
- // Hack for now, disabling IFileCheck, as appears to cause crashes.
-
-#if 0
DefaultSharedLibraryLoader* loader = DefaultSharedLibraryLoader::getSingleton();
- ComPtr<ISlangSharedLibrary> library;
- SLANG_RETURN_ON_FAIL(loader->loadSharedLibrary("slang-llvm", library.writeRef()));
+
+ SLANG_RETURN_ON_FAIL(loader->loadSharedLibrary("slang-llvm", m_fileCheckLibrary.writeRef()));
- if (!library)
+ if (!m_fileCheckLibrary)
{
return SLANG_FAIL;
}
using CreateFileCheckFunc = SlangResult (*)(const SlangUUID&, void**);
- auto fn = reinterpret_cast<CreateFileCheckFunc>(library->findFuncByName("createLLVMFileCheck_V1"));
+ auto fn = reinterpret_cast<CreateFileCheckFunc>(m_fileCheckLibrary->findFuncByName("createLLVMFileCheck_V1"));
if(!fn)
{
return SLANG_FAIL;
}
return fn(SLANG_IID_PPV_ARGS(m_fileCheck.writeRef()));
-#else
- return SLANG_FAIL;
-#endif
}
Result TestContext::init(const char* inExePath)
diff --git a/tools/slang-test/test-context.h b/tools/slang-test/test-context.h
index 0abc6906f..00aad5888 100644
--- a/tools/slang-test/test-context.h
+++ b/tools/slang-test/test-context.h
@@ -193,6 +193,7 @@ protected:
Slang::Dictionary<Slang::String, SharedLibraryTool> m_sharedLibTools;
+ Slang::ComPtr<ISlangSharedLibrary> m_fileCheckLibrary;
Slang::ComPtr<Slang::IFileCheck> m_fileCheck;
};