]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
run-make-check.sh: fill in missing DRY_RUN and add doc hint 22867/head
authorNathan Cutler <ncutler@suse.com>
Mon, 9 Jul 2018 11:06:44 +0000 (13:06 +0200)
committerNathan Cutler <ncutler@suse.com>
Mon, 9 Jul 2018 12:29:05 +0000 (14:29 +0200)
Signed-off-by: Nathan Cutler <ncutler@suse.com>
run-make-check.sh

index 256df5e5ee8cc465ca852c3f2d9520aeff510c39..3d5a9d0cdff6cd6dfe9f026b42579824999af820 100755 (executable)
 #  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"