# 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
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)
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"