Lines Matching defs:tp
26 #include "atf-c/tp.h"
50 find_tc(const atf_tp_t *tp, const char *ident)
56 atf_list_for_each_c(iter, &tp->pimpl->m_tcs) {
76 atf_tp_init(atf_tp_t *tp, const char *const *config)
82 tp->pimpl = malloc(sizeof(struct atf_tp_impl));
83 if (tp->pimpl == NULL)
86 err = atf_list_init(&tp->pimpl->m_tcs);
90 err = atf_map_init_charpp(&tp->pimpl->m_config, config);
92 atf_list_fini(&tp->pimpl->m_tcs);
102 atf_tp_fini(atf_tp_t *tp)
106 atf_map_fini(&tp->pimpl->m_config);
108 atf_list_for_each(iter, &tp->pimpl->m_tcs) {
112 atf_list_fini(&tp->pimpl->m_tcs);
114 free(tp->pimpl);
122 atf_tp_get_config(const atf_tp_t *tp)
124 return atf_map_to_charpp(&tp->pimpl->m_config);
128 atf_tp_has_tc(const atf_tp_t *tp, const char *id)
130 const atf_tc_t *tc = find_tc(tp, id);
135 atf_tp_get_tc(const atf_tp_t *tp, const char *id)
137 const atf_tc_t *tc = find_tc(tp, id);
143 atf_tp_get_tcs(const atf_tp_t *tp)
150 (atf_list_size(&tp->pimpl->m_tcs) + 1));
155 atf_list_for_each_c(iter, &tp->pimpl->m_tcs) {
176 atf_tp_add_tc(atf_tp_t *tp, atf_tc_t *tc)
180 PRE(find_tc(tp, atf_tc_get_ident(tc)) == NULL);
182 err = atf_list_append(&tp->pimpl->m_tcs, tc, false);
184 POST(find_tc(tp, atf_tc_get_ident(tc)) != NULL);
194 atf_tp_run(const atf_tp_t *tp, const char *tcname, const char *resfile)
198 tc = find_tc(tp, tcname);
205 atf_tp_cleanup(const atf_tp_t *tp, const char *tcname)
209 tc = find_tc(tp, tcname);