From 295a9b34e3d148108357f1e04520890f1a781981 Mon Sep 17 00:00:00 2001 From: Jun Liu Date: Thu, 30 Nov 2023 14:24:50 -0800 Subject: [PATCH] [HotFix] Env Var set conflicts between #2543 and #2514 (#2571) --- Jenkinsfile | 2 +- test/gtest/sum.cpp | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5941992138..7e07d3deba 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,5 @@ def rocmnode(name) { - return 'rocmtest && miopen && (' + name + ')' + return '(rocmtest || miopen) && (' + name + ')' } def miopenCheckout() diff --git a/test/gtest/sum.cpp b/test/gtest/sum.cpp index 747bb9ce28..0965649c23 100644 --- a/test/gtest/sum.cpp +++ b/test/gtest/sum.cpp @@ -23,16 +23,20 @@ * SOFTWARE. * *******************************************************************************/ +#include #include "sum.hpp" +MIOPEN_DECLARE_ENV_VAR_STR(MIOPEN_TEST_FLOAT_ARG) +MIOPEN_DECLARE_ENV_VAR_BOOL(MIOPEN_TEST_ALL) + std::string GetFloatArg() { - static const auto tmp = miopen::GetEnv("MIOPEN_TEST_FLOAT_ARG"); + const auto& tmp = miopen::GetStringEnv(ENV(MIOPEN_TEST_FLOAT_ARG)); if(tmp.empty()) { return ""; } - return tmp.front(); + return tmp; } struct SumTestFloat : SumTest @@ -41,7 +45,7 @@ struct SumTestFloat : SumTest TEST_P(SumTestFloat, SumTestFw) { - if(miopen::IsEnvvarValueEnabled("MIOPEN_TEST_ALL") && (GetFloatArg() == "--float")) + if(miopen::IsEnabled(ENV(MIOPEN_TEST_ALL)) && (GetFloatArg() == "--float")) { RunTest(); Verify();