Skip to content

Commit 295a9b3

Browse files
authored
[HotFix] Env Var set conflicts between #2543 and #2514 (#2571)
1 parent 8605896 commit 295a9b3

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
def rocmnode(name) {
2-
return 'rocmtest && miopen && (' + name + ')'
2+
return '(rocmtest || miopen) && (' + name + ')'
33
}
44

55
def miopenCheckout()

test/gtest/sum.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,20 @@
2323
* SOFTWARE.
2424
*
2525
*******************************************************************************/
26+
#include <miopen/env.hpp>
2627
#include "sum.hpp"
2728

29+
MIOPEN_DECLARE_ENV_VAR_STR(MIOPEN_TEST_FLOAT_ARG)
30+
MIOPEN_DECLARE_ENV_VAR_BOOL(MIOPEN_TEST_ALL)
31+
2832
std::string GetFloatArg()
2933
{
30-
static const auto tmp = miopen::GetEnv("MIOPEN_TEST_FLOAT_ARG");
34+
const auto& tmp = miopen::GetStringEnv(ENV(MIOPEN_TEST_FLOAT_ARG));
3135
if(tmp.empty())
3236
{
3337
return "";
3438
}
35-
return tmp.front();
39+
return tmp;
3640
}
3741

3842
struct SumTestFloat : SumTest<float>
@@ -41,7 +45,7 @@ struct SumTestFloat : SumTest<float>
4145

4246
TEST_P(SumTestFloat, SumTestFw)
4347
{
44-
if(miopen::IsEnvvarValueEnabled("MIOPEN_TEST_ALL") && (GetFloatArg() == "--float"))
48+
if(miopen::IsEnabled(ENV(MIOPEN_TEST_ALL)) && (GetFloatArg() == "--float"))
4549
{
4650
RunTest();
4751
Verify();

0 commit comments

Comments
 (0)