@@ -48,39 +48,6 @@ function run_test() {
4848 fi
4949}
5050
51- function run_core_tests() {
52- run_test " pyspark/conf.py"
53- run_test " pyspark/context.py"
54- run_test " pyspark/broadcast.py"
55- run_test " pyspark/accumulators.py"
56- run_test " pyspark/serializers.py"
57- run_test " pyspark/shuffle.py"
58- run_test " pyspark/rdd.py"
59- run_test " pyspark/tests.py"
60- }
61-
62- function run_sql_tests() {
63- run_test " pyspark/sql.py"
64- }
65-
66- function run_mllib_tests() {
67- run_test " pyspark/mllib/util.py"
68- run_test " pyspark/mllib/linalg.py"
69- run_test " pyspark/mllib/classification.py"
70- run_test " pyspark/mllib/clustering.py"
71- run_test " pyspark/mllib/random.py"
72- run_test " pyspark/mllib/recommendation.py"
73- run_test " pyspark/mllib/regression.py"
74- run_test " pyspark/mllib/stat.py"
75- run_test " pyspark/mllib/tree.py"
76- run_test " pyspark/mllib/tests.py"
77- }
78-
79- function run_streaming_tests() {
80- run_test " pyspark/streaming/util.py"
81- run_test " pyspark/streaming/tests.py"
82- }
83-
8451echo " Running PySpark tests. Output is in python/unit-tests.log."
8552
8653export PYSPARK_PYTHON=" python"
9360echo " Testing with Python version:"
9461$PYSPARK_PYTHON --version
9562
96- run_core_tests
97- run_sql_tests
98- run_mllib_tests
99- run_streaming_tests
63+ run_test " pyspark/rdd.py"
64+ run_test " pyspark/context.py"
65+ run_test " pyspark/conf.py"
66+ run_test " pyspark/sql.py"
67+ # These tests are included in the module-level docs, and so must
68+ # be handled on a higher level rather than within the python file.
69+ export PYSPARK_DOC_TEST=1
70+ run_test " pyspark/broadcast.py"
71+ run_test " pyspark/accumulators.py"
72+ run_test " pyspark/serializers.py"
73+ unset PYSPARK_DOC_TEST
74+ run_test " pyspark/shuffle.py"
75+ run_test " pyspark/tests.py"
76+ run_test " pyspark/mllib/classification.py"
77+ run_test " pyspark/mllib/clustering.py"
78+ run_test " pyspark/mllib/linalg.py"
79+ run_test " pyspark/mllib/random.py"
80+ run_test " pyspark/mllib/recommendation.py"
81+ run_test " pyspark/mllib/regression.py"
82+ run_test " pyspark/mllib/stat.py"
83+ run_test " pyspark/mllib/tests.py"
84+ run_test " pyspark/mllib/tree.py"
85+ run_test " pyspark/mllib/util.py"
86+ run_test " pyspark/streaming/util.py"
87+ run_test " pyspark/streaming/tests.py"
10088
10189# Try to test with PyPy
10290if [ $( which pypy) ]; then
10391 export PYSPARK_PYTHON=" pypy"
10492 echo " Testing with PyPy version:"
10593 $PYSPARK_PYTHON --version
10694
107- run_core_tests
108- run_sql_tests
109- run_mllib_tests
110- run_streaming_tests
95+ run_test " pyspark/rdd.py"
96+ run_test " pyspark/context.py"
97+ run_test " pyspark/conf.py"
98+ run_test " pyspark/sql.py"
99+ # These tests are included in the module-level docs, and so must
100+ # be handled on a higher level rather than within the python file.
101+ export PYSPARK_DOC_TEST=1
102+ run_test " pyspark/broadcast.py"
103+ run_test " pyspark/accumulators.py"
104+ run_test " pyspark/serializers.py"
105+ unset PYSPARK_DOC_TEST
106+ run_test " pyspark/shuffle.py"
107+ run_test " pyspark/tests.py"
108+ run_test " pyspark/streaming/util.py"
109+ run_test " pyspark/streaming/tests.py"
111110fi
112111
113112if [[ $FAILED == 0 ]]; then
0 commit comments