Skip to content

Commit

Permalink
update to reflect fact that no module depends on root
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed Jun 19, 2015
1 parent 3670d50 commit df10e23
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions dev/run-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,15 @@ def determine_modules_to_test(changed_modules):
>>> sorted(x.name for x in determine_modules_to_test([sql]))
['examples', 'hive-thriftserver', 'mllib', 'pyspark', 'sparkr', 'sql']
"""
# 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 root in changed_modules:
return [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 root in modules_to_test:
return [root]
else:
return modules_to_test
return modules_to_test.union(set(changed_modules))


# -------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit df10e23

Please sign in to comment.