summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Geddes <crgeddes@us.ibm.com>2018-11-07 10:58:20 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-11-15 10:52:25 -0600
commit208f80eb821cc1226bbcd76b0ba108754c2a091e (patch)
treeec4d4307ce216c823d5599473ea6edcccc634b4c
parente34d17297e0d90ac7ca3d0056a02fe7ef089bef0 (diff)
downloadblackbird-hostboot-208f80eb821cc1226bbcd76b0ba108754c2a091e.tar.gz
blackbird-hostboot-208f80eb821cc1226bbcd76b0ba108754c2a091e.zip
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>
-rw-r--r--src/usr/fapi2/test/fapi2HwAccessTest.H34
1 files changed, 2 insertions, 32 deletions
diff --git a/src/usr/fapi2/test/fapi2HwAccessTest.H b/src/usr/fapi2/test/fapi2HwAccessTest.H
index 61bd1ced5..1c8a596b0 100644
--- a/src/usr/fapi2/test/fapi2HwAccessTest.H
+++ b/src/usr/fapi2/test/fapi2HwAccessTest.H
@@ -75,45 +75,15 @@ void test_fapi2HwAccess()
// Get a list of all of the proc chips
TARGETING::getAllChips(l_chipList, TARGETING::TYPE_PROC, false);
- TARGETING::Target * l_nimbusProc = nullptr;
- TARGETING::Target * l_cumulusProc = nullptr;
- TARGETING::Target * l_proc = nullptr;
-
- //Take the first NIMBUS proc and use it
- for(uint32_t i = 0; i < l_chipList.size(); i++)
- {
- if(TARGETING::MODEL_NIMBUS ==
- l_chipList[i]->getAttr<TARGETING::ATTR_MODEL>())
- {
- l_nimbusProc = l_chipList[i];
- break;
- }
- if(TARGETING::MODEL_CUMULUS ==
- l_chipList[i]->getAttr<TARGETING::ATTR_MODEL>())
- {
- l_cumulusProc = l_chipList[i];
- break;
- }
- }
-
numTests++;
- if (l_nimbusProc != nullptr)
- {
- l_proc = l_nimbusProc;
- }
- else if (l_cumulusProc != nullptr)
- {
- l_proc = l_cumulusProc;
- }
- else //both are nullptr
+ if(l_chipList.size() == 0)
{
TS_FAIL("FAPI2_fapi2HwAccess:: could not find any procs, skipping tests");
numFails++;
break;
}
- Target<fapi2::TARGET_TYPE_PROC_CHIP> fapi2_procTarget(
- l_proc);
+ Target<fapi2::TARGET_TYPE_PROC_CHIP> fapi2_procTarget(l_chipList[0]);
numTests++;
FAPI_INVOKE_HWP(l_errl, p9_scomtest_getscom_fail, fapi2_procTarget);
OpenPOWER on IntegriCloud