dev-cafe / autocmake

CMake plugin composer.
http://autocmake.org
BSD 3-Clause "New" or "Revised" License
42 stars 18 forks source link

adapt test.py to handle individual test ? #126

Closed miroi closed 9 years ago

miroi commented 9 years ago

Currently, with the test.py we can only run all (27) tests at once. Some tests take too long (like test_boost_mpi_libs, my eye observation).

Could we adapt test.py so it can also run user selected tests ? Would be helpful for the autocmake development.

bast commented 9 years ago

This is possible. See py.test documentation.

miroi commented 9 years ago

Aaaah, right - py.test allows that. This could be documented here, https://autocmake.readthedocs.org/en/latest/contributors/testing.html .

Example:

milias@login.grid.umb.sk:~/Work/qch/software/software_projects/autocmake_devel/autocmake_miroi/.py.test -k fc_blas  -vv  test/test.py
======================================= test session starts ========================================
platform linux2 -- Python 2.6.6 -- py-1.4.28 -- pytest-2.7.1 -- /usr/bin/python
rootdir: /home/milias/Work/qch/software/software_projects/autocmake_devel/autocmake_miroi/test, inifile:
collected 27 items

test/test.py::test_fc_blas PASSED
test/test.py::test_fc_blas_static PASSED

================================ 25 tests deselected by '-kfc_blas' ================================
============================= 2 passed, 25 deselected in 8.70 seconds ==============================
bast commented 9 years ago

I have no intention to duplicate the very good documentation of pytest. But you are always welcome to contribute to the documentation at any moment.