Skip to content

Commit

Permalink
Ignore test in test_turn_on_off_psu_and_check_psustatus (#1606)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenxs authored Apr 30, 2020
1 parent 6111cc0 commit 0931bdb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/platform/test_platform_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,19 @@ def check_all_psu_on(dut, psu_test_results):
return len(power_off_psu_list) == 0


@pytest.mark.disable_loganalyzer
def test_turn_on_off_psu_and_check_psustatus(testbed_devices, psu_controller):
"""
@summary: Turn off/on PSU and check PSU status using 'show platform psustatus'
"""
ans_host = testbed_devices["dut"]

loganalyzer = LogAnalyzer(ansible_host=ans_host, marker_prefix='turn_on_off_psu_and_check_psustatus')
loganalyzer.load_common_config()

loganalyzer.ignore_regex.append("Error getting sensor data: dps460.*Kernel interface error")
marker = loganalyzer.init()

psu_line_pattern = re.compile(r"PSU\s+\d+\s+(OK|NOT OK|NOT PRESENT)")

psu_num = get_psu_num(ans_host)
Expand Down Expand Up @@ -252,6 +259,8 @@ def test_turn_on_off_psu_and_check_psustatus(testbed_devices, psu_controller):
for psu in psu_test_results:
assert psu_test_results[psu], "Test psu status of PSU %s failed" % psu

loganalyzer.analyze(marker)


def parse_platform_summary(raw_input_lines):
"""
Expand Down

0 comments on commit 0931bdb

Please sign in to comment.