From 66f354558a21cd0d339968b3665b44c17c2c16e8 Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Tue, 7 Jan 2020 14:31:41 -0800 Subject: Fix .run_formal_checks.sh skipping logic (#1297) Fetch and checkout the base branch before attempting to inspect the log--- .run_formal_checks.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to '.run_formal_checks.sh') diff --git a/.run_formal_checks.sh b/.run_formal_checks.sh index 942b3e1a..1caa2297 100755 --- a/.run_formal_checks.sh +++ b/.run_formal_checks.sh @@ -12,9 +12,6 @@ DUT=$1 if [ $TRAVIS_PULL_REQUEST = "false" ]; then echo "Not a pull request, no formal check" exit 0 -elif git log --format=%B --no-merges $TRAVIS_BRANCH..HEAD | grep '\[skip formal checks\]'; then - echo "Commit message says to skip formal checks" - exit 0 else # $TRAVIS_BRANCH is branch targeted by PR # Travis does a shallow clone, checkout PR target so that we have it @@ -22,6 +19,12 @@ else git remote set-branches origin $TRAVIS_BRANCH && git fetch git checkout $TRAVIS_BRANCH git checkout - - cp regress/$DUT.fir $DUT.fir - ./scripts/formal_equiv.sh HEAD $TRAVIS_BRANCH $DUT + # Skip if '[skip formal checks]' shows up in any of the commit messages in the PR + if git log --format=%B --no-merges $TRAVIS_BRANCH..HEAD | grep '\[skip formal checks\]'; then + echo "Commit message says to skip formal checks" + exit 0 + else + cp regress/$DUT.fir $DUT.fir + ./scripts/formal_equiv.sh HEAD $TRAVIS_BRANCH $DUT + fi fi -- cgit v1.2.3