Github user squito commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6917#discussion_r33507904
  
    --- Diff: dev/run-tests.py ---
    @@ -639,32 +651,47 @@ def detect_binary_inop_with_mima():
         run_cmd([os.path.join(SPARK_HOME, "dev", "mima")])
     
     
    -def run_scala_tests_maven(test_profiles):
    +def run_scala_tests_maven(test_profiles, tags_to_exclude):
         mvn_test_goals = ["test", "--fail-at-end"]
         profiles_and_goals = test_profiles + mvn_test_goals
     
    +    if tags_to_exclude:
    +        # This will be read by the scalatest plugin in pom.xml
    +        profiles_and_goals += ["-Dspark.test.tagsToExclude='%s'" % 
tags_to_exclude]
    +
         print "[info] Running Spark tests using Maven with these arguments:",
    -    print " ".join(profiles_and_goals)
    +    print format_cmd(profiles_and_goals)
     
         exec_maven(profiles_and_goals)
     
     
    -def run_scala_tests_sbt(test_modules, test_profiles):
    -
    +def run_scala_tests_sbt(test_modules, test_profiles, tags_to_exclude):
         sbt_test_goals = set(itertools.chain.from_iterable(m.sbt_test_goals 
for m in test_modules))
     
         if not sbt_test_goals:
    +        print "[warn] No SBT goals to run... Exiting."
             return
     
    +    # In SBT, we can only exclude scalatest tags through "test-only", but 
not "test"
    +    # Here we rewrite each test goal to use "test-only * -- -l <tags>" 
instead
    +    #   e.g. test -> test-only * -- -l SlowTest
    +    #   e.g. hive/test -> hive/test-only * -- -l SlowTest
    +    if tags_to_exclude:
    +        new_sbt_test_goals = []
    +        for g in sbt_test_goals:
    +            g = re.sub(r"test$", "test-only * -- -l %s" % tags_to_exclude, 
g)
    --- End diff --
    
    @andrewor14 sorry I missed this comment earlier.  I'm not sure why.  It 
seems it only ran junit tests for the launcher project, but I don't see 
anything special about that one project in particular ...


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to