Skip to content

Commit

Permalink
fix sbt test arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
nchammas committed Sep 17, 2014
1 parent e33b978 commit cf57cbf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dev/run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,17 @@ echo "========================================================================="

{
# If the Spark SQL tests are enabled, run the tests with the Hive profiles enabled.
# This must be a single argument, as it is.
if [ -n "$_RUN_SQL_TESTS" ]; then
SBT_MAVEN_PROFILES_ARGS="$SBT_MAVEN_PROFILES_ARGS -Phive"
fi

if [ -n "$_SQL_TESTS_ONLY" ]; then
SBT_MAVEN_TEST_ARGS="catalyst/test sql/test hive/test"
# This must be an array of individual arguments. Otherwise, having one long string
#+ will be interpreted as a single test, which doesn't work.
SBT_MAVEN_TEST_ARGS=("catalyst/test" "sql/test" "hive/test")
else
SBT_MAVEN_TEST_ARGS="test"
SBT_MAVEN_TEST_ARGS=("test")
fi

echo "[info] Running Spark tests with these arguments: $SBT_MAVEN_PROFILES_ARGS $SBT_MAVEN_TEST_ARGS"
Expand All @@ -159,7 +162,7 @@ echo "========================================================================="
# QUESTION: Why doesn't 'yes "q"' work?
# QUESTION: Why doesn't 'grep -v -e "^\[info\] Resolving"' work?
echo -e "q\n" \
| sbt/sbt "$SBT_MAVEN_PROFILES_ARGS" "$SBT_MAVEN_TEST_ARGS" \
| sbt/sbt "$SBT_MAVEN_PROFILES_ARGS" "${SBT_MAVEN_TEST_ARGS[@]}" \
| grep -v -e "info.*Resolving" -e "warn.*Merging" -e "info.*Including"
}

Expand Down

0 comments on commit cf57cbf

Please sign in to comment.