diff --git a/dev/run-tests b/dev/run-tests
index 53148d23f385f4a18ac5f00faf5328b767752e2f..7c002160c3a4a77d312a64e459116b7227cd34ef 100755
--- a/dev/run-tests
+++ b/dev/run-tests
@@ -141,17 +141,20 @@ 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"
+  echo "[info] Running Spark tests with these arguments: $SBT_MAVEN_PROFILES_ARGS ${SBT_MAVEN_TEST_ARGS[@]}"
   
   # NOTE: echo "q" is needed because sbt on encountering a build file with failure
   #+ (either resolution or compilation) prompts the user for input either q, r, etc
@@ -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"
 }