Discussion:
[Boost-users] [test] Really deactivate test
Florian Lindner
2016-12-05 12:12:24 UTC
Permalink
Hello,

I need to conditionally decativate tests and use a custom decorator for that, like that:

virtual void apply(bt::test_unit& tu)
{
[...]
if (std::find(_ranks.begin(), _ranks.end(), rank) == _ranks.end()) {
std::cout << rank << " Disable, because of rank, test: " << tu.full_name() << std::endl;
tu.p_default_status.value = bt::test_unit::RS_DISABLED;
return;
}
}

(i'm happy to provide full source code, if anyone is interested)
As you can see it's deativated on some MPI ranks only.

However, if a user uses -t "testname" it is activated again.

Is there a way to really deactivate the test? Or delete it from the test tree?

Thanks,
Florian

Loading...