Skip to content
Snippets Groups Projects
Commit 1423a860 authored by Ralf Spiwoks's avatar Ralf Spiwoks
Browse files

INTERMEDIATE SAVE - TO BE CONTINUED!!!!

parent cc7763a8
No related branches found
No related tags found
No related merge requests found
......@@ -52,16 +52,16 @@ def cernipmc_test():
def cernipmc_test_seq(boardSplittedRef=[None, None], ha_address=0x41, hostname='192.168.1.34', enableProgramming=False, enableMACFlashing=False, **kwargs):
enablePowerTesting = True
enableHaTesting = True
enableAtcaTesting = True
enableLedTesting = False
enableAmcTesting = True
enableIoTesting = True
enableMgtI2cTesting = True
enableSensorI2cTesting = True
enableUartTesting = True
enableConfigTesting = True
enablePowerTesting = False
enableHaTesting = False
enableAtcaTesting = False
enableLedTesting = True
enableAmcTesting = False
enableIoTesting = False
enableMgtI2cTesting = False
enableSensorI2cTesting = False
enableUartTesting = False
enableConfigTesting = False
#Test details
try:
......@@ -155,7 +155,7 @@ def cernipmc_test_seq(boardSplittedRef=[None, None], ha_address=0x41, hostname='
subtests.append(s)
if s['pass'] != 0:
global_res |= 0x04
global_prt += '[Result] LED test {} FAILED!\n'.format(hex(s['details']['ha']))
global_prt += '[Result] LED test {} FAILED!\n'.format(hex(s['details']['led']))
print('[Result] LED test {}\n'.format('passed' if s['pass'] == 0 else 'failed'))
#LAN
......
......@@ -87,13 +87,15 @@ def test_led(hostname='192.168.1.34', timeout=100, **kwargs):
led_state_read = ipmiLan.ipmc_read_led(fru, led)
except Exception as e:
print(f'[ERROR] Writing LED #{led}: {str(e)}')
print(led_state_read)
# get LED state and compare
r = IPMCDevATCAObject.GETLED(led)
if r != 0:
print(f'[ERROR] Getting LED #{led}')
if led_read != led_on:
measurements.append({'name': 'read_led', 'data': {'s': 'LED state ON', 'v': led_read}, 'pass': -1 })
led_read = IPMCDevATCAObject.GETLED(led)
if led_read < 0:
print(f'[ERROR] Reading LED #{led} (r = {led_read})')
print(f'led_read = {led_read}')
if led_read != 1:
measurements.append({'name': 'led_read', 'data': {'s': 'LED state ON', 'v': led_read}, 'pass': -1 })
passed = -1
verbose = f'LED #{led} state incorrect: ON expected - OFF read'
print(f'[ERROR ] {verbose}')
......@@ -109,11 +111,12 @@ def test_led(hostname='192.168.1.34', timeout=100, **kwargs):
print(f'[ERROR] Writing LED #{led}: {str(e)}')
# get LED state and compare
r = IPMCDevATCAObject.GETLED(led)
if r != 0:
print(f'[ERROR] Getting LED #{led}')
if led_read != led_off:
measurements.append({'name': 'read_led', 'data': {'s': 'LED state OFF', 'v': led_read}, 'pass': -1 })
led_read = IPMCDevATCAObject.GETLED(led)
print(f'led_read = {led_read}')
if led_read < 0:
print(f'[ERROR] Reading LED #{led} (r = {led_read})')
if led_read != 0:
measurements.append({'name': 'led_read', 'data': {'s': 'LED state OFF', 'v': led_read}, 'pass': -1 })
passed = -1
verbose = f'HLED #{led} incorrect: OFF expected - ON read'
print(f'[ERROR ] {verbose}')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment