Merge branch 'origin/release-2021' into merge-2021-into-master
[alexxy/gromacs.git] / src / testutils / test_hardware_environment.cpp
index da352962e1a6101822d85d5ec49d87268c1fae09..c42f02d9e91ca741d13b005bb2c89d0fcfb4047d 100644 (file)
@@ -99,6 +99,7 @@ void TestHardwareEnvironment::SetUp()
     // Constructing contexts for all compatible GPUs - will be empty on non-GPU builds
     for (const DeviceInformation& compatibleDeviceInfo : getCompatibleDevices(hardwareInfo_->deviceInfoList))
     {
+        setActiveDevice(compatibleDeviceInfo);
         std::string description = getDeviceInformationString(compatibleDeviceInfo);
         testDeviceList_.emplace_back(std::make_unique<TestDevice>(description.c_str(), compatibleDeviceInfo));
     }