Skip to content

Commit

Permalink
Fix handling of module in python/run-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed Jun 26, 2015
1 parent 37aff00 commit 8f65ed0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions dev/run-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,13 @@ def run_scala_tests(build_tool, hadoop_version, test_modules):
run_scala_tests_sbt(test_modules, test_profiles)


def run_python_tests(modules):
def run_python_tests(test_modules):
set_title_and_block("Running PySpark tests", "BLOCK_PYSPARK_UNIT_TESTS")

run_cmd([
os.path.join(SPARK_HOME, "python", "run-tests"),
"--modules=%s" % ','.join(m.name for m in modules)])
command = [os.path.join(SPARK_HOME, "python", "run-tests")]
if test_modules != [modules.root]:
command.append("--modules=%s" % ','.join(m.name for m in modules))
run_cmd(command)


def run_sparkr_tests():
Expand Down
4 changes: 2 additions & 2 deletions python/run-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from sparktestsupport.modules import all_modules # noqa


python_modules = dict((m.name, m) for m in all_modules if m.python_test_goals)
python_modules = dict((m.name, m) for m in all_modules if m.python_test_goals if m.name != 'root')


def print_red(text):
Expand Down Expand Up @@ -85,7 +85,7 @@ def parse_opts():
)
parser.add_option(
"--modules", type="string",
default=",".join(sorted(set(python_modules.keys()) - set(['root']))),
default=",".join(sorted(python_modules.keys())),
help="A comma-separated list of Python modules to test (default: %default)"
)

Expand Down

0 comments on commit 8f65ed0

Please sign in to comment.