mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
Port the HTTP unit tests. Most are still legacy (since they use test_ok so much), but at least they no longer exit(1) on failure
svn:r1076
This commit is contained in:
parent
241690b230
commit
153093ecc3
@ -2314,9 +2314,6 @@ end:
|
||||
event_config_free(cfg);
|
||||
}
|
||||
|
||||
/* All the flags we set */
|
||||
#define TT_ISOLATED TT_FORK|TT_NEED_SOCKETPAIR|TT_NEED_BASE
|
||||
|
||||
struct testcase_t legacy_testcases[] = {
|
||||
/* Some converted-over tests */
|
||||
{ "methods", test_methods, TT_FORK, NULL, NULL },
|
||||
@ -2392,8 +2389,6 @@ legacy_main(void)
|
||||
regress_zlib();
|
||||
#endif
|
||||
|
||||
http_suite();
|
||||
|
||||
#ifndef WIN32
|
||||
rpc_suite();
|
||||
#endif
|
||||
|
@ -37,12 +37,10 @@ extern "C" {
|
||||
extern struct testcase_t legacy_testcases[];
|
||||
extern struct testcase_t util_testcases[];
|
||||
extern struct testcase_t signal_testcases[];
|
||||
extern struct testcase_t http_testcases[];
|
||||
|
||||
int legacy_main(void);
|
||||
|
||||
void http_suite(void);
|
||||
void http_basic_test(void);
|
||||
|
||||
void rpc_suite(void);
|
||||
|
||||
void dns_suite(void);
|
||||
@ -66,6 +64,9 @@ void run_legacy_test_fn(void *ptr);
|
||||
#define TT_NEED_SOCKETPAIR TT_FIRST_USER_FLAG
|
||||
#define TT_NEED_BASE (TT_FIRST_USER_FLAG<<1)
|
||||
|
||||
/* All the flags that a legacy test needs. */
|
||||
#define TT_ISOLATED TT_FORK|TT_NEED_SOCKETPAIR|TT_NEED_BASE
|
||||
|
||||
#define LEGACY(name,flags) \
|
||||
{ #name, run_legacy_test_fn, flags, &legacy_setup, \
|
||||
test_## name }
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -165,6 +165,7 @@ struct testgroup_t testgroups[] = {
|
||||
{ "main/", legacy_testcases },
|
||||
{ "signal/", signal_testcases },
|
||||
{ "util/", util_testcases },
|
||||
{ "http/", http_testcases },
|
||||
END_OF_GROUPS
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user