]> git.proxmox.com Git - ceph.git/blobdiff - ceph/run-make-check.sh
update sources to v12.1.2
[ceph.git] / ceph / run-make-check.sh
index c5139e98bba1271a301f744ee13188877422eb7f..b23672c4f0a8b022d25103711ab2cc4a43f85049 100755 (executable)
@@ -29,6 +29,7 @@ function get_processors() {
 
 function run() {
     local install_cmd
+    local which_pkg="which"
     if test -f /etc/redhat-release ; then
         source /etc/os-release
         if ! type bc > /dev/null 2>&1 ; then
@@ -40,6 +41,8 @@ function run() {
         else
             install_cmd="yum install -y"
         fi
+    else
+        which_pkg="debianutils"
     fi
 
     type apt-get > /dev/null 2>&1 && install_cmd="apt-get install -y"
@@ -51,7 +54,7 @@ function run() {
         exit 1
     fi
     if [ -n "$install_cmd" ]; then
-        $DRY_RUN sudo $install_cmd ccache jq
+        $DRY_RUN sudo $install_cmd ccache jq $which_pkg
     else
         echo "WARNING: Don't know how to install packages" >&2
     fi
@@ -68,7 +71,10 @@ function run() {
     $DRY_RUN ./do_cmake.sh $@ || return 1
     $DRY_RUN cd build
     $DRY_RUN make $BUILD_MAKEOPTS tests || return 1
-    $DRY_RUN ctest $CHECK_MAKEOPTS --output-on-failure || return 1
+    if ! $DRY_RUN ctest $CHECK_MAKEOPTS --output-on-failure; then
+        rm -f ${TMPDIR:-/tmp}/ceph-asok.*
+        return 1
+    fi
 }
 
 function main() {