Page MenuHomePhabricator

Configure only needed part of test-suite during running subtests
Needs ReviewPublic

Authored by eklepilkina on Oct 23 2018, 5:53 AM.

Details

Reviewers
MatzeB
homerdin
Summary

There is an opportunity to run only some benchmarks (current test, subfolder) from test-suite. This allows to build and run only some part of test-suite. Alas, CMake produces build tree generating all files (most part of them are not needed in such cases).

This patch provides macro-wrapper that allows not to add extra folders in build tree in such cases.

I made experiments, I ran only one benchmark: generated build tree now is 26 MB, with current patch - 764.7 KB.

P.S. Also I added tests folder with simple lit tests to check work of macro.

Diff Detail

Repository
rT test-suite

Event Timeline

eklepilkina created this revision.Oct 23 2018, 5:53 AM
eklepilkina added inline comments.Oct 23 2018, 5:57 AM
CMakeLists.txt
11

Made ENABLE_PART_CONF variable to turn on this mode. Default mode of configuration stays as it is now.

tests/add_bench_subdirectory.test
2

Added simple lit test which checks work of macro and shows how new mode can be used.

Please, could someone review these changes?
Or may be add other reviewers if I choose wrong people?

homerdin added a comment.EditedNov 14 2018, 8:48 AM

I would definitely like to be able to specify a specific subset of the test-suite, however I'd try to avoid an additional control macro if we can extend the current ones.

I tried out -DTEST_SUITE_SUBDIRS=SingleSource/Benchmarks/Misc. It gets the desired smaller build tree, but ends up missing lit.local.cfg in SingleSouce so the tests fail. @MatzeB would know better if there is anything preventing using an existing macro for this functionality.

MicroBenchmarks/CMakeLists.txt
4–7

The other subdirectories in MicroBenchmarks depend on the libs library.

eklepilkina added inline comments.Nov 15 2018, 2:47 AM
MicroBenchmarks/CMakeLists.txt
4–7

Thank you. I missed this and accidentally change macro.

I tried out -DTEST_SUITE_SUBDIRS=SingleSource/Benchmarks/Misc. It gets the desired smaller build tree, but ends up missing lit.local.cfg in SingleSouce so the tests fail.

I didn't change string with coping lit.local.cfg.

I checked again.
My steps are below.

mkdir TBuild
cd TBuild/
cmake -DENABLE_PART_CONF=1 -DBENCH_DIRS=SingleSource/Benchmarks/Misc ../test-suite
make
lit.py -v .

And I have 27 tests passed.

Could you provide exact instruction for me to reproduce your problem?