| 904 | static std::mutex gTestStateMutex; |
| 905 | |
| 906 | void 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 | |
| 940 | void callTestFunctions(test_definition testList[], |
| 941 | unsigned char selectedTestList[], |
nothing calls this directly
no test coverage detected