Skip to content

Commit cf57cbf

Browse files
committed
fix sbt test arguments
1 parent e33b978 commit cf57cbf

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

dev/run-tests

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,17 @@ echo "========================================================================="
141141

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

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

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

0 commit comments

Comments
 (0)