ATF-devel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
test program one-shot initialization
Hey everybody,
Is there a way to add initialization code to my tests cases? Say for
instance that I want to seed my random number generator, before
running any test cases.
Something similar to ATF_TC_CLEANUP(tcX, tc) but for initialization.
Also, is there a way to do it on a per-test program basis ? E.g.,
/* Add test cases to test program */
ATF_TP_ADD_TCS(tp)
{
/* Is it safe to add per-test program initialization code here ? */
srand(time(NULL));
ATF_TP_ADD_TC(tp, test_cos1);
ATF_TP_ADD_TC(tp, test_cos2);
ATF_TP_ADD_TC(tp, test_cos3);
return atf_no_error();
}
Thanks :)
Stathis
Home |
Main Index |
Thread Index |
Old Index