Fix bug in setting PATH correctly.
This program was doing "which ssh_pw" to see if the PATH is set
correctly. Unfortunately, tox copies that program such that we get
a false positive. Expanded the test to this:
which process_plug_in_packages.py ssh_pw validate_plug_ins.py
Change-Id: I1c0022614f5f1eaae4545fc606a7e1a535f50a53
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/obmc_boot_test.py b/lib/obmc_boot_test.py
index 7df0d51..660424d 100755
--- a/lib/obmc_boot_test.py
+++ b/lib/obmc_boot_test.py
@@ -314,9 +314,11 @@
robot_pgm_dir_path = os.path.dirname(__file__) + os.sep
repo_bin_path = robot_pgm_dir_path.replace("/lib/", "/bin/")
- # If we can't find ssh_pw, then we don't have our repo bin in PATH.
- shell_rc, out_buf = gc.cmd_fnc_u("which ssh_pw", quiet=1, print_output=0,
- show_err=0)
+ # If we can't find process_plug_in_packages.py, ssh_pw or
+ # validate_plug_ins.py, then we don't have our repo bin in PATH.
+ shell_rc, out_buf = gc.cmd_fnc_u("which process_plug_in_packages.py" +
+ " ssh_pw validate_plug_ins.py", quiet=1,
+ print_output=0, show_err=0)
if shell_rc != 0:
os.environ['PATH'] = repo_bin_path + ":" + os.environ.get('PATH', "")
# Likewise, our repo lib subdir needs to be in sys.path and PYTHONPATH.