File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ dev/scalastyle
4949echo " ========================================================================="
5050echo " Running Spark unit tests"
5151echo " ========================================================================="
52- sbt/sbt assembly test | grep -v " info.*Resolving"
52+ sbt/sbt assembly test | grep -v -e " info.*Resolving" -e " warn.*Merging " -e " info.*Including "
5353
5454echo " ========================================================================="
5555echo " Running PySpark tests"
@@ -63,5 +63,5 @@ echo "========================================================================="
6363echo " Detecting binary incompatibilites with MiMa"
6464echo " ========================================================================="
6565./bin/spark-class org.apache.spark.tools.GenerateMIMAIgnore
66- sbt/sbt mima-report-binary-issues
66+ sbt/sbt mima-report-binary-issues | grep -v -e " info.*Resolving "
6767
Original file line number Diff line number Diff line change @@ -29,8 +29,18 @@ FAILED=0
2929rm -f unit-tests.log
3030
3131function run_test() {
32- SPARK_TESTING=0 $FWDIR /bin/pyspark $1 2>&1 | tee -a unit-tests.log
32+ SPARK_TESTING=0 $FWDIR /bin/pyspark $1 2>&1 | tee -a > unit-tests.log
3333 FAILED=$(( PIPESTATUS[0 ]|| $FAILED ))
34+
35+ # Fail and exit on the first test failure.
36+ if [[ $FAILED != 0 ]]; then
37+ cat unit-tests.log | grep -v " ^[0-9][0-9]*" # filter all lines starting with a number.
38+ echo -en " \033[31m" # Red
39+ echo " Had test failures; see logs."
40+ echo -en " \033[0m" # No color
41+ exit -1
42+ fi
43+
3444}
3545
3646run_test " pyspark/rdd.py"
@@ -46,12 +56,7 @@ run_test "pyspark/mllib/clustering.py"
4656run_test " pyspark/mllib/recommendation.py"
4757run_test " pyspark/mllib/regression.py"
4858
49- if [[ $FAILED != 0 ]]; then
50- echo -en " \033[31m" # Red
51- echo " Had test failures; see logs."
52- echo -en " \033[0m" # No color
53- exit -1
54- else
59+ if [[ $FAILED == 0 ]]; then
5560 echo -en " \033[32m" # Green
5661 echo " Tests passed."
5762 echo -en " \033[0m" # No color
You can’t perform that action at this time.
0 commit comments