From f33140f60b1a4a43e0dd25d48252957822e68bac Mon Sep 17 00:00:00 2001 From: Michael Walsh Date: Thu, 1 Nov 2018 14:05:56 -0500 Subject: [PATCH] process_robot_output_files: Default gzip arg to env var GZIP Also, misc. style improvements Change-Id: I4e9d757a71dd78b122e03a091e58b32c32375702 Signed-off-by: Michael Walsh --- lib/gen_call_robot.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/gen_call_robot.py b/lib/gen_call_robot.py index 991ea4c7a5..e33622966c 100755 --- a/lib/gen_call_robot.py +++ b/lib/gen_call_robot.py @@ -32,6 +32,10 @@ def init_robot_out_parms(extra_prefix=""): This function would typically be called prior to calling create_robot_cmd_string. + + Description of argument(s): + extra_prefix An extra prefix to be appended to the + default prefix for output file names. """ gp.dprint_executing() @@ -293,7 +297,7 @@ def create_robot_cmd_string(robot_file_path, *parms): def process_robot_output_files(robot_cmd_buf=None, robot_rc=None, - gzip=1): + gzip=None): r""" Process robot output files which can involve several operations: - If the files are in a temporary location, using SAVE_STATUS_POLICY to @@ -311,6 +315,7 @@ def process_robot_output_files(robot_cmd_buf=None, robot_cmd_buf = gm.dft(robot_cmd_buf, gcr_last_robot_cmd_buf) robot_rc = gm.dft(robot_rc, gcr_last_robot_rc) + gzip = gm.dft(gzip, int(os.environ.get("GZIP_ROBOT", "1"))) if robot_cmd_buf == "": # This can legitimately occur if this function is called from an