-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-13808][test-maven] Don't build assembly in dev/run-tests #11701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2c10193
267aaf9
e6e3c20
1154eb4
1fd489c
20d2e2a
0900b13
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,10 +54,27 @@ def print_red(text): | |
LOGGER = logging.getLogger() | ||
|
||
|
||
def run_individual_python_test(test_name, pyspark_python): | ||
def get_spark_dist_classpath(): | ||
original_working_dir = os.getcwd() | ||
os.chdir(SPARK_HOME) | ||
cp = subprocess_check_output( | ||
["./build/sbt", "-Phive", "export assembly/managedClasspath"], universal_newlines=True) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @vanzin, as part of your next patch will There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Potentially. I'll make a note to take a look at this. |
||
cp = cp.strip().split("\n")[-1] | ||
os.chdir(original_working_dir) | ||
return cp | ||
|
||
|
||
def run_individual_python_test(test_name, pyspark_python, spark_dist_classpath): | ||
env = dict(os.environ) | ||
env.update({'SPARK_TESTING': '1', 'PYSPARK_PYTHON': which(pyspark_python), | ||
'PYSPARK_DRIVER_PYTHON': which(pyspark_python)}) | ||
env.update({ | ||
# Setting SPARK_DIST_CLASSPATH is a simple way to make sure that any child processes | ||
# launched by the tests have access to the correct test-time classpath. | ||
'SPARK_DIST_CLASSPATH': spark_dist_classpath, | ||
'SPARK_TESTING': '1', | ||
'SPARK_PREPEND_CLASSES': '1', | ||
'PYSPARK_PYTHON': which(pyspark_python), | ||
'PYSPARK_DRIVER_PYTHON': which(pyspark_python), | ||
}) | ||
LOGGER.debug("Starting test(%s): %s", pyspark_python, test_name) | ||
start_time = time.time() | ||
try: | ||
|
@@ -175,14 +192,16 @@ def main(): | |
priority = 100 | ||
task_queue.put((priority, (python_exec, test_goal))) | ||
|
||
spark_dist_classpath = get_spark_dist_classpath() | ||
|
||
def process_queue(task_queue): | ||
while True: | ||
try: | ||
(priority, (python_exec, test_goal)) = task_queue.get_nowait() | ||
except Queue.Empty: | ||
break | ||
try: | ||
run_individual_python_test(test_goal, python_exec) | ||
run_individual_python_test(test_goal, python_exec, spark_dist_classpath) | ||
finally: | ||
task_queue.task_done() | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow this is not being picked up (test is failing because the
Main
class is not found). Is this path correct for maven too?