From c364ccfe5c8cee31c7898ac16e79de72ad0d07fe Mon Sep 17 00:00:00 2001 From: Josh Rosen Date: Fri, 26 Jun 2015 01:29:14 -0700 Subject: [PATCH] Use which() to convert PYSPARK_PYTHON to an absolute path before shelling out to run tests --- dev/sparktestsupport/__init__.py | 2 +- python/run-tests.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/sparktestsupport/__init__.py b/dev/sparktestsupport/__init__.py index a75dbdcd77a00..12696d98fb988 100644 --- a/dev/sparktestsupport/__init__.py +++ b/dev/sparktestsupport/__init__.py @@ -17,5 +17,5 @@ import os -SPARK_HOME = os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../") +SPARK_HOME = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../")) USER_HOME = os.environ.get("HOME") diff --git a/python/run-tests.py b/python/run-tests.py index b24c1b74de5d9..d508eda208fe4 100755 --- a/python/run-tests.py +++ b/python/run-tests.py @@ -46,7 +46,7 @@ def print_red(text): def run_individual_python_test(test_name, pyspark_python): - env = {'SPARK_TESTING': '1', 'PYSPARK_PYTHON': pyspark_python} + env = {'SPARK_TESTING': '1', 'PYSPARK_PYTHON': which(pyspark_python) } print(" Running test: %s ..." % test_name, end='') start_time = time.time() with open(LOG_FILE, 'a') as log_file: