Change several python and robot files to 110 chars
Taking advantage of current team limit of 110 chars.
Change-Id: If7ab51fe894889967b8c8bb2f2fa4664f01117d5
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/gen_robot_plug_in.py b/lib/gen_robot_plug_in.py
index 1088cb5..035f1f7 100755
--- a/lib/gen_robot_plug_in.py
+++ b/lib/gen_robot_plug_in.py
@@ -1,8 +1,7 @@
#!/usr/bin/env python
r"""
-This module provides functions which are useful for running plug-ins from a
-robot program.
+This module provides functions which are useful for running plug-ins from a robot program.
"""
import sys
@@ -19,15 +18,13 @@
def rvalidate_plug_ins(plug_in_dir_paths,
quiet=1):
r"""
- Call the external validate_plug_ins.py program which validates the plug-in
- dir paths given to it. Return a list containing a normalized path for
- each plug-in selected.
+ Call the external validate_plug_ins.py program which validates the plug-in dir paths given to it. Return
+ a list containing a normalized path for each plug-in selected.
Description of arguments:
- plug_in_dir_paths A colon-separated list of plug-in
- directory paths.
- quiet If quiet is set to 1, this function will
- NOT write status messages to stdout.
+ plug_in_dir_paths A colon-separated list of plug-in directory paths.
+ quiet If quiet is set to 1, this function will NOT write status messages to
+ stdout.
"""
cmd_buf = "validate_plug_ins.py \"" + plug_in_dir_paths + "\""
@@ -54,76 +51,48 @@
debug=None,
return_history=False):
r"""
- Call the external process_plug_in_packages.py to process the plug-in
- packages. Return the following:
+ Call the external process_plug_in_packages.py to process the plug-in packages. Return the following:
rc The return code - 0 = PASS, 1 = FAIL.
- shell_rc The shell return code returned by
- process_plug_in_packages.py.
+ shell_rc The shell return code returned by process_plug_in_packages.py.
failed_plug_in_name The failed plug in name (if any).
Description of arguments:
plug_in_packages_list A python list of plug-in directory paths.
- call_point The call point program to be called for
- each plug-in package (e.g. post_boot).
- This name should not include the "cp_"
- prefix.
- shell_rc The user may supply a value other than
- zero to indicate an acceptable non-zero
- return code. For example, if this value
- equals 0x00000200, it means that for each
- plug-in call point that runs, a 0x00000200
- will not be counted as a failure.
- stop_on_plug_in_failure If this parameter is set to 1, this
- program will stop and return non-zero if
- the call point program from any plug-in
- directory fails. Conversely, if it is set
- to false, this program will run the call
- point program from each and every plug-in
- directory regardless of their return
- values. Typical example cases where you'd
- want to run all plug-in call points
- regardless of success or failure would be
- "cleanup" or "ffdc" call points.
- stop_on_non_zero_rc If this parm is set to 1 and a plug-in
- call point program returns a valid
- non-zero return code (see "shell_rc" parm
- above), this program will stop processing
- and return 0 (success). Since this
- constitutes a successful exit, this would
- normally be used where the caller wishes
- to stop processing if one of the plug-in
- directory call point programs returns a
- special value indicating that some special
- case has been found. An example might be
- in calling some kind of "check_errl" call
- point program. Such a call point program
- might return a 2 (i.e. 0x00000200) to
- indicate that a given error log entry was
- found in an "ignore" list and is therefore
- to be ignored. That being the case, no
- other "check_errl" call point program
- would need to be called.
- release_type The type of release being tested (e.g.
- "obmc", "op", "fips"). This influences
- which integrated plug-ins are selected.
- quiet If quiet is set to 1, this function will
- NOT write status messages to stdout. This
- will default to the global quiet program
- parm or to 0.
- debug If this parameter is set to 1, this
- function will print additional debug
- information. This is mainly to be used by
- the developer of this function. This will
- default to the global quiet program parm
- or to 0.
- return_history In addition to rc, shell_rc and
- failed_plug_in_name, return a list
- containing historical output that looks
- like the following:
+ call_point The call point program to be called for each plug-in package (e.g.
+ post_boot). This name should not include the "cp_" prefix.
+ shell_rc The user may supply a value other than zero to indicate an acceptable
+ non-zero return code. For example, if this value equals 0x00000200, it
+ means that for each plug-in call point that runs, a 0x00000200 will not
+ be counted as a failure.
+ stop_on_plug_in_failure If this parameter is set to 1, this program will stop and return non-zero
+ if the call point program from any plug-in directory fails. Conversely,
+ if it is set to false, this program will run the call point program from
+ each and every plug-in directory regardless of their return values.
+ Typical example cases where you'd want to run all plug-in call points
+ regardless of success or failure would be "cleanup" or "ffdc" call points.
+ stop_on_non_zero_rc If this parm is set to 1 and a plug-in call point program returns a valid
+ non-zero return code (see "shell_rc" parm above), this program will stop
+ processing and return 0 (success). Since this constitutes a successful
+ exit, this would normally be used where the caller wishes to stop
+ processing if one of the plug-in directory call point programs returns a
+ special value indicating that some special case has been found. An
+ example might be in calling some kind of "check_errl" call point program.
+ Such a call point program might return a 2 (i.e. 0x00000200) to indicate
+ that a given error log entry was found in an "ignore" list and is
+ therefore to be ignored. That being the case, no other "check_errl" call
+ point program would need to be called.
+ release_type The type of release being tested (e.g. "obmc", "op", "fips"). This
+ influences which integrated plug-ins are selected.
+ quiet If quiet is set to 1, this function will NOT write status messages to
+ stdout. This will default to the global quiet program parm or to 0.
+ debug If this parameter is set to 1, this function will print additional debug
+ information. This is mainly to be used by the developer of this
+ function. This will default to the global quiet program parm or to 0.
+ return_history In addition to rc, shell_rc and failed_plug_in_name, return a list
+ containing historical output that looks like the following:
history:
- history[0]: #(CDT) 2018/10/30 12:25:49 - Running
- OBMC_Sample/cp_post_stack
+ history[0]: #(CDT) 2018/10/30 12:25:49 - Running OBMC_Sample/cp_post_stack
"""
rc = 0
@@ -185,15 +154,13 @@
else:
history = []
- # As process_plug_in_packages.py help text states, it will print the
- # values of failed_plug_in_name and shell_rc in the following format:
+ # As process_plug_in_packages.py help text states, it will print the values of failed_plug_in_name and
+ # shell_rc in the following format:
# failed_plug_in_name: <failed plug-in value, if any>
- # shell_rc: <shell return code value of last
- # call point program>
+ # shell_rc: <shell return code value of last call point program>
- # We want to obtain those values from the output. To make the task
- # simpler, we'll start by grepping the output for lines that might fit
- # such a format:
+ # We want to obtain those values from the output. To make the task simpler, we'll start by grepping the
+ # output for lines that might fit such a format:
# A valid bash variable against the left margin followed by...
# - A colon followed by...
# - Zero or more spaces