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

    https://github.com/apache/spark/pull/23117#discussion_r236440252
  
    --- Diff: dev/run-tests.py ---
    @@ -434,6 +434,63 @@ def run_python_tests(test_modules, parallelism):
         run_cmd(command)
     
     
    +def run_python_tests_with_coverage(test_modules, parallelism):
    +    set_title_and_block("Running PySpark tests with coverage report", 
"BLOCK_PYSPARK_UNIT_TESTS")
    +
    +    command = [os.path.join(SPARK_HOME, "python", 
"run-tests-with-coverage")]
    +    if test_modules != [modules.root]:
    +        command.append("--modules=%s" % ','.join(m.name for m in 
test_modules))
    +    command.append("--parallelism=%i" % parallelism)
    +    run_cmd(command)
    +    post_python_tests_results()
    +
    +
    +def post_python_tests_results():
    +    if "SPARK_TEST_KEY" not in os.environ:
    +        print("[error] 'SPARK_TEST_KEY' environment variable was not set. 
Unable to post"
    +              "PySpark coverage results.")
    +        sys.exit(1)
    --- End diff --
    
    actually, i do agree w/you @squito ...  we need to make sure that the test 
running code works both in and out of our jenkins environment.


---

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

Reply via email to