Change in vdsm[master]: tests: Run unit tests using travis-ci and docker

nsoffer at redhat.com nsoffer at redhat.com
Sun Mar 20 19:31:52 UTC 2016


Nir Soffer has posted comments on this change.

Change subject: tests: Run unit tests using travis-ci and docker
......................................................................


Patch Set 5:

(4 comments)

https://gerrit.ovirt.org/#/c/54856/5/.travis.yml
File .travis.yml:

Line 4:   - docker
Line 5: 
Line 6: # Disable depth (for ./autogen.sh --system to pass)
Line 7: git:
Line 8:   depth: 9999999
> Unfortunately, yes.
OK
Line 9: 
Line 10: before_install:
Line 11:   - docker --version
Line 12:   - docker pull edwardhaas/ovirt-vdsm-dev


Line 11:   - docker --version
Line 12:   - docker pull edwardhaas/ovirt-vdsm-dev
Line 13: 
Line 14: script:
Line 15:   - docker run --rm=true -it -v `pwd`:/vdsm:rw edwardhaas/ovirt-vdsm-dev /bin/bash -c "cd /vdsm && ./autogen.sh --system && make; make check-unit"
> Travis already clones and checks out the changed branch/pull, there is no n
Right, we don't need any cloning or checkouts for travis, and for local use we already have a checkout.

I was not aware that docker leave state when running without interactive mode.

Do we need the `pwd`:/vdsm:rw? Why not just "-v path-to-travis-checkout"?

Finally, check-unit is not good enough. It may work for network tests, but we have about 2000 tests, and most of them are unit tests. We are not going to mark most of the tests as unit, so the travis tests will not be useful for the entire project.


https://gerrit.ovirt.org/#/c/54856/5/contrib/Dockerfile
File contrib/Dockerfile:

Line 4:   yum update -y && yum install -y \
Line 5:   make autoconf automake git \
Line 6:   python-nose python-six python-devel libvirt-python python-netaddr python-inotify \
Line 7:   libselinux-python python-pthreading  python-cpopen mom && \
Line 8:   easy_install pip && easy_install pyflakes && pip install pep8==1.5.6
> Each RUN line is a layer that is created, like a function, saved with its o
OK, so lets have one RUN command, but format the lines in a readable way using \

Each line should contain one command or one package, and packages should be sorted.

See https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/
Line 9: 
Line 10: CMD mkdir workspace && \
Line 11:     cd workspace && \
Line 12:     git clone http://gerrit.ovirt.org/p/vdsm.git && cd vdsm && \


Line 9: 
Line 10: CMD mkdir workspace && \
Line 11:     cd workspace && \
Line 12:     git clone http://gerrit.ovirt.org/p/vdsm.git && cd vdsm && \
Line 13:     ./autogen.sh --system; make; make check-unit
> This is a default, it does not run if you specify something else (check the
I don't think we need it, whats the point in checking out master and running the tests by default?

If you want to see master tests in travis, look at the build history.


-- 
To view, visit https://gerrit.ovirt.org/54856
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia6cd647acb4c740f890e9b602783915439317880
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Edward Haas <edwardh at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: David Caro <dcaro at redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list