summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/slang-test/slang-test-main.cpp30
1 files changed, 27 insertions, 3 deletions
diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp
index 3235cc785..8be8f797a 100644
--- a/tools/slang-test/slang-test-main.cpp
+++ b/tools/slang-test/slang-test-main.cpp
@@ -1217,6 +1217,8 @@ TestResult runReflectionTest(TestContext* context, TestInput& input)
auto filePath = input.filePath;
auto outputStem = input.outputStem;
+ bool isCPUTest = input.testOptions->command.startsWith("CPU_");
+
CommandLine cmdLine;
cmdLine.setExecutablePath(Path::combine(options.binDir, String("slang-reflection-test") + ProcessUtil::getExecutableSuffix()));
@@ -1237,6 +1239,15 @@ TestResult runReflectionTest(TestContext* context, TestInput& input)
String actualOutput = getOutput(exeRes);
+ if (isCPUTest)
+ {
+#if SLANG_PTR_IS_32
+ outputStem.append(".32");
+#else
+ outputStem.append(".64");
+#endif
+ }
+
String expectedOutputPath = outputStem + ".expected";
String expectedOutput;
try
@@ -2417,6 +2428,7 @@ static const TestCommandInfo s_testCommandInfos[] =
{
{ "SIMPLE", &runSimpleTest},
{ "REFLECTION", &runReflectionTest},
+ { "CPU_REFLECTION", &runReflectionTest},
{ "COMMAND_LINE_SIMPLE", &runSimpleCompareCommandLineTest},
{ "COMPARE_HLSL", &runHLSLComparisonTest},
{ "COMPARE_HLSL_RENDER", &runHLSLRenderComparisonTest},
@@ -2828,10 +2840,11 @@ SlangResult innerMain(int argc, char** argv)
/*auto computeTestCategory = */categorySet.add("compute", fullTestCategory);
auto vulkanTestCategory = categorySet.add("vulkan", fullTestCategory);
auto unitTestCatagory = categorySet.add("unit-test", fullTestCategory);
- auto compatibilityIssueCatagory = categorySet.add("compatibility-issue", fullTestCategory);
-
+ auto compatibilityIssueCategory = categorySet.add("compatibility-issue", fullTestCategory);
+ auto sharedLibraryCategory = categorySet.add("shared-library", fullTestCategory);
+
#if SLANG_WINDOWS_FAMILY
- auto windowsCatagory = categorySet.add("windows", fullTestCategory);
+ auto windowsCategory = categorySet.add("windows", fullTestCategory);
#endif
#if SLANG_UNIX_FAMILY
@@ -2908,6 +2921,17 @@ SlangResult innerMain(int argc, char** argv)
return func(StdWriters::getSingleton(), context.getSession(), int(args.getCount()), args.getBuffer());
}
+ // On TeamCity CI there is an issue with unix/linux targets where test system may be different from the build system
+ // That when C/C++ code is compiled, it does so for the test systems arch not for the build system
+ // This leads to shared library not being loadable, so we need to disable such tests that have this requirement
+ if (options.outputMode == TestOutputMode::TeamCity)
+ {
+#if SLANG_UNIX_FAMILY && SLANG_PROCESSOR_X86
+ // Disable shared library requiring tests
+ options.excludeCategories.Add(sharedLibraryCategory, sharedLibraryCategory);
+#endif
+ }
+
if( options.includeCategories.Count() == 0 )
{
options.includeCategories.Add(fullTestCategory, fullTestCategory);