]> git.apps.os.sepia.ceph.com Git - autobuild-ceph.git/commitdiff
build-ceph.sh: make check with run-make-check.sh; no more tarball 75/head
authorSage Weil <sage@redhat.com>
Wed, 22 Jun 2016 13:16:13 +0000 (09:16 -0400)
committerSage Weil <sage@redhat.com>
Thu, 23 Jun 2016 19:57:48 +0000 (15:57 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
build-ceph-cmake.sh [deleted file]
build-ceph.sh

diff --git a/build-ceph-cmake.sh b/build-ceph-cmake.sh
deleted file mode 100755 (executable)
index afbb98c..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/bash -x
-set -e
-
-. reset-modules.sh
-
-echo --START-IGNORE-WARNINGS
-[ ! -x install-deps.sh ] || ./install-deps.sh
-echo --STOP-IGNORE-WARNINGS
-
-mkdir build
-cd build
-cmake ..
-
-make -j$(nproc) "$@" || exit 4
-
-# run "make check", but give it a time limit in case a test gets stuck
-#trap "pkill -9 ceph-osd || true ; pkill -9 ceph-mon || true" EXIT
-#if ! ../maxtime 5400 make $(maybe_parallel_make_check) check "$@" ; then
-#    exit 5
-#fi
-
-REV="$(git rev-parse HEAD)"
-OUTDIR="../out/output/sha1/$REV"
-OUTDIR_TMP="${OUTDIR}.tmp"
-install -d -m0755 -- "../$OUTDIR_TMP"
-printf '%s\n' "$REV" >"../$OUTDIR_TMP/sha1"
-MACH="$(uname -m)"
-INSTDIR="inst.tmp"
-[ ! -e "$INSTDIR" ]
-../../maxtime 1800 ionice -c3 nice -n20 make install DESTDIR="$PWD/$INSTDIR"
-tar czf "../$OUTDIR_TMP/ceph.$MACH.tgz" -C "$INSTDIR" .
-rm -rf -- "$INSTDIR"
-
-# put our temp files inside .git/ so ls-files doesn't see them
-cd ..
-git ls-files --modified >.git/modified-files
-if [ -s .git/modified-files ]; then
-    rm -rf "$OUTDIR_TMP"
-    echo "error: Modified files:" 1>&2
-    cat .git/modified-files 1>&2
-    exit 6
-fi
-
-git ls-files --exclude-standard --others >.git/added-files
-if [ -s .git/added-files ]; then
-    rm -rf "$OUTDIR_TMP"
-    echo "error: Added files:" 1>&2
-    cat .git/added-files 1>&2
-    exit 7
-fi
-
-# we're successful, the files are ok to be published; try to be as
-# atomic as possible about replacing potentially existing OUTDIR
-if [ -e "$OUTDIR" ]; then
-    rm -rf -- "$OUTDIR.old"
-    mv -- "$OUTDIR" "$OUTDIR.old"
-fi
-mv -- "$OUTDIR_TMP" "$OUTDIR"
-rm -rf -- "$OUTDIR.old"
-
-exit 0
index b13b74d8ee3c6a93aaee9599e19e952e9c9738fd..c4c836fc824e813fc800f7d2f4708f07462f0dbc 100755 (executable)
 #!/bin/bash -x
 set -e
 
-SECONDS=0
-
-function print_runtime() {
-        printf "Total run time: %d:%02d\n" $((SECONDS / 60 )) $((SECONDS % 60))
-}
-
 bindir=`dirname $0`
 . $bindir/reset-modules.sh
 
 echo --START-IGNORE-WARNINGS
 [ ! -x install-deps.sh ] || ./install-deps.sh
-[ ! -x autogen.sh ] || ./autogen.sh || exit 1
-autoconf || true
 echo --STOP-IGNORE-WARNINGS
-[ -z "$CEPH_EXTRA_CONFIGURE_ARGS" ] && CEPH_EXTRA_CONFIGURE_ARGS=--with-tcmalloc
-[ ! -x configure ] || CFLAGS="-fno-omit-frame-pointer -g -O2" CXXFLAGS="-fno-omit-frame-pointer -g" ./configure --with-debug --with-radosgw --with-libatomic-ops --without-lttng --disable-static --with-librocksdb-static=check $CEPH_EXTRA_CONFIGURE_ARGS || exit 2
-
-if [ ! -e Makefile ]; then
-    echo "$0: no Makefile, aborting." 1>&2
-    exit 3
-fi
-
-# Actually build the project
-
-# clear out any $@ potentially passed in
-set --
-
-# enable ccache if it is installed
-export CCACHE_DIR="$PWD/../../ccache"
-if command -v ccache >/dev/null; then
-  if [ ! -e "$CCACHE_DIR" ]; then
-    echo "$0: have ccache but cache directory does not exist: $CCACHE_DIR" 1>&2
-  else
-    set -- CC='ccache gcc' CXX='ccache g++'
-  fi
-else
-  echo "$0: no ccache found, compiles will be slower." 1>&2
-fi
-
-function can_parallel_make_check() {
-    local commit=$(git rev-parse tags/v0.88^{})
-    git rev-list HEAD | grep --quiet $commit
-}
-
-function maybe_parallel_make_check() {
-    if can_parallel_make_check ; then
-        echo -j$(get_processors)
-    fi
-}
-#
-# Return MIN(4, MAX(1, (number of processors / 2)))
-# Do not try to use more than 4 because it will stress
-# IO too much
-#
-function get_processors() {
-    if test $(nproc) -ge 16 ; then
-        echo 4
-    elif test $(nproc) -ge 2 ; then
-        expr $(nproc) / 2
-    else
-        echo 1
-    fi
-}
-
-
-function display_failures() {
-    local dir=$1
-    # can be removed after hammer is retired
-    # or https://github.com/ceph/ceph/pull/4923
-    # is backported to all branches.
-    if ! test -f src/Makefile-env.am || ! grep -q VERBOSE src/Makefile-env.am ; then
-        cat src/test-suite.log
-    fi
-}
-
-make -j$(get_processors) "$@" || exit 4
-
-# run "make check", but give it a time limit in case a test gets stuck
-
-trap "pkill -9 ceph-osd || true ; pkill -9 ceph-mon || true; print_runtime" EXIT
-
-if ! ../maxtime 5400 make $(maybe_parallel_make_check) check "$@" ; then
-    display_failures .
-    exit 5
-fi
 
 REV="$(git rev-parse HEAD)"
 OUTDIR="../out/output/sha1/$REV"
 OUTDIR_TMP="${OUTDIR}.tmp"
 install -d -m0755 -- "$OUTDIR_TMP"
 printf '%s\n' "$REV" >"$OUTDIR_TMP/sha1"
-MACH="$(uname -m)"
-INSTDIR="inst.tmp"
-[ ! -e "$INSTDIR" ]
-../maxtime 1800 ionice -c3 nice -n20 make install DESTDIR="$PWD/$INSTDIR"
-tar czf "$OUTDIR_TMP/ceph.$MACH.tgz" -C "$INSTDIR" .
-rm -rf -- "$INSTDIR"
 
-# put our temp files inside .git/ so ls-files doesn't see them
-git ls-files --modified >.git/modified-files
-if [ -s .git/modified-files ]; then
-    rm -rf "$OUTDIR_TMP"
-    echo "error: Modified files:" 1>&2
-    cat .git/modified-files 1>&2
-    exit 6
-fi
-
-git ls-files --exclude-standard --others >.git/added-files
-if [ -s .git/added-files ]; then
-    rm -rf "$OUTDIR_TMP"
-    echo "error: Added files:" 1>&2
-    cat .git/added-files 1>&2
-    exit 7
-fi
+./run-make-check.sh | tee $OUTDIR_TMP/run-make-check.log
 
 # we're successful, the files are ok to be published; try to be as
 # atomic as possible about replacing potentially existing OUTDIR