]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
run-make-check.sh: run make check with cmake if do_cmake.sh is available
authorSage Weil <sage@redhat.com>
Sat, 2 Jul 2016 11:50:34 +0000 (04:50 -0700)
committerKefu Chai <kchai@redhat.com>
Wed, 6 Jul 2016 15:48:45 +0000 (23:48 +0800)
Signed-off-by: Sage Weil <sage@redhat.com>
run-make-check.sh

index 8902ead2db8396e581a4980bb4b57a542a6cdd7d..0f16a4456d7f4f1532f9986faa52beffb1096782 100755 (executable)
@@ -64,12 +64,19 @@ function run() {
     if test -f ./install-deps.sh ; then
        $DRY_RUN ./install-deps.sh || return 1
     fi
-    $DRY_RUN ./autogen.sh || return 1
-    $DRY_RUN ./configure "$@"  --with-librocksdb-static --disable-static --with-radosgw --with-debug --without-lttng \
-        CC="ccache gcc" CXX="ccache g++" CFLAGS="-Wall -g" CXXFLAGS="-Wall -g" || return 1
-    $DRY_RUN make $BUILD_MAKEOPTS || return 1
-    $DRY_RUN make $CHECK_MAKEOPTS check || return 1
-    $DRY_RUN make dist || return 1
+    if test -x ./do_cmake.sh ; then
+        $DRY_RUN ./do_cmake.sh || return 1
+        cd build
+        $DRY_RUN make $BUILD_MAKEOPTS || return 1
+        $DRY_RUN ctest $CHECK_MAKEOPTS --output-on-failure || return 1
+    else
+        $DRY_RUN ./autogen.sh || return 1
+        $DRY_RUN ./configure "$@"  --with-librocksdb-static --disable-static --with-radosgw --with-debug --without-lttng \
+            CC="ccache gcc" CXX="ccache g++" CFLAGS="-Wall -g" CXXFLAGS="-Wall -g" || return 1
+        $DRY_RUN make $BUILD_MAKEOPTS || return 1
+        $DRY_RUN make $CHECK_MAKEOPTS check || return 1
+        $DRY_RUN make dist || return 1
+    fi
 }
 
 function main() {