We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3882703 commit 691279bCopy full SHA for 691279b
modules/util/tests/util.cpp
@@ -19,7 +19,12 @@ TEST(util_tests, extracts_correct_namespace) {
19
TEST(util_tests, threads_control_check_openmp_disabled_valgrind) {
20
const auto num_threads_env_var = env::get<int>("PPC_NUM_THREADS");
21
22
- EXPECT_EQ(ppc::util::GetNumThreads(), omp_get_max_threads());
+ if (num_threads_env_var.has_value()) {
23
+ omp_set_num_threads(num_threads_env_var.value());
24
+ EXPECT_EQ(ppc::util::GetNumThreads(), omp_get_max_threads());
25
+ } else {
26
+ EXPECT_EQ(ppc::util::GetNumThreads(), 1);
27
+ }
28
}
29
30
namespace test_ns {
0 commit comments