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

INTERMEDIATE SAVE - TO BE CONTINUED!!!!

parent 1423a860
No related branches found
No related tags found
No related merge requests found
......@@ -71,6 +71,7 @@ def test_led(hostname='192.168.1.34', timeout=100, **kwargs):
subtests = []
fru = 0
led_color = [ 1, 2, 3, 5 ]
for led in range(4):
measurements = []
......@@ -80,6 +81,7 @@ def test_led(hostname='192.168.1.34', timeout=100, **kwargs):
# set LED - ON
try:
led_state_on['color'] = led_color[led]
r = ipmiLan.ipmc_write_led(fru, led, led_state_on)
except Exception as e:
print(f'[ERROR] Writing LED #{led}: {str(e)}')
......@@ -87,13 +89,13 @@ 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)
if led_state_read != led_state_on:
print(f'[ERROR] Writing LED #{led}: different state {led_state_read}')
# get LED state and compare
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
......@@ -102,6 +104,7 @@ def test_led(hostname='192.168.1.34', timeout=100, **kwargs):
# set LED - OFF
try:
led_state_off['color'] = led_color[led]
r = ipmiLan.ipmc_write_led(fru, led, led_state_off)
except Exception as e:
print(f'[ERROR] Writing LED #{led}: {str(e)}')
......@@ -109,19 +112,19 @@ 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)}')
if led_state_read != led_state_off:
print(f'[ERROR] Writing LED #{led}: different state {led_state_read}')
# get LED state and compare
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'
verbose = f'LED #{led} incorrect: OFF expected - ON read'
print(f'[ERROR ] {verbose}')
print(f'[Info] LED #{led}')
measurements.append({'name': 'read_led', 'data': {'s': 'LED test', 'v': 0}, 'pass': 0 })
subtests.append({ 'test_type_name': 'LED_v.1.0',
......
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