@@ -2684,7 +2684,7 @@ static TestResult runCPPCompilerSharedLibrary(TestContext* context, TestInput& i
2684
2684
{
2685
2685
printf (" Unable to access 'test' function\n " );
2686
2686
}
2687
-
2687
+
2688
2688
printf (" Unload handle\n " );
2689
2689
fflush (stdout);
2690
2690
SharedLibrary::unload (handle);
@@ -4555,12 +4555,16 @@ static SlangResult runUnitTestModule(
4555
4555
SLANG_RETURN_ON_FAIL (loader->loadSharedLibrary (
4556
4556
Path::combine (context->dllDirectoryPath , moduleName).getBuffer (),
4557
4557
moduleLibrary.writeRef ()));
4558
- printf (" FILE LINE: %s %d\n " , __FILE__, __LINE__); fflush (stdout); fflush (stderr);
4558
+ printf (" FILE LINE: %s %d\n " , __FILE__, __LINE__);
4559
+ fflush (stdout);
4560
+ fflush (stderr);
4559
4561
UnitTestGetModuleFunc getModuleFunc =
4560
4562
(UnitTestGetModuleFunc)moduleLibrary->findFuncByName (" slangUnitTestGetModule" );
4561
4563
if (!getModuleFunc)
4562
4564
return SLANG_FAIL;
4563
- printf (" FILE LINE: %s %d\n " , __FILE__, __LINE__); fflush (stdout); fflush (stderr);
4565
+ printf (" FILE LINE: %s %d\n " , __FILE__, __LINE__);
4566
+ fflush (stdout);
4567
+ fflush (stderr);
4564
4568
4565
4569
IUnitTestModule* testModule = getModuleFunc ();
4566
4570
if (!testModule)
@@ -4637,7 +4641,7 @@ static SlangResult runUnitTestModule(
4637
4641
printf (" 2RPC FILE LINE: %s %d\n " , __FILE__, __LINE__);
4638
4642
const auto testResult = _asTestResult (ToolReturnCode (exeRes.resultCode ));
4639
4643
printf (" 2RPC FILE LINE: %s %d\n " , __FILE__, __LINE__);
4640
-
4644
+
4641
4645
// If the test fails, output any output - which might give information about
4642
4646
// individual tests that have failed.
4643
4647
if (SLANG_FAILED (rpcRes) || testResult == TestResult::Fail)
@@ -4663,13 +4667,12 @@ static SlangResult runUnitTestModule(
4663
4667
fflush (stderr);
4664
4668
printf (" TF FILE LINE: %s %d\n " , __FILE__, __LINE__);
4665
4669
fflush (stdout);
4666
- fflush (stderr);
4670
+ fflush (stderr);
4667
4671
test.testFunc (&unitTestContext);
4668
4672
printf (" TF2 FILE LINE: %s %d\n " , __FILE__, __LINE__);
4669
4673
printf (" FILE LINE: %s %d\n " , __FILE__, __LINE__);
4670
4674
fflush (stdout);
4671
4675
fflush (stderr);
4672
-
4673
4676
}
4674
4677
catch (...)
4675
4678
{
@@ -4712,7 +4715,6 @@ static SlangResult runUnitTestModule(
4712
4715
printf (" B Ran unit test file %s line %d\n " , __FILE__, __LINE__);
4713
4716
fflush (stdout);
4714
4717
fflush (stderr);
4715
-
4716
4718
}
4717
4719
}
4718
4720
@@ -4775,7 +4777,7 @@ SlangResult innerMain(int argc, char** argv)
4775
4777
{
4776
4778
SlangSession* session = context.getSession ();
4777
4779
4778
-
4780
+
4779
4781
out.print (" Supported backends:" );
4780
4782
4781
4783
for (int i = 0 ; i < SLANG_PASS_THROUGH_COUNT_OF; ++i)
@@ -4818,7 +4820,7 @@ SlangResult innerMain(int argc, char** argv)
4818
4820
SLANG_CPP_SOURCE,
4819
4821
SLANG_SHADER_HOST_CALLABLE);
4820
4822
out.print (" FILE LINE: %s %d\n " , __FILE__, __LINE__);
4821
-
4823
+
4822
4824
if (hasLlvm && hostCallableCompiler == SLANG_PASS_THROUGH_LLVM && SLANG_PROCESSOR_X86)
4823
4825
{
4824
4826
// TODO(JS)
@@ -4831,10 +4833,9 @@ SlangResult innerMain(int argc, char** argv)
4831
4833
categorySet.add (" war-double-host-callable" , fullTestCategory);
4832
4834
}
4833
4835
out.print (" FILE LINE: %s %d\n " , __FILE__, __LINE__);
4834
-
4835
4836
}
4836
4837
out.print (" FILE LINE: %s %d\n " , __FILE__, __LINE__);
4837
-
4838
+
4838
4839
// Working out what renderApis is worked on on demand through
4839
4840
// _getAvailableRenderApiFlags()
4840
4841
@@ -4843,21 +4844,21 @@ SlangResult innerMain(int argc, char** argv)
4843
4844
context.setInnerMainFunc (" slangc" , &SlangCTool::innerMain);
4844
4845
}
4845
4846
out.print (" FILE LINE: %s %d\n " , __FILE__, __LINE__);
4846
-
4847
+
4847
4848
SLANG_RETURN_ON_FAIL (
4848
4849
Options::parse (argc, argv, &categorySet, StdWriters::getError (), &context.options ));
4849
4850
out.print (" FILE LINE: %s %d\n " , __FILE__, __LINE__);
4850
-
4851
+
4851
4852
Options& options = context.options ;
4852
4853
out.print (" FILE LINE: %s %d\n " , __FILE__, __LINE__);
4853
-
4854
+
4854
4855
context.setMaxTestRunnerThreadCount (options.serverCount );
4855
4856
out.print (" FILE LINE: %s %d\n " , __FILE__, __LINE__);
4856
-
4857
+
4857
4858
// Set up the prelude/s
4858
4859
TestToolUtil::setSessionDefaultPreludeFromExePath (argv[0 ], context.getSession ());
4859
4860
out.print (" FILE LINE: %s %d\n " , __FILE__, __LINE__);
4860
-
4861
+
4861
4862
if (options.outputMode == TestOutputMode::TeamCity)
4862
4863
{
4863
4864
// On TeamCity CI there is an issue with unix/linux targets where test system may be
@@ -4876,11 +4877,11 @@ SlangResult innerMain(int argc, char** argv)
4876
4877
_disableD3D12Backend (&context);
4877
4878
#endif
4878
4879
out.print (" FILE LINE: %s %d\n " , __FILE__, __LINE__);
4879
-
4880
+
4880
4881
if (options.subCommand .getLength ())
4881
4882
{
4882
4883
out.print (" FILE LINE: %s %d\n " , __FILE__, __LINE__);
4883
-
4884
+
4884
4885
// Get the function from the tool
4885
4886
auto func = context.getInnerMainFunc (options.binDir , options.subCommand );
4886
4887
if (!func)
@@ -4907,20 +4908,20 @@ SlangResult innerMain(int argc, char** argv)
4907
4908
args.getBuffer ());
4908
4909
}
4909
4910
out.print (" FILE LINE: %s %d\n " , __FILE__, __LINE__);
4910
-
4911
+
4911
4912
if (options.includeCategories .getCount () == 0 )
4912
4913
{
4913
4914
options.includeCategories .add (fullTestCategory, fullTestCategory);
4914
4915
}
4915
4916
out.print (" FILE LINE: %s %d\n " , __FILE__, __LINE__);
4916
-
4917
+
4917
4918
// Don't include OptiX tests unless the client has explicit opted into them.
4918
4919
if (!options.includeCategories .containsKey (optixTestCategory))
4919
4920
{
4920
4921
options.excludeCategories .add (optixTestCategory, optixTestCategory);
4921
4922
}
4922
4923
out.print (" FILE LINE: %s %d\n " , __FILE__, __LINE__);
4923
-
4924
+
4924
4925
// Exclude rendering tests when building under AppVeyor.
4925
4926
//
4926
4927
// TODO: this is very ad hoc, and we should do something cleaner.
@@ -4947,7 +4948,7 @@ SlangResult innerMain(int argc, char** argv)
4947
4948
runTestsInDirectory (&context);
4948
4949
}
4949
4950
out.print (" FILE LINE: %s %d\n " , __FILE__, __LINE__);
4950
-
4951
+
4951
4952
// Run the unit tests (these are internal C++ tests - not specified via files in a
4952
4953
// directory) They are registered with SLANG_UNIT_TEST macro
4953
4954
//
@@ -4987,7 +4988,7 @@ SlangResult innerMain(int argc, char** argv)
4987
4988
TestReporter::set (nullptr );
4988
4989
}
4989
4990
out.print (" 4941 FILE LINE: %s %d\n " , __FILE__, __LINE__);
4990
-
4991
+
4991
4992
// If we have a couple failed tests, they maybe intermittent failures due to parallel
4992
4993
// excution or driver instability. We can try running them again.
4993
4994
static constexpr int kFailedTestLimitForRetry = 16 ;
@@ -5021,7 +5022,7 @@ SlangResult innerMain(int argc, char** argv)
5021
5022
}
5022
5023
}
5023
5024
out.print (" 4975 FILE LINE: %s %d\n " , __FILE__, __LINE__);
5024
-
5025
+
5025
5026
reporter.outputSummary ();
5026
5027
return reporter.didAllSucceed () ? SLANG_OK : SLANG_FAIL;
5027
5028
}
0 commit comments