Skip to content

Commit

Permalink
run-make-check.sh: fill in missing DRY_RUN and add doc hint
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Cutler <[email protected]>
  • Loading branch information
smithfarm committed Jul 9, 2018
1 parent 458a0a6 commit 693beaa
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions run-make-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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"
Expand Down

0 comments on commit 693beaa

Please sign in to comment.