Skip to content

Commit

Permalink
Improve uncrustify.sh return code handling
Browse files Browse the repository at this point in the history
Apparently, the exit code for the script does not work on Jenkins.
I can only guess whether this is caused by different bash (with some
differences in the support for set -o pipefail) or git versions (with
different behavior of the --exit-code flag in combination with the other
flags), or something else, but these changes seem to make it work.

Apply uncrustify with reformat_all.sh to fix any issues that have been
slipped through so far.

Change-Id: I005eed88f839014f38992826ad7b984b8ad3597e
  • Loading branch information
teemumurtola authored and Gerrit Code Review committed Sep 11, 2014
1 parent 1bf821d commit 47de335
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions admin/uncrustify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,10 @@ if [[ $action == diff-* ]] ; then
fi

# Find the changed files
git diff --no-index --name-only --exit-code org/ new/ | \
sed -e 's#new/##' > $tmpdir/changed
changes=
set -o pipefail
if ! git diff --no-index --name-only --exit-code org/ new/ | \
sed -e 's#new/##' > $tmpdir/changed
if [[ -s $tmpdir/changed ]]
then
changes=1
fi
Expand Down
2 changes: 1 addition & 1 deletion src/gromacs/mdlib/domdec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ void dd_move_f(gmx_domdec_t *dd, rvec f[], rvec *fshift)
/* Only forces in domains near the PBC boundaries need to
consider PBC in the treatment of fshift */
bShiftForcesNeedPbc = (dd->ci[dd->dim[d]] == 0);
bScrew = (bShiftForcesNeedPbc && dd->bScrewPBC && dd->dim[d] == XX);
bScrew = (bShiftForcesNeedPbc && dd->bScrewPBC && dd->dim[d] == XX);
if (fshift == NULL && !bScrew)
{
bShiftForcesNeedPbc = FALSE;
Expand Down

0 comments on commit 47de335

Please sign in to comment.