Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/12743#discussion_r68047514
--- Diff: dev/run-tests.py ---
@@ -101,21 +101,21 @@ def determine_modules_to_test(changed_modules):
>>> sorted(x.name for x in determine_modules_to_test([modules.root]))
['root']
+ >>> [x.name for x in determine_modules_to_test([modules.build])]
+ ['root']
>>> sorted(x.name for x in determine_modules_to_test([modules.graphx]))
['examples', 'graphx']
>>> x = sorted(x.name for x in
determine_modules_to_test([modules.sql]))
>>> x # doctest: +NORMALIZE_WHITESPACE
['examples', 'hive-thriftserver', 'mllib', 'pyspark-ml', \
'pyspark-mllib', 'pyspark-sql', '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 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))
+ # 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]
--- End diff --
FYI, this seems okay in master branch and 2.0 because
https://github.com/apache/spark/pull/10885 PR introduces a sort but it seems
not merging both `changed_modules` and `modules_to_test` anymore.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]