Skip to content

Commit 208f80e

Browse files
crgeddesdcrowell77
authored andcommitted
Refactor fapi2HwAccessTest to ignore ATTR_MODEL
This test case doing some unneccesary lookups of the MODEL attribute when determining what processor to use for the test cases. To simplify we will just take the first functional proc target we find, regardless of the model. Change-Id: Ic34ea64a0a4bbad1c25bbbc18bfaaf8d3a542f28 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/68501 Reviewed-by: Matt Derksen <mderkse1@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
1 parent e34d172 commit 208f80e

File tree

1 file changed

+2
-32
lines changed

1 file changed

+2
-32
lines changed

src/usr/fapi2/test/fapi2HwAccessTest.H

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -75,45 +75,15 @@ void test_fapi2HwAccess()
7575
// Get a list of all of the proc chips
7676
TARGETING::getAllChips(l_chipList, TARGETING::TYPE_PROC, false);
7777

78-
TARGETING::Target * l_nimbusProc = nullptr;
79-
TARGETING::Target * l_cumulusProc = nullptr;
80-
TARGETING::Target * l_proc = nullptr;
81-
82-
//Take the first NIMBUS proc and use it
83-
for(uint32_t i = 0; i < l_chipList.size(); i++)
84-
{
85-
if(TARGETING::MODEL_NIMBUS ==
86-
l_chipList[i]->getAttr<TARGETING::ATTR_MODEL>())
87-
{
88-
l_nimbusProc = l_chipList[i];
89-
break;
90-
}
91-
if(TARGETING::MODEL_CUMULUS ==
92-
l_chipList[i]->getAttr<TARGETING::ATTR_MODEL>())
93-
{
94-
l_cumulusProc = l_chipList[i];
95-
break;
96-
}
97-
}
98-
9978
numTests++;
100-
if (l_nimbusProc != nullptr)
101-
{
102-
l_proc = l_nimbusProc;
103-
}
104-
else if (l_cumulusProc != nullptr)
105-
{
106-
l_proc = l_cumulusProc;
107-
}
108-
else //both are nullptr
79+
if(l_chipList.size() == 0)
10980
{
11081
TS_FAIL("FAPI2_fapi2HwAccess:: could not find any procs, skipping tests");
11182
numFails++;
11283
break;
11384
}
11485

115-
Target<fapi2::TARGET_TYPE_PROC_CHIP> fapi2_procTarget(
116-
l_proc);
86+
Target<fapi2::TARGET_TYPE_PROC_CHIP> fapi2_procTarget(l_chipList[0]);
11787

11888
numTests++;
11989
FAPI_INVOKE_HWP(l_errl, p9_scomtest_getscom_fail, fapi2_procTarget);

0 commit comments

Comments
 (0)