aboutsummaryrefslogtreecommitdiff
path: root/dev/run-tests
diff options
context:
space:
mode:
authorYin Huai <yhuai@databricks.com>2015-05-21 15:40:58 -0700
committerJosh Rosen <joshrosen@databricks.com>2015-05-21 15:40:58 -0700
commit147b6be3b6d464dfc14836c08e690ab021a600de (patch)
tree7f29118b4e7a8550c2305357876cd1435bd54cec /dev/run-tests
parent5a3c04bb92e21bd221a75c4ae13a71f7d4716b44 (diff)
downloadspark-147b6be3b6d464dfc14836c08e690ab021a600de.tar.gz
spark-147b6be3b6d464dfc14836c08e690ab021a600de.tar.bz2
spark-147b6be3b6d464dfc14836c08e690ab021a600de.zip
[BUILD] Always run SQL tests in master build.
Seems our master build does not run HiveCompatibilitySuite (because _RUN_SQL_TESTS is not set). This PR introduces a property `AMP_JENKINS_PRB` to differentiate a PR build and a regular build. If a build is a regular one, we always set _RUN_SQL_TESTS to true. cc JoshRosen nchammas Author: Yin Huai <yhuai@databricks.com> Closes #5955 from yhuai/runSQLTests and squashes the following commits: 3d399bc [Yin Huai] Always run SQL tests in master build.
Diffstat (limited to 'dev/run-tests')
-rwxr-xr-xdev/run-tests41
1 files changed, 24 insertions, 17 deletions
diff --git a/dev/run-tests b/dev/run-tests
index 44d802782c..b444e74706 100755
--- a/dev/run-tests
+++ b/dev/run-tests
@@ -82,24 +82,31 @@ export SBT_MAVEN_PROFILES_ARGS="$SBT_MAVEN_PROFILES_ARGS -Pkinesis-asl"
if [ -n "$AMPLAB_JENKINS" ]; then
git fetch origin master:master
- sql_diffs=$(
- git diff --name-only master \
- | grep -e "^sql/" -e "^bin/spark-sql" -e "^sbin/start-thriftserver.sh"
- )
-
- non_sql_diffs=$(
- git diff --name-only master \
- | grep -v -e "^sql/" -e "^bin/spark-sql" -e "^sbin/start-thriftserver.sh"
- )
-
- if [ -n "$sql_diffs" ]; then
- echo "[info] Detected changes in SQL. Will run Hive test suite."
- _RUN_SQL_TESTS=true
-
- if [ -z "$non_sql_diffs" ]; then
- echo "[info] Detected no changes except in SQL. Will only run SQL tests."
- _SQL_TESTS_ONLY=true
+ # AMP_JENKINS_PRB indicates if the current build is a pull request build.
+ if [ -n "$AMP_JENKINS_PRB" ]; then
+ # It is a pull request build.
+ sql_diffs=$(
+ git diff --name-only master \
+ | grep -e "^sql/" -e "^bin/spark-sql" -e "^sbin/start-thriftserver.sh"
+ )
+
+ non_sql_diffs=$(
+ git diff --name-only master \
+ | grep -v -e "^sql/" -e "^bin/spark-sql" -e "^sbin/start-thriftserver.sh"
+ )
+
+ if [ -n "$sql_diffs" ]; then
+ echo "[info] Detected changes in SQL. Will run Hive test suite."
+ _RUN_SQL_TESTS=true
+
+ if [ -z "$non_sql_diffs" ]; then
+ echo "[info] Detected no changes except in SQL. Will only run SQL tests."
+ _SQL_TESTS_ONLY=true
+ fi
fi
+ else
+ # It is a regular build. We should run SQL tests.
+ _RUN_SQL_TESTS=true
fi
fi