summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Ferrell <josh@vector35.com>2020-01-23 17:19:49 -0500
committerJosh Ferrell <josh@vector35.com>2020-02-06 15:24:27 -0500
commit8d1cc790059d858da3cd883d43503f0109541dab (patch)
tree026fc30470edd987d8c6eace7c39e8744d3eb89c
parent7486332d5b38180520a889509c8fb0e09896bc98 (diff)
update plugin unit test to use proper python version
-rw-r--r--suite/testcommon.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/suite/testcommon.py b/suite/testcommon.py
index 628e129f..65ddf57e 100644
--- a/suite/testcommon.py
+++ b/suite/testcommon.py
@@ -637,7 +637,11 @@ class TestBuilder(Builder):
file_name = self.unpackage_file("helloworld")
try:
bin_info_path = os.path.join(os.path.dirname(__file__), '..', 'python', 'examples', 'bin_info.py')
- result = subprocess.Popen(["python", bin_info_path, file_name], stdout=subprocess.PIPE).communicate()[0]
+ if sys.platform == "linux" or sys.platform == "linux2":
+ python_bin = "python2"
+ else:
+ python_bin = "python"
+ result = subprocess.Popen([python_bin, bin_info_path, file_name], stdout=subprocess.PIPE).communicate()[0]
# normalize line endings and path sep
return [line for line in result.replace(b"\\", b"/").replace(b"\r\n", b"\n").decode("charmap").split("\n")]
finally: