Skip to content

Commit

Permalink
GEODE-6059: Get ahold of origin/develop in StressNewTests
Browse files Browse the repository at this point in the history
This job was failing because concourse was no longer creating an origin
remote in the git repo.

Also, changing the script to fail if there are issues with some of
commands we are executing in $().
  • Loading branch information
upthewaterspout committed Nov 16, 2018
1 parent 8db6d11 commit 47f55bd
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions ci/scripts/repeat-new-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,20 @@ SCRIPTDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

function changes_for_path() {
cd geode
local path="$1" # only expand once in the line below
git diff --name-only HEAD $(git merge-base HEAD origin/develop) -- $path
local path; path="$1" # only expand once in the line below
local merge_base; merge_base=$(git merge-base HEAD origin/develop) || exit $?
git diff --name-only HEAD $merge_base -- $path
}

UNIT_TEST_CHANGES=$(changes_for_path '*/src/test/java')
INTEGRATION_TEST_CHANGES=$(changes_for_path '*/src/integrationTest/java')
DISTRIBUTED_TEST_CHANGES=$(changes_for_path '*/src/distributedTest/java')
ACCEPTANCE_TEST_CHANGES=$(changes_for_path '*/src/acceptanceTest/java')
UPGRADE_TEST_CHANGES=$(changes_for_path '*/src/upgradeTest/java')
cd geode
git fetch https://github.com/apache/geode.git develop:origin/develop
cd ..

UNIT_TEST_CHANGES=$(changes_for_path '*/src/test/java') || exit $?
INTEGRATION_TEST_CHANGES=$(changes_for_path '*/src/integrationTest/java') || exit $?
DISTRIBUTED_TEST_CHANGES=$(changes_for_path '*/src/distributedTest/java') || exit $?
ACCEPTANCE_TEST_CHANGES=$(changes_for_path '*/src/acceptanceTest/java') || exit $?
UPGRADE_TEST_CHANGES=$(changes_for_path '*/src/upgradeTest/java') || exit $?

CHANGED_FILES_ARRAY=( $UNIT_TEST_CHANGES $INTEGRATION_TEST_CHANGES $DISTRIBUTED_TEST_CHANGES $ACCEPTANCE_TEST_CHANGES $UPGRADE_TEST_CHANGES )
NUM_CHANGED_FILES=${#CHANGED_FILES_ARRAY[@]}
Expand Down

0 comments on commit 47f55bd

Please sign in to comment.