diff options
| author | Jack Koenig | 2020-01-07 14:31:41 -0800 |
|---|---|---|
| committer | GitHub | 2020-01-07 14:31:41 -0800 |
| commit | 66f354558a21cd0d339968b3665b44c17c2c16e8 (patch) | |
| tree | 4a732358748671ebc59db73f671b287e6d82bc28 | |
| parent | f77487d37bd7c61be231a8000a3197d37cf55499 (diff) | |
Fix .run_formal_checks.sh skipping logic (#1297)
Fetch and checkout the base branch before attempting to inspect the log
| -rwxr-xr-x | .run_formal_checks.sh | 13 |
1 files changed, 8 insertions, 5 deletions
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 |
