Use a volume when running the unit tests instead of copying the source in the image

This commit is contained in:
mprahl
2018-06-14 08:54:27 -04:00
parent e2e804b1d6
commit 83d7d96141
5 changed files with 34 additions and 14 deletions

View File

@@ -4,9 +4,18 @@ Running Tests
Since MBS requires Python dependencies that aren't available using PyPi (e.g. libsolv bindings),
there is a Docker image that can be used to run the code analysis and unit tests.
To run the tests::
To run the tests, you must first install and start Docker with::
$ sudo docker build -t mbs/test -f Dockerfile-tests . && sudo docker run mbs/test
$ sudo dnf install docker
$ sudo systemctl start docker
From the main git directory, build the Docker image with::
$ sudo docker build -t mbs/test -f docker/Dockerfile-tests .
Then run the tests with::
$ sudo docker run -t -v $PWD:/src:Z mbs/test
Development