[scl.org] Scltests
Robert Kuska
rkuska at redhat.com
Wed Apr 1 13:40:05 UTC 2015
Hello everyone, I would like to present you SCLTESTS [0] - (sort of) framework
to make testing of your scl packages easier.
Who is it for?
Scltests are mainly designed for maintainers of collections who often
use `rpm -qp` on their newly built packages to ensure that everything was
built as it should be.
What does it do?
It builds your whole collection and then runs tests as defined in your test config
on your local machine.
I would like to have later scltests run on jenkins with a trigger being adding new collection or
update of scl-utils (if maintainers find my 'framework' useful).
How it works?
Firstly it creates srpms from your specfiles and sources.
Next step is mock build of all srpms in order as defined in collection yaml config file.
After build the tests are created, again based on the values of yaml config file.
Tests are run.
How can I run scltests?
First, you have to make sure that you meet the requirements.
Install following packages:
python-click, PyYAML, mock, createrepo, scl-utils-build
Optional dependency for coloured test output:
python-colour-runner (currently being packaged into fedora [1])
Also user under which you will run these tests must be in user group mock.
git clone https://github.com/sclorg/scltests.git && cd scltests
See
> $ ./run-tests.py --help
use list to query for available collection and mock configs.
> $ ./run-tests.py list
Available software collections: python27
Available mock configs: epel6:fedora22
now run tests for chosen collection and config
> $ ./run-tests.py test python27 fedora22
sit back and wait for stdout report [3].
How can I add my own collection?
Create folder for your collection under scltests/SRPMS, folder must have same
name as the collection, add corresponding spec files and sources.
Create YAML config file under scltests/configs/YAML, basename of the yaml
file must be the collection name, for how to create appropriate YAML file refer to [2].
Add mock config file under scltests/configs/MOCK, make sure that scl-utils-build
is included in config_opts['chroot_setup_cmd']
Any questions, RFEs and bug reports are welcomed [4].
[0] https://github.com/sclorg/scltests/
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1202303
[2] https://github.com/sclorg/scltests/blob/master/scltests/configs/YAML/python27.yaml
[3] https://pastebin.mozilla.org/8827848
[4] https://github.com/sclorg/scltests/issues
--
Robert Kuska
{rkuska}
More information about the SCLorg
mailing list