From a115f577ddc089a7afb65d546852c57ba86b95c7 Mon Sep 17 00:00:00 2001 From: gilbertlee-amd <44450918+gilbertlee-amd@users.noreply.github.com> Date: Tue, 21 May 2019 14:34:20 -0600 Subject: [PATCH] Adding fix for unsufficient devices / better logging for skipped tests (#63) --- test/CorrectnessTest.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/CorrectnessTest.hpp b/test/CorrectnessTest.hpp index d0a4680ef3..e7d3c75382 100644 --- a/test/CorrectnessTest.hpp +++ b/test/CorrectnessTest.hpp @@ -173,8 +173,13 @@ namespace CorrectnessTests // Only proceed with testing if there are enough GPUs if (numDevices > numDevicesAvailable) { - fprintf(stdout, "Skipping test requring %d devices (only %d available)\n", + fprintf(stdout, "[ SKIPPED ] Test requires %d devices (only %d available)\n", numDevices, numDevicesAvailable); + + // Modify the number of devices so that tear-down doesn't occur + // This is temporary until GTEST_SKIP() becomes available + numDevices = 0; + numDevicesAvailable = -1; return; }