From: Nathan Cutler Date: Mon, 9 Jul 2018 11:06:44 +0000 (+0200) Subject: run-make-check.sh: fill in missing DRY_RUN and add doc hint X-Git-Tag: v12.2.11~48^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=459f21f9dfbc9ea97db8aa51e449760f20412af1;p=ceph.git run-make-check.sh: fill in missing DRY_RUN and add doc hint Signed-off-by: Nathan Cutler (cherry picked from commit 693beaa8f3268a773b34e112accf2342eee9e8d8) --- diff --git a/run-make-check.sh b/run-make-check.sh index 51db50fd5474..2244e5ea5b0a 100755 --- a/run-make-check.sh +++ b/run-make-check.sh @@ -12,6 +12,12 @@ # version 2.1 of the License, or (at your option) any later version. # +# +# To just look at what this script will do, run it like this: +# +# $ DRY_RUN=echo ./run-make-check.sh +# + set -e trap clean_up_after_myself EXIT @@ -110,25 +116,25 @@ EOM save_ccache_conf # remove the entropy generated by the date/time embedded in the build CMAKE_BUILD_OPTS="$CMAKE_BUILD_OPTS -DENABLE_GIT_VERSION=OFF" - export SOURCE_DATE_EPOCH="946684800" - ccache -o sloppiness=time_macros - ccache -o run_second_cpp=true + $DRY_RUN export SOURCE_DATE_EPOCH="946684800" + $DRY_RUN ccache -o sloppiness=time_macros + $DRY_RUN ccache -o run_second_cpp=true if [ -n "$JENKINS_HOME" ]; then # Build host has plenty of space available, let's use it to keep # various versions of the built objects. This could increase the cache hit # if the same or similar PRs are running several times - ccache -o max_size=100G + $DRY_RUN ccache -o max_size=100G else echo "Current ccache max_size setting:" ccache -p | grep max_size fi - ccache -z # Reset the ccache statistics + $DRY_RUN ccache -z # Reset the ccache statistics $DRY_RUN ./do_cmake.sh $CMAKE_BUILD_OPTS $CMAKE_PYTHON_OPTS $@ || return 1 $DRY_RUN cd build $DRY_RUN make $BUILD_MAKEOPTS tests || return 1 - ccache -s # print the ccache statistics to evaluate the efficiency + $DRY_RUN ccache -s # print the ccache statistics to evaluate the efficiency # to prevent OSD EMFILE death on tests, make sure ulimit >= 1024 $DRY_RUN ulimit -n $(ulimit -Hn) @@ -149,7 +155,7 @@ function main() { echo "with the ability to run commands as root via sudo." fi echo -n "Checking hostname sanity... " - if hostname --fqdn >/dev/null 2>&1 ; then + if $DRY_RUN hostname --fqdn >/dev/null 2>&1 ; then echo "OK" else echo "NOT OK"