Added logging of thread count in some mt tests
authorJari Komppa <jari.komppa@siru.fi>
Tue, 27 Jun 2017 12:14:25 +0000 (15:14 +0300)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 7 Jul 2017 09:09:39 +0000 (05:09 -0400)
This allows checking between two runs of the test suite to verify that
the same number of threads were used when running the tests.

The number of threads is (already) clamped between 2 and 8.

Affects:

dEQP-VK.api.object_management.multithreaded_per_thread_device*

Components: Vulkan

VK-GL-CTS issue: 80

Change-Id: I23ad351377a539865f42c1d57f3e01bb81be17e0

external/vulkancts/modules/vulkan/api/vktApiObjectManagementTests.cpp

index 41055f7..7f52d87 100644 (file)
@@ -2370,6 +2370,7 @@ tcu::TestStatus multithreadedCreatePerThreadDeviceTest (Context& context, typena
        typedef SharedPtr<EnvClone>                                             EnvPtr;
        typedef SharedPtr<typename Object::Resources>   ResPtr;
 
+       TestLog&                                        log                             = context.getTestContext().getLog();
        const deUint32                          numThreads              = getDefaultTestThreadCount();
        const Device::Parameters        deviceParams    = getDefaulDeviceParameters(context);
        const Environment                       sharedEnv               (context, numThreads);                  // For creating Device's
@@ -2377,6 +2378,8 @@ tcu::TestStatus multithreadedCreatePerThreadDeviceTest (Context& context, typena
        vector<ResPtr>                          resources               (numThreads);
        ThreadGroup                                     threads;
 
+       log << TestLog::Message << "numThreads = " << numThreads << TestLog::EndMessage;
+
        for (deUint32 ndx = 0; ndx < numThreads; ndx++)
        {
                perThreadEnv[ndx]       = EnvPtr(new EnvClone(sharedEnv, deviceParams, 1u));