Added logging of thread count in more mt tests
authorJari Komppa <jari.komppa@siru.fi>
Tue, 11 Jul 2017 12:28:18 +0000 (15:28 +0300)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Wed, 12 Jul 2017 07:44:42 +0000 (03:44 -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.

Gerrit change 1214 added logging to one set of tests:
dEQP-VK.api.object_management.multithreaded_per_thread_device.*

This change does the same for the other multithreaded tests
under object_management.

Affects:

dEQP-VK.api.object_management.multithreaded_per_thread_resources.*
dEQP-VK.api.object_management.multithreaded_shared_resources.*

Components: Vulkan

VK-GL-CTS issue: 80

Change-Id: Iab96e1c249f9113c74ebc851e27558611cb1ede7

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

index 7f52d87..d65aeb1 100644 (file)
@@ -2312,11 +2312,14 @@ private:
 template<typename Object>
 tcu::TestStatus multithreadedCreateSharedResourcesTest (Context& context, typename Object::Parameters params)
 {
+       TestLog&                                                        log                     = context.getTestContext().getLog();
        const deUint32                                          numThreads      = getDefaultTestThreadCount();
        const Environment                                       env                     (context, numThreads);
        const typename Object::Resources        res                     (env, params);
        ThreadGroup                                                     threads;
 
+       log << TestLog::Message << "numThreads = " << numThreads << TestLog::EndMessage;
+
        for (deUint32 ndx = 0; ndx < numThreads; ndx++)
                threads.add(MovePtr<ThreadGroupThread>(new CreateThread<Object>(env, res, params)));
 
@@ -2328,11 +2331,14 @@ tcu::TestStatus multithreadedCreatePerThreadResourcesTest (Context& context, typ
 {
        typedef SharedPtr<typename Object::Resources>   ResPtr;
 
+       TestLog&                        log                     = context.getTestContext().getLog();
        const deUint32          numThreads      = getDefaultTestThreadCount();
        const Environment       env                     (context, 1u);
        vector<ResPtr>          resources       (numThreads);
        ThreadGroup                     threads;
 
+       log << TestLog::Message << "numThreads = " << numThreads << TestLog::EndMessage;
+
        for (deUint32 ndx = 0; ndx < numThreads; ndx++)
        {
                resources[ndx] = ResPtr(new typename Object::Resources(env, params));