tests: oneliner to run make check in a container#3228
Conversation
Author
|
@liewegas this series will make the bot immune to make check leftovers. It stands to reason that a failed make check leaves an arbitrary number of stale process / directories behind. |
If the user is root, do not use sudo. The sudo package is not installed by default on centos by default and when building from script it may be that root is running install-deps.sh on a freshly install distribution. Signed-off-by: Loic Dachary <ldachary@redhat.com>
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>
The dockerfiles must run install-deps.sh instead of duplicating the package list that is found in ceph.spec.in and debian/control. A directory is created for each os_type and provided as a context for docker build to use. The former $os_type.dockerfile is moved into $os_type/Dockerfile.in (the .in as a reminder that it will be variable substituted). http://tracker.ceph.com/issues/10401 Fixes: #10401 Signed-off-by: Loic Dachary <ldachary@redhat.com>
If any of the files in test/$os_type is newer than the creation date of a docker image, the image is removed and rebuilt from scratch. For instance, when a package is added to debian/control, the debian based images are rebuilt. Signed-off-by: Loic Dachary <ldachary@redhat.com>
If compilation is run with ./configuire --enable-root-make-check, sudo is expected to work without human interaction. Signed-off-by: Loic Dachary <ldachary@redhat.com>
It is redundant with the run-make-check.sh script and imposes additional limitations. Signed-off-by: Loic Dachary <ldachary@redhat.com>
Instead of being in the src directory. Forcing the working directory to src is convenient to run unittests individually without the need to change directory, but it is confusing to the user. Signed-off-by: Loic Dachary <ldachary@redhat.com>
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>
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>
Add scripts that run make check in a container for a given operating
system version. They are a little more than oneliners and serve two
purposes:
* help new developers who do not have to figure out which options
should be used
* run make check in containers in parallel with make -j2
Signed-off-by: Loic Dachary <ldachary@redhat.com>
It can be removed once #3228 is merged and xmlstarlet is found in ceph.spec.in and debian/control. Signed-off-by: Loic Dachary <ldachary@redhat.com>
Do not force interactive mode when the bash script is specified by the user because it should be usable to run a small script instead of starting an interactive shell session. Signed-off-by: Loic Dachary <ldachary@redhat.com>
Add the --ref option to chose the git ref to which the working tree must be reset instead of HEAD. test/docker-test.sh --ref giant make is equivalent to test/docker-test.sh bash -c 'git reset --hard giant ; make' Signed-off-by: Loic Dachary <ldachary@redhat.com>
Collapse multiple RUN statements related to systemd into a single line to reduce the number of steps that are preserved by docker. Signed-off-by: Loic Dachary <ldachary@redhat.com>
|
SUCCESS: the output of run-make-check.sh on 05d3f5b is http://paste.ubuntu.com/9589681/ |
liewegas
added a commit
that referenced
this pull request
Dec 21, 2014
tests: oneliner to run make check in a container Reviewed-by: Sage Weil <sage@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test/container-make-check-ubuntu-14.04.sh will
The uses cases are:
The test/container-make-check-centos-centos7.sh script does the same and can run in parallel.