Change obmc_boot_test.py to fail on blank state values.
Blank state values indicate that the states could not be obtained.
obmc_boot_test.py must have these values in order to make appropriate
decisions about what boot test to select.
Change-Id: Iff2187a5c1f76eac6926848be097ae4ca15df7a2
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/obmc_boot_test.py b/lib/obmc_boot_test.py
index 4ee66d1..77eaa7a 100755
--- a/lib/obmc_boot_test.py
+++ b/lib/obmc_boot_test.py
@@ -476,6 +476,22 @@
###############################################################################
+def valid_state():
+
+ r"""
+ Verify that our state dictionary contains no blank values. If we don't get
+ valid state data, we cannot continue to work.
+ """
+
+ if st.compare_states(state, st.invalid_state_match, 'or'):
+ error_message = "The state dictionary contains blank fields which" +\
+ " is illegal.\n" + gp.sprint_var(state)
+ BuiltIn().fail(gp.sprint_error(error_message))
+
+###############################################################################
+
+
+###############################################################################
def select_boot():
r"""
@@ -491,6 +507,7 @@
gp.qprint_timen("Selecting a boot test.")
my_get_state()
+ valid_state()
stack_popped = 0
if len(boot_stack) > 0: