summaryrefslogtreecommitdiffstats
path: root/src/usr/i2c/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/i2c/test')
-rwxr-xr-xsrc/usr/i2c/test/eepromddtest.H17
-rwxr-xr-xsrc/usr/i2c/test/i2ctest.H32
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;
}
OpenPOWER on IntegriCloud