Skip to content

Commit df10e23

Browse files
committed
update to reflect fact that no module depends on root
1 parent 3670d50 commit df10e23

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

dev/run-tests.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,14 +249,15 @@ def determine_modules_to_test(changed_modules):
249249
>>> sorted(x.name for x in determine_modules_to_test([sql]))
250250
['examples', 'hive-thriftserver', 'mllib', 'pyspark', 'sparkr', 'sql']
251251
"""
252+
# If we're going to have to run all of the tests, then we can just short-circuit
253+
# and return 'root'. No module depends on root, so if it appears then it will be
254+
# in changed_modules.
255+
if root in changed_modules:
256+
return [root]
252257
modules_to_test = set()
253258
for module in changed_modules:
254259
modules_to_test = modules_to_test.union(determine_modules_to_test(module.dependent_modules))
255-
modules_to_test = modules_to_test.union(set(changed_modules))
256-
if root in modules_to_test:
257-
return [root]
258-
else:
259-
return modules_to_test
260+
return modules_to_test.union(set(changed_modules))
260261

261262

262263
# -------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)