Beispiel #1
0
int
main(int argc, const char **argv)
{
#ifdef _WIN32
	WORD wVersionRequested;
	WSADATA wsaData;
	int	err;

	wVersionRequested = MAKEWORD(2, 2);

	err = WSAStartup(wVersionRequested, &wsaData);
#endif

#ifndef _WIN32
	if (signal(SIGPIPE, SIG_IGN) == SIG_ERR)
		return 1;
#endif

#ifdef _WIN32
	tinytest_skip(testgroups, "http/connection_retry");
#endif

#ifndef _EVENT_DISABLE_THREAD_SUPPORT
	if (!getenv("EVENT_NO_DEBUG_LOCKS"))
		evthread_enable_lock_debuging();
#endif

	if (tinytest_main(argc,argv,testgroups))
		return 1;

	return 0;
}
Beispiel #2
0
int
main(int argc, const char **argv)
{
#ifdef _WIN32
    WORD wVersionRequested;
    WSADATA wsaData;

    wVersionRequested = MAKEWORD(2, 2);

    (void) WSAStartup(wVersionRequested, &wsaData);
#endif

#ifndef _WIN32
    if (signal(SIGPIPE, SIG_IGN) == SIG_ERR)
        return 1;
#endif

#ifdef _WIN32
    tinytest_skip(testgroups, "http/connection_retry");
    tinytest_skip(testgroups, "http/https_connection_retry");
#endif

#ifndef EVENT__DISABLE_THREAD_SUPPORT
    if (!getenv("EVENT_NO_DEBUG_LOCKS"))
        evthread_enable_lock_debugging();
#endif

    if (getenv("EVENT_DEBUG_MODE")) {
        event_enable_debug_mode();
        libevent_tests_running_in_debug_mode = 1;
    }
    if (getenv("EVENT_DEBUG_LOGGING_ALL")) {
        event_enable_debug_logging(EVENT_DBG_ALL);
    }

    tinytest_set_aliases(testaliases);

    evutil_weakrand_seed_(&test_weakrand_state, 0);

    if (tinytest_main(argc,argv,testgroups))
        return 1;

    libevent_global_shutdown();

    return 0;
}