aboutsummaryrefslogtreecommitdiff
path: root/dev/run-tests.py
diff options
context:
space:
mode:
authorJosh Rosen <joshrosen@databricks.com>2016-01-27 08:32:13 -0800
committerJosh Rosen <joshrosen@databricks.com>2016-01-27 08:32:13 -0800
commit41f0c85f9be264103c066935e743f59caf0fe268 (patch)
tree59a0680931c741a418313414ffa7d6c3a476c10e /dev/run-tests.py
parent093291cf9b8729c0bd057cf67aed840b11f8c94a (diff)
downloadspark-41f0c85f9be264103c066935e743f59caf0fe268.tar.gz
spark-41f0c85f9be264103c066935e743f59caf0fe268.tar.bz2
spark-41f0c85f9be264103c066935e743f59caf0fe268.zip
[SPARK-13023][PROJECT INFRA] Fix handling of root module in modules_to_test()
There's a minor bug in how we handle the `root` module in the `modules_to_test()` function in `dev/run-tests.py`: since `root` now depends on `build` (since every test needs to run on any build test), we now need to check for the presence of root in `modules_to_test` instead of `changed_modules`. Author: Josh Rosen <joshrosen@databricks.com> Closes #10933 from JoshRosen/build-module-fix.
Diffstat (limited to 'dev/run-tests.py')
-rwxr-xr-xdev/run-tests.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/dev/run-tests.py b/dev/run-tests.py
index c78a66f6aa..6febbf1089 100755
--- a/dev/run-tests.py
+++ b/dev/run-tests.py
@@ -104,6 +104,8 @@ def determine_modules_to_test(changed_modules):
>>> [x.name for x in determine_modules_to_test([modules.root])]
['root']
+ >>> [x.name for x in determine_modules_to_test([modules.build])]
+ ['root']
>>> [x.name for x in determine_modules_to_test([modules.graphx])]
['graphx', 'examples']
>>> x = [x.name for x in determine_modules_to_test([modules.sql])]
@@ -111,15 +113,13 @@ def determine_modules_to_test(changed_modules):
['sql', 'hive', 'mllib', 'examples', 'hive-thriftserver', 'pyspark-sql', 'sparkr',
'pyspark-mllib', 'pyspark-ml']
"""
- # If we're going to have to run all of the tests, then we can just short-circuit
- # and return 'root'. No module depends on root, so if it appears then it will be
- # in changed_modules.
- if modules.root in changed_modules:
- return [modules.root]
modules_to_test = set()
for module in changed_modules:
modules_to_test = modules_to_test.union(determine_modules_to_test(module.dependent_modules))
modules_to_test = modules_to_test.union(set(changed_modules))
+ # If we need to run all of the tests, then we should short-circuit and return 'root'
+ if modules.root in modules_to_test:
+ return [modules.root]
return toposort_flatten(
{m: set(m.dependencies).intersection(modules_to_test) for m in modules_to_test}, sort=True)