Show systest inventory differences in console.
Display the contents of the inventory difference
file to the console whenever a significant
inventory difference is found.
Resolves openbmc/openbmc-test-automation#839
Change-Id: Icf5fc7f7d071b04fabd1083ad85e3a816e2fd5c4
Signed-off-by: Steven Sombar <ssombar@us.ibm.com>
diff --git a/syslib/utils_keywords.py b/syslib/utils_keywords.py
index 12d6c87..4e8b419 100644
--- a/syslib/utils_keywords.py
+++ b/syslib/utils_keywords.py
@@ -187,7 +187,7 @@
(value in diff_item.lower().strip())):
line_to_print = " " + \
str(row_num) + " " + diff_item + \
- " +++ NOTE! This difference is in" + \
+ " +++ NOTE! This line matches" + \
" the inventory ignore list and" + \
" can be ignored. +++\n"
# set flag indicating this item is a skip item
diff --git a/systest/htx_hardbootme_test.robot b/systest/htx_hardbootme_test.robot
index ce7594f..2021885 100755
--- a/systest/htx_hardbootme_test.robot
+++ b/systest/htx_hardbootme_test.robot
@@ -61,6 +61,7 @@
... ${EMPTY}
Set Suite Variable ${last_inventory_file_path} children=true
+ Set Suite Variable &{ignore_dict} children=true
Repeat Keyword ${HTX_LOOP} times Run HTX Exerciser
@@ -147,12 +148,14 @@
# diff_rc The failing return code from the difference check.
# json_diff_file_path The file that has the latest inventory snapshot.
- Log To Console Difference in inventory found, return code:
- ... no_newline=true
- Log to Console ${diff_rc}
- Log to Console Differences are listed in file: no_newline=true
- Log to Console ${json_diff_file_path}
- Fail Inventory mismatch, rc=${diff_rc}
+ Log To Console Significant difference in inventory found, rc=${diff_rc}
+ Log To Console Differences are listed in file: no_newline=true
+ Log To Console ${json_diff_file_path}
+ Log To Console File Contents:
+ Wait Until Created ${json_diff_file_path}
+ ${file_contents}= OperatingSystem.Get File ${json_diff_file_path}
+ Log ${file_contents} level=WARN
+ Fail Significant difference in inventory found, rc=${diff_rc}
Loop HTX Health Check