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)
diff --git a/lib/gen_misc.py b/lib/gen_misc.py
index 0dc0d64..ef0710d 100755
--- a/lib/gen_misc.py
+++ b/lib/gen_misc.py
@@ -592,23 +592,3 @@
     """
 
     return [str(stack_frame[3]) for stack_frame in inspect.stack()]
-
-
-def username():
-    r"""
-    Return the username for the current process.
-    """
-
-    username = os.environ.get("USER", "")
-    if username != "":
-        return username
-    user_num = str(os.geteuid())
-    try:
-        username = os.getlogin()
-    except OSError:
-        if user_num == "0":
-            username = "root"
-        else:
-            username = "?"
-
-    return username
diff --git a/lib/gen_plug_in_utils.py b/lib/gen_plug_in_utils.py
index 9af1be3..769e73e 100755
--- a/lib/gen_plug_in_utils.py
+++ b/lib/gen_plug_in_utils.py
@@ -45,7 +45,7 @@
     Example excerpt of resulting dictionary:
 
     plug_var_dict:
-      [AUTOBOOT_BASE_TOOL_DIR_PATH]:  /tmp/
+      [AUTOBOOT_BASE_TOOL_DIR_PATH]:  /fspmount/
       [AUTOBOOT_BB_LEVEL]:            <blank>
       [AUTOBOOT_BOOT_FAIL]:           0
       ...
@@ -146,7 +146,7 @@
     package_name>_ in upper case letters.).
 
     Example excerpt of output:
-    AUTOBOOT_BASE_TOOL_DIR_PATH=/tmp/
+    AUTOBOOT_BASE_TOOL_DIR_PATH=/fspmount/
     AUTOBOOT_BB_LEVEL=
     AUTOBOOT_BOOT_FAIL=0
     AUTOBOOT_BOOT_FAIL_THRESHOLD=1000000
@@ -385,15 +385,14 @@
 
     BASE_TOOL_DIR_PATH = \
         gm.add_trailing_slash(os.environ.get(PLUG_VAR_PREFIX
-                                             + "_BASE_TOOL_DIR_PATH",
-                                             "/tmp/"))
+                                             + "BASE_TOOL_DIR_PATH",
+                                             "/fspmount/"))
     NICKNAME = os.environ.get("AUTOBOOT_OPENBMC_NICKNAME", "")
     if NICKNAME == "":
         NICKNAME = os.environ["AUTOIPL_FSP1_NICKNAME"]
     MASTER_PID = os.environ[PLUG_VAR_PREFIX + "_MASTER_PID"]
-    gp.pvars(BASE_TOOL_DIR_PATH, NICKNAME, plug_in_package_name, MASTER_PID)
-    return BASE_TOOL_DIR_PATH + gm.username() + "/" + NICKNAME + "/" +\
-        plug_in_package_name + "/" + str(MASTER_PID) + "/"
+    return BASE_TOOL_DIR_PATH + os.environ["USER"] + "/" + NICKNAME + "/" +\
+        plug_in_package_name + "/" + MASTER_PID + "/"
 
 
 def create_plug_in_save_dir(plug_in_package_name=None):