@@ -48,6 +48,39 @@ 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+
5184echo " Running PySpark tests. Output is in python/unit-tests.log."
5285
5386export PYSPARK_PYTHON=" python"
6093echo " Testing with Python version:"
6194$PYSPARK_PYTHON --version
6295
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/tests.py"
96+ # run_core_tests
97+ # run_sql_tests
98+ # run_mllib_tests
99+ run_streaming_tests
87100
88101# Try to test with PyPy
89102if [ $( which pypy) ]; then
90103 export PYSPARK_PYTHON=" pypy"
91104 echo " Testing with PyPy version:"
92105 $PYSPARK_PYTHON --version
93106
94- run_test " pyspark/rdd.py"
95- run_test " pyspark/context.py"
96- run_test " pyspark/conf.py"
97- run_test " pyspark/sql.py"
98- # These tests are included in the module-level docs, and so must
99- # be handled on a higher level rather than within the python file.
100- export PYSPARK_DOC_TEST=1
101- run_test " pyspark/broadcast.py"
102- run_test " pyspark/accumulators.py"
103- run_test " pyspark/serializers.py"
104- unset PYSPARK_DOC_TEST
105- run_test " pyspark/shuffle.py"
106- run_test " pyspark/tests.py"
107- run_test " pyspark/streaming/tests.py"
107+ run_core_tests
108+ run_sql_tests
109+ run_mllib_tests
110+ run_streaming_tests
108111fi
109112
110113if [[ $FAILED == 0 ]]; then
0 commit comments