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 */
        /* Is it safe to add per-test program initialization code here ? */

        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 :)

Home | Main Index | Thread Index | Old Index