New tests not being run

22 views
Skip to first unread message

Martin Michlmayr

unread,
May 13, 2014, 11:11:34 AM5/13/14
to ledge...@googlegroups.com
When I git clone the repo, run
./acprep --debug --python
make -j4
make check

And *then* add a new test and run 'make check' again, the new test is
not being executed.

Can someone with cmake experience look into this?

--
Martin Michlmayr
http://www.cyrius.com/

Alexis

unread,
May 13, 2014, 12:16:16 PM5/13/14
to ledge...@googlegroups.com
Hi,
I came across this issue too, found an explanation, but
no better solution than ./acprep [git]clean.

The explanation is that test/CMakeLists.txt defines the
add_ledger_harness_tests macro which is used by the
test/{baseline,manual,regress/CMakeLists.txt to add
tests.

The macro globs for *.test in the given directory and
generates a cmake cache entry¹ for the test, which is
then used by ctest as far as I understood.

So, the solution [cw]ould be to force cmake into regenerating
its cache for the test/ directory.


Cheers,
Alexis

¹ see test/{baseline,manual,regress}/CTestTestfile.cmake

John Wiegley

unread,
May 13, 2014, 4:25:26 PM5/13/14
to ledge...@googlegroups.com
>>>>> Alexis <surr...@gmail.com> writes:

> So, the solution [cw]ould be to force cmake into regenerating its cache for
> the test/ directory.

This is exactly right, and I must do it myself each time as well.

John

Alexis

unread,
Dec 25, 2014, 4:04:55 PM12/25/14
to ledge...@googlegroups.com
Hi,
I found a better solution to doing acprep gitclean in order to add new tests.
CMake provides the functionality to rebuild its cache, with the Ninja
generator for example you run: % ninja rebuild_cache

This will rebuild the cache and the next test run will include the new test.


Cheers,
Alexis

John Wiegley

unread,
Dec 25, 2014, 6:18:02 PM12/25/14
to ledge...@googlegroups.com
>>>>> Alexis <surr...@gmail.com> writes:

> This will rebuild the cache and the next test run will include the new test.

Cool! That's great to know, thanks Alexis.

John
Reply all
Reply to author
Forward
0 new messages