aboutsummaryrefslogtreecommitdiff
path: root/dev/sparktestsupport
diff options
context:
space:
mode:
authorMarcelo Vanzin <vanzin@cloudera.com>2015-09-15 10:45:02 -0700
committerMarcelo Vanzin <vanzin@cloudera.com>2015-09-15 10:45:02 -0700
commit8abef21dac1a6538c4e4e0140323b83d804d602b (patch)
treef95a782626def50ae2977ffc9c63057daf1d9afa /dev/sparktestsupport
parentc35fdcb7e9c01271ce560dba4e0bd37569c8f5d1 (diff)
downloadspark-8abef21dac1a6538c4e4e0140323b83d804d602b.tar.gz
spark-8abef21dac1a6538c4e4e0140323b83d804d602b.tar.bz2
spark-8abef21dac1a6538c4e4e0140323b83d804d602b.zip
[SPARK-10300] [BUILD] [TESTS] Add support for test tags in run-tests.py.
This change does two things: - tag a few tests and adds the mechanism in the build to be able to disable those tags, both in maven and sbt, for both junit and scalatest suites. - add some logic to run-tests.py to disable some tags depending on what files have changed; that's used to disable expensive tests when a module hasn't explicitly been changed, to speed up testing for changes that don't directly affect those modules. Author: Marcelo Vanzin <vanzin@cloudera.com> Closes #8437 from vanzin/test-tags.
Diffstat (limited to 'dev/sparktestsupport')
-rw-r--r--dev/sparktestsupport/modules.py24
1 files changed, 23 insertions, 1 deletions
diff --git a/dev/sparktestsupport/modules.py b/dev/sparktestsupport/modules.py
index 346452f317..65397f1f3e 100644
--- a/dev/sparktestsupport/modules.py
+++ b/dev/sparktestsupport/modules.py
@@ -31,7 +31,7 @@ class Module(object):
def __init__(self, name, dependencies, source_file_regexes, build_profile_flags=(), environ={},
sbt_test_goals=(), python_test_goals=(), blacklisted_python_implementations=(),
- should_run_r_tests=False):
+ test_tags=(), should_run_r_tests=False):
"""
Define a new module.
@@ -50,6 +50,8 @@ class Module(object):
:param blacklisted_python_implementations: A set of Python implementations that are not
supported by this module's Python components. The values in this set should match
strings returned by Python's `platform.python_implementation()`.
+ :param test_tags A set of tags that will be excluded when running unit tests if the module
+ is not explicitly changed.
:param should_run_r_tests: If true, changes in this module will trigger all R tests.
"""
self.name = name
@@ -60,6 +62,7 @@ class Module(object):
self.environ = environ
self.python_test_goals = python_test_goals
self.blacklisted_python_implementations = blacklisted_python_implementations
+ self.test_tags = test_tags
self.should_run_r_tests = should_run_r_tests
self.dependent_modules = set()
@@ -85,6 +88,9 @@ sql = Module(
"catalyst/test",
"sql/test",
"hive/test",
+ ],
+ test_tags=[
+ "org.apache.spark.sql.hive.ExtendedHiveTest"
]
)
@@ -398,6 +404,22 @@ ec2 = Module(
)
+yarn = Module(
+ name="yarn",
+ dependencies=[],
+ source_file_regexes=[
+ "yarn/",
+ "network/yarn/",
+ ],
+ sbt_test_goals=[
+ "yarn/test",
+ "network-yarn/test",
+ ],
+ test_tags=[
+ "org.apache.spark.deploy.yarn.ExtendedYarnTest"
+ ]
+)
+
# The root module is a dummy module which is used to run all of the tests.
# No other modules should directly depend on this module.
root = Module(