MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCL-CTS / test_function_runner

Function test_function_runner

test_common/harness/testHarness.cpp:906–938  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

904static std::mutex gTestStateMutex;
905
906void test_function_runner(test_harness_state *state)
907{
908 int testID;
909 test_definition test;
910 while (true)
911 {
912 // Attempt to get a test
913 {
914 std::lock_guard<std::mutex> lock(gTestStateMutex);
915
916 // The queue is empty, we're done
917 if (gTestQueue.size() == 0)
918 {
919 return;
920 }
921
922 // Get the test at the front of the queue
923 testID = gTestQueue.front();
924 gTestQueue.pop_front();
925 test = state->tests[testID];
926 }
927
928 // Execute test
929 auto status =
930 callSingleTestFunction(test, state->device, state->config);
931
932 // Store result
933 {
934 std::lock_guard<std::mutex> lock(gTestStateMutex);
935 state->results[testID] = status;
936 }
937 }
938}
939
940void callTestFunctions(test_definition testList[],
941 unsigned char selectedTestList[],

Callers

nothing calls this directly

Calls 2

callSingleTestFunctionFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected