Commit Graph

26 Commits

Author SHA1 Message Date
Sage Weil b424a35f3a run-make-check.sh: use cmake exclusively
..and drop the separate cmake script

Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-03 09:46:50 -04:00
Kefu Chai c79ca73d17 Merge pull request #11105 from badone/wip-dnf-enable-build-scripts
build scripts: Enable dnf for Fedora >= 22

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-09-19 10:15:32 +08:00
Brad Hubbard 07a5a98982 build scripts: Enable dnf for Fedora >= 22
The use of yum triggers a warning and reference to yum2dnf on Fedora >= 22.
Use either yum or dnf based on the Fedora version.

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2016-09-16 18:59:59 +10:00
Sage Weil d61cfb5c71 Merge pull request #11092 from badone/wip-dry-run-run-make-check
run-make-check.sh: Make DRY_RUN actually do a dry run
2016-09-15 09:07:59 -05:00
Brad Hubbard 2d5326e16e run-make-check.sh: Make DRY_RUN actually do a dry run
The "cd build" command will cause an error during a dry run if the directory
does not exist.

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2016-09-15 20:08:52 +10:00
Brad Hubbard abe914467a run-*make-check.sh: Make DRY_RUN actually mean a dry run
DRY_RUN does not currently do an actual dry run as it actually runs an install
command.

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2016-09-14 17:15:44 +10:00
John Coyle a40815a4d5 run-make-check.sh: pass args to do_cmake.sh
Signed-off-by: John Coyle <dx9err@gmail.com>
2016-08-11 20:11:40 -04:00
Kefu Chai 1727fdd593 Revert "run-make-check.sh: run tests in two steps"
This reverts commit cd0dfc305d.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-19 16:30:24 +08:00
Kefu Chai cd0dfc305d run-make-check.sh: run tests in two steps
this is a workaround of the timeout found in jenkins. currently three
tests are found timeout, and they are labeld with "Racing" and
"LongRunning". so, to workaround this issue, we run the tests in two
phases:

1. run the racing tests with -j1
2. run the non-racing tests with -jN

if we all all tests with -j1, the total test time is 2683.57 sec

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-16 12:00:46 +08:00
Kefu Chai ce5724effb cmake: add a "tests" target to build tests
please note "make test" is used by cmake to run tests, so we cannot just
repurpose it to *build* them.

* AddCephTest.cmake: depends on "tests"
* CMakeLists.txt: let "check" depend on "tests"
* src/CMakeLists.txt: update the run-tox tests
* run-make-check.sh: use "make tests" and "ctest" instead of "make check"
* ceph-detect-init/CMakeLists.txt: let "tests" depend on
    "ceph-detect-init"
* ceph-disk/CMakeLists.txt: let "tests" depend on "ceph-disk"

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-16 10:57:12 +08:00
Kefu Chai 146d2b15ff run-make-check.sh: use "make check" for running tests
"make all" does not offer "ceph-disk" and "ceph-detect-init" for
testing. as they are solely used for testing purpose. instead, these two
python command line packages are installed by the "install" target. so
we need to use "make check" to 1) prepare the test dependencies 2)
launch ctest to perform the test.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-07 12:41:57 +08:00
Kefu Chai 444d37f2b0 run-make-check.sh: run "make check" with a unique $TMPDIR
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-07 12:11:05 +08:00
Sage Weil 96f6fc0643 run-make-check.sh: run make check with cmake if do_cmake.sh is available
Signed-off-by: Sage Weil <sage@redhat.com>
2016-07-06 23:48:45 +08:00
Dan Mick bf5ccce9ad run-make-check.sh: modprobe won't work on containers; not needed
Signed-off-by: Dan Mick <dan.mick@redhat.com>
2016-06-29 22:26:24 +08:00
Loic Dachary 8f0eefba00 tests: rm -fr /tmp/*virtualenv*
Signed-off-by: Loic Dachary <loic@dachary.org>
2016-05-20 15:06:45 +02:00
Loic Dachary b24378ddf6 tests: configure with rocksdb by default
Otherwise bluestore won't compile and run-make-check.sh will fail.

http://tracker.ceph.com/issues/14220 Fixes: #14220

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-01-04 17:51:12 +01:00
Robin H. Johnson d63508f727 make-check: support MAKEOPTS overrides.
It is useful in some cases to exercise more control over the parameters
passed to make for make check. I am using it to passing a load limit
parameter to make.

Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
2015-08-24 03:38:27 +00:00
Loic Dachary 3a55cb029b tests: display the output of failed make check runs
After a make check fails, it shows a summary but not the output of the
failed tests although they contain information to diagnose the problem.

Set the VERBOSE=true automake variable which is documented to collect
and display the failed script output at the end of a run (the content of
the test-suite.log file (valid from automake-1.11 up).

http://www.gnu.org/software/automake/manual/automake.html#index-VERBOSE

Also remove the run-make-check.sh that did the same in a way that is not
compatible with automake-1.11.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-06-16 16:10:11 +02:00
Tim Serong e71e8654ee run-make-check.sh: stricter check for yum/apt-get/zypper
Believe it or not, it's possible (although not necessarily likely) to
have both yum and zypper installed on openSUSE.  In this case the
previous implementation using `which` would return a string containing
both commands, which doesn't work.

Signed-off-by: Tim Serong <tserong@suse.com>
2015-04-30 17:51:20 +10:00
Tim Serong 05534b8b93 run-make-check.sh: use /sbin/modprobe
Rationale: In some cases (e.g.: by default on openSUSE), `sudo` won't
add /sbin to $PATH.

Signed-off-by: Tim Serong <tserong@suse.com>
2015-04-30 17:51:20 +10:00
Loic Dachary 09c152a67c run-make-check.sh: git --ancestry-path is not backward compatible
The behavior is different on git 1.8 which is the default on centos7.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-02-05 14:37:38 +01:00
Loic Dachary e45e97be67 run-make-check: use nproc and shorter git expression
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-01-29 14:18:18 +01:00
Loic Dachary 46c83d9528 tests: run-make-check.sh arguments are passed to configure
All run-make-check.sh arguments are transparently given to the configure
command. For instance:

    run-make-check.sh --enable-root-make-check

implies

    ./configure --enable-root-make-check

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-21 17:53:00 +01:00
Loic Dachary 94abadbd80 tests: replace --enable-docker with --enable-root-make-check
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>
2014-12-21 17:53:00 +01:00
Loic Dachary 80f20f8ed3 tests: run-make-check.sh install jq
jq is useful to parse json from the command line. It is however not
packaged for all supported distributions (precise has it in the backport
repository which is usually not active) and cannot be conveniently added
to debian/control because it targets all distributions and has no
conditionals.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-21 17:52:18 +01:00
Loic Dachary b9ddf97a0c documentation: simplify running make check
Encapsulate the compilation steps (install dependencies, autogen.sh,
configure, make check) in the run-make-check.sh script. Update the
developer documentation to point to this script instead of multiple
steps.

It is intended as a tool to help new developer make sure their patch is
sane, it focuses on efficiency (runs make check in parallel if possible)
and coverage (enables docker based tests if possible).

http://tracker.ceph.com/issues/10265 Fixes: #10265

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-13 15:01:40 +01:00