From 47de335ceef5589d08c8a7700790d20a2f62c738 Mon Sep 17 00:00:00 2001 From: Teemu Murtola Date: Thu, 11 Sep 2014 20:44:38 +0300 Subject: [PATCH] Improve uncrustify.sh return code handling 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 --- admin/uncrustify.sh | 6 +++--- src/gromacs/mdlib/domdec.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/uncrustify.sh b/admin/uncrustify.sh index e9590bdab3..1391214ec6 100755 --- a/admin/uncrustify.sh +++ b/admin/uncrustify.sh @@ -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 diff --git a/src/gromacs/mdlib/domdec.cpp b/src/gromacs/mdlib/domdec.cpp index 6c182cc12d..e3de5a97d9 100644 --- a/src/gromacs/mdlib/domdec.cpp +++ b/src/gromacs/mdlib/domdec.cpp @@ -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; -- 2.22.0