aboutsummaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
authorNicholas Chammas <nicholas.chammas@gmail.com>2014-08-30 21:11:48 -0700
committerPatrick Wendell <pwendell@gmail.com>2014-08-30 21:11:48 -0700
commitc567a68a59f086ed13f38a8a847afb2c7d35697c (patch)
treeed6751575ba1218a48f4cbe35ce602c692de7e10 /dev
parent9b8c2287bb622f487b9d2bba936ea43c06dd7e5a (diff)
downloadspark-c567a68a59f086ed13f38a8a847afb2c7d35697c.tar.gz
spark-c567a68a59f086ed13f38a8a847afb2c7d35697c.tar.bz2
spark-c567a68a59f086ed13f38a8a847afb2c7d35697c.zip
[Spark QA] only check code files for new classes
Look only at code files (`.py`, `.java`, and `.scala`) for new classes. Should get rid of false alarms like [the one reported here](https://github.com/apache/spark/pull/2014#issuecomment-52912040). Author: Nicholas Chammas <nicholas.chammas@gmail.com> Closes #2184 from nchammas/jenkins-ignore-noncode and squashes the following commits: 33786ac [Nicholas Chammas] break up long line 3f91a14 [Nicholas Chammas] rename array of source files 8b82a26 [Nicholas Chammas] [Spark QA] only check code files for new classes
Diffstat (limited to 'dev')
-rwxr-xr-xdev/run-tests-jenkins16
1 files changed, 10 insertions, 6 deletions
diff --git a/dev/run-tests-jenkins b/dev/run-tests-jenkins
index d9205f08cc..06c3781eb3 100755
--- a/dev/run-tests-jenkins
+++ b/dev/run-tests-jenkins
@@ -33,9 +33,7 @@ COMMIT_URL="https://github.com/apache/spark/commit/${ghprbActualCommit}"
# GitHub doesn't auto-link short hashes when submitted via the API, unfortunately. :(
SHORT_COMMIT_HASH="${ghprbActualCommit:0:7}"
-# NOTE: Jenkins will kill the whole build after 120 minutes.
-# Tests are a large part of that, but not all of it.
-TESTS_TIMEOUT="120m"
+TESTS_TIMEOUT="120m" # format: http://linux.die.net/man/1/timeout
function post_message () {
local message=$1
@@ -93,9 +91,14 @@ function post_message () {
else
merge_note=" * This patch merges cleanly."
- non_test_files=$(git diff master --name-only | grep -v "\/test" | tr "\n" " ")
+ source_files=$(
+ git diff master --name-only \
+ | grep -v -e "\/test" `# ignore files in test directories` \
+ | grep -e "\.py$" -e "\.java$" -e "\.scala$" `# include only code files` \
+ | tr "\n" " "
+ )
new_public_classes=$(
- git diff master ${non_test_files} `# diff this patch against master and...` \
+ git diff master ${source_files} `# diff this patch against master and...` \
| grep "^\+" `# filter in only added lines` \
| sed -r -e "s/^\+//g" `# remove the leading +` \
| grep -e "trait " -e "class " `# filter in lines with these key words` \
@@ -138,7 +141,8 @@ function post_message () {
test_result="$?"
if [ "$test_result" -eq "124" ]; then
- fail_message="**[Tests timed out](${BUILD_URL}consoleFull)** after a configured wait of \`${TESTS_TIMEOUT}\`."
+ fail_message="**[Tests timed out](${BUILD_URL}consoleFull)** after \
+ a configured wait of \`${TESTS_TIMEOUT}\`."
post_message "$fail_message"
exit $test_result
else