diff options
author | Missy Connell <missyc@us.ibm.com> | 2012-04-25 14:29:54 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-05-09 10:59:46 -0500 |
commit | 91d3c3f897bdeb6bab4259eafaa42b24b669b1d2 (patch) | |
tree | 4426f49054ec0119e04099250032c68bed3bcf55 /src/usr/i2c | |
parent | 7362a70f4b11b12578c938cb40a0143f6bfeda7d (diff) | |
download | talos-hostboot-91d3c3f897bdeb6bab4259eafaa42b24b669b1d2.tar.gz talos-hostboot-91d3c3f897bdeb6bab4259eafaa42b24b669b1d2.zip |
Update testcases to use Attributes for present and functional
Update testcases for scom, i2c, mvpd, fsi
Change-Id: I357c4efb046c04da1c801ec257a1827e36a73e25
RTC: 39765
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/943
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/i2c')
-rwxr-xr-x | src/usr/i2c/test/eepromddtest.H | 17 | ||||
-rwxr-xr-x | src/usr/i2c/test/i2ctest.H | 32 |
2 files changed, 43 insertions, 6 deletions
diff --git a/src/usr/i2c/test/eepromddtest.H b/src/usr/i2c/test/eepromddtest.H index 0e8ceae73..5c622a7f5 100755 --- a/src/usr/i2c/test/eepromddtest.H +++ b/src/usr/i2c/test/eepromddtest.H @@ -133,8 +133,9 @@ class EEPROMTest: public CxxTest::TestSuite for( uint32_t j = 0; j < fullList.size(); j++ ) { - // Skip this target if EEPROM isn't available. - if( !isI2CAvailable( fullList[j] ) ) + // Skip this target if EEPROM isn't available. or if non functional + if( !isI2CAvailable( fullList[j] ) || + !fullList[j]->getAttr<TARGETING::ATTR_HWAS_STATE>().functional) { continue; } @@ -215,8 +216,10 @@ class EEPROMTest: public CxxTest::TestSuite tS.masterProcChipTargetHandle( testTarget ); assert(testTarget != NULL); - // Skip this target if EEPROM isn't available. - if( !isI2CAvailable( testTarget ) ) + // Skip this target if EEPROM isn't available or target is non + // functional + if( !isI2CAvailable( testTarget ) || + !testTarget->getAttr<TARGETING::ATTR_HWAS_STATE>().functional) { continue; } @@ -267,8 +270,10 @@ class EEPROMTest: public CxxTest::TestSuite tS.masterProcChipTargetHandle( testTarget ); assert(testTarget != NULL); - // Skip this target if EEPROM isn't available. - if( !isI2CAvailable( testTarget ) ) + // Skip this target if EEPROM isn't available. or target is non + // functional + if( !isI2CAvailable( testTarget ) || + !testTarget->getAttr<TARGETING::ATTR_HWAS_STATE>().functional) { continue; } diff --git a/src/usr/i2c/test/i2ctest.H b/src/usr/i2c/test/i2ctest.H index e1933ac62..95f1cc16d 100755 --- a/src/usr/i2c/test/i2ctest.H +++ b/src/usr/i2c/test/i2ctest.H @@ -219,6 +219,22 @@ class I2CTest: public CxxTest::TestSuite // Check to see if I2C function is there if( !isI2CAvailable( theTarget ) ) { + TRACFCOMP( g_trac_i2c, + "testI2ReadWrite Operation - no i2c function" ); + + + continue; + } + + // check to see if the target is functional before we + // continue.. + if + (!theTarget->getAttr<TARGETING::ATTR_HWAS_STATE>().functional) + { + + TRACFCOMP( g_trac_i2c, + "testI2ReadWrite Operation - target not functional" ); + continue; } @@ -332,6 +348,22 @@ class I2CTest: public CxxTest::TestSuite // Check to see if I2C function is there if( !isI2CAvailable( testTarget ) ) { + TRACFCOMP( g_trac_i2c, + "testI2CInvalid Operation - no i2c function" ); + + + continue; + } + + // check to see if the target is functional before we + // continue.. + if + (!testTarget->getAttr<TARGETING::ATTR_HWAS_STATE>().functional) + { + TRACFCOMP( g_trac_i2c, + "testI2CInvalide Operation - not functional" ); + + continue; } |