]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: replace --enable-docker with --enable-root-make-check
authorLoic Dachary <ldachary@redhat.com>
Sun, 21 Dec 2014 08:39:01 +0000 (09:39 +0100)
committerLoic Dachary <ldachary@redhat.com>
Sun, 21 Dec 2014 16:53:00 +0000 (17:53 +0100)
The --enable-docker logic was that each test that needs privileges to
run uses a container to do so. The problem with this approach and
make -j8 check is that such tests compete for a single container.

The --enable-root-make-check activates tests that require privileges and
assume it is ok to use sudo to acquire privileges. The decision to run
in a container is then taken by the caller who will run something like:

   docker-tests.sh ./configure --enable-root-make-check
   docker-tests.sh make -j8 check

Signed-off-by: Loic Dachary <ldachary@redhat.com>
configure.ac
run-make-check.sh
src/test/Makefile.am
src/test/ceph-disk-root.sh

index 4de5d4f35f99924eec551e69a9d2a1e58a38bb63..d0576e8c114846c933e3bda54e9c6470c40795c8 100644 (file)
@@ -276,6 +276,12 @@ else
     AC_MSG_FAILURE([no suitable crypto library found])
 fi
 
+AC_ARG_ENABLE([root-make-check],
+            [AS_HELP_STRING([--enable-root-make-check], [enable make check tests that require root privileges])],
+            [],
+            [enable_root_make_check=no])
+AM_CONDITIONAL(ENABLE_ROOT_MAKE_CHECK, test "x$enable_root_make_check" != xno)
+
 # profiler?
 AC_ARG_WITH([profiler],
             [AS_HELP_STRING([--with-profiler], [build extra profiler binaries])],
@@ -313,12 +319,6 @@ AM_CONDITIONAL(WITH_DEBUG, test "$with_debug" = "yes")
 
 AC_DEFINE([DEBUG_GATHER], [1], [Define if you want C_Gather debugging])
 
-AC_ARG_ENABLE([docker],
-            [AS_HELP_STRING([--enable-docker], [enable docker based functional tests])],
-            [],
-            [enable_docker=no])
-AM_CONDITIONAL(ENABLE_DOCKER, test "x$enable_docker" != xno)
-
 # code coverage?
 AC_ARG_ENABLE([coverage],
             [AS_HELP_STRING([--enable-coverage], [enable code coverage tracking])],
index 7f369b7570e0ac448cd6d19aabd9352343badf78..b7a78dfc3f9ed71a025e49378c13bf1d0286ff10 100755 (executable)
@@ -42,17 +42,6 @@ function get_processors() {
     fi
 }
 
-#
-# Return true if the working tree is after the commit that
-# enabled docker based tests
-#
-function maybe_enable_docker() {
-    local commit=e038b1266b8d427308ab9e498d93a47bd8e3053a
-    if git rev-list HEAD | grep --quiet $commit ; then
-        echo --enable-docker
-    fi
-}
-
 function run() {
     sudo $(which apt-get yum zypper 2>/dev/null) install -y ccache jq
     sudo modprobe rbd
@@ -61,7 +50,7 @@ function run() {
        $DRY_RUN ./install-deps.sh || return 1
     fi
     $DRY_RUN ./autogen.sh || return 1
-    $DRY_RUN ./configure $(maybe_enable_docker) --disable-static --with-radosgw --with-debug \
+    $DRY_RUN ./configure "$@" --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 -j$(get_processors) || return 1
     $DRY_RUN make $(maybe_parallel_make_check) check || return 1
index 20395dc0f5ca8edbe363ceb71cdaf55323fed6eb..175731e7f56bad90ada037042b728d8acfe16604 100644 (file)
@@ -248,12 +248,12 @@ check_SCRIPTS += \
        test/osd/osd-config.sh \
        test/osd/osd-bench.sh \
        test/osd/osd-copy-from.sh \
-       test/ceph-disk.sh \
        test/mon/mon-handle-forward.sh
 
-if ENABLE_DOCKER
-check_SCRIPTS += \
-       test/ceph-disk-root.sh
+if ENABLE_ROOT_MAKE_CHECK
+check_SCRIPTS += test/ceph-disk-root.sh
+else
+check_SCRIPTS += test/ceph-disk.sh
 endif
 
 EXTRA_DIST += \
index 9b02398d596022d083191ded74218a56b7d58686..c24b6e55517607b12d8e73d2ff197f2d6f86bcd0 100755 (executable)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU Library Public License for more details.
 #
-source test/docker-test-helper.sh
-
-supported='([ubuntu]="14.04" [centos]="centos7")'
-main_docker "$@" --all "$supported" --compile
-main_docker "$@" --all "$supported" --user root --dev test/ceph-disk.sh test_activate_dev
+set -e
+sudo test/ceph-disk.sh test_activate_dev
+test/ceph-disk.sh
 
 # Local Variables:
-# compile-command: "cd ../.. ; make -j4 && test/osd/ceph-disk-root.sh"
+# compile-command: "cd ../.. ; make -j4 && test/ceph-disk-root.sh"
 # End: