Revert "Set and save stop_check_rc after each decision to stop test execution"
This reverts commit c8483e3687aded01df097625a71a55075a326355.
Change-Id: I174d469085284843d306bef927b834fa4e27fafa
diff --git a/bin/plug_ins/Stop/cp_stop_check b/bin/plug_ins/Stop/cp_stop_check
index 11527c9..fcbd9c0 100755
--- a/bin/plug_ins/Stop/cp_stop_check
+++ b/bin/plug_ins/Stop/cp_stop_check
@@ -103,17 +103,6 @@
return True
-def stop_check():
- r"""
- Stop this program with the stop check return code.
- """
-
- if MASTER_PID != PROGRAM_PID:
- stop_check_rc = stop_test_rc
- save_plug_in_value(stop_check_rc)
- exit(stop_test_rc)
-
-
def rest_fail():
r"""
If STOP_REST_FAIL, then this function will determine whether REST commands
@@ -137,14 +126,13 @@
set_mod_global(keyword_string)
cmd_buf = create_robot_cmd_string("extended/run_keyword.robot",
- OPENBMC_HOST, REST_USERNAME,
- REST_PASSWORD, keyword_string,
+ OPENBMC_HOST, keyword_string,
lib_file_path, quiet, test_mode, debug,
outputdir, output, log, report, loglevel)
if not robot_cmd_fnc(cmd_buf):
print_timen("The caller wishes to stop test execution if REST" +
" commands are failing.")
- stop_check()
+ exit(stop_test_rc)
print_timen("REST commands are working so no reason as of yet to stop" +
" the test.")
@@ -165,7 +153,7 @@
if shell_rc == stop_test_rc:
print_timen("The caller wishes to stop test execution based on the" +
" presence of certain esel entries.")
- stop_check()
+ exit(stop_test_rc)
def main():
@@ -190,21 +178,21 @@
if STOP_COMMAND.upper() == "FAIL":
if AUTOBOOT_BOOT_SUCCESS == "0":
print_timen("The caller wishes to stop after each boot failure.")
- stop_check()
+ exit(stop_test_rc)
elif STOP_COMMAND.upper() == "ALL":
print_timen("The caller wishes to stop after each boot test.")
- stop_check()
+ exit(stop_test_rc)
elif len(STOP_COMMAND) > 0:
shell_rc, out_buf = cmd_fnc_u(STOP_COMMAND, quiet=quiet, show_err=0)
if shell_rc != 0:
print_timen("The caller wishes to stop test execution.")
- stop_check()
+ exit(stop_test_rc)
qprint_timen("The caller does not wish to stop the test run.")
return True
-
# Main
+
if not main():
exit(1)