From b3792794a792f4eec0d6d0836fe11001286e315c Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Jun 25 2019 16:53:21 +0000 Subject: Don't fail on non-origin ancestor Signed-off-by: Stephen Gallagher --- diff --git a/run_tests.sh b/run_tests.sh index 49e8215..f4cf5b0 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -34,7 +34,9 @@ if [ "$BRANCH_TO" != "None" -a "$BRANCH_TO" != "" ]; then # If this branch is atop the master, use its tests (possibly updated). # Otherwise, check out origin/master for the latest tests. + set +x git merge-base --is-ancestor -- origin/master HEAD + set -x if [ $? -ne 0 ]; then git checkout origin/master fi @@ -48,7 +50,9 @@ git reset --hard $MODULE_DEFAULTS_TEST_UPDATED # If this branch is atop the master, use its tests (possibly updated). # Otherwise, check out origin/master for the latest tests. TEMPDIR= +set +x git merge-base --is-ancestor -- origin/master HEAD +set -x if [ $? -ne 0 ]; then TEMPDIR=$(mktemp -d) git clone $ORIGIN_REPO $TEMPDIR