1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-11 03:55:03 -05:00

tests: enable time tracing on tests 500, 573 and 585

This commit is contained in:
Yang Tse 2012-01-17 21:33:17 +01:00
parent a752850acc
commit 24526d0c0f
3 changed files with 22 additions and 5 deletions

View File

@ -1,6 +1,9 @@
# files used only in some libcurl test programs
TESTUTIL = testutil.c testutil.h
# files used only in some libcurl test programs
TSTTRACE = testtrace.c testtrace.h
# files used only in some libcurl test programs
WARNLESS = $(top_srcdir)/lib/warnless.c $(top_srcdir)/lib/warnless.h
@ -23,7 +26,7 @@ chkhostname_LDADD = @CURL_NETWORK_LIBS@
chkhostname_DEPENDENCIES =
chkhostname_CFLAGS = $(AM_CFLAGS)
lib500_SOURCES = lib500.c $(SUPPORTFILES)
lib500_SOURCES = lib500.c $(SUPPORTFILES) $(TESTUTIL) $(TSTTRACE)
lib501_SOURCES = lib501.c $(SUPPORTFILES)
@ -155,7 +158,7 @@ lib571_SOURCES = lib571.c $(SUPPORTFILES)
lib572_SOURCES = lib572.c $(SUPPORTFILES)
lib573_SOURCES = lib573.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
lib573_SOURCES = lib573.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) $(TSTTRACE)
lib578_SOURCES = lib578.c $(SUPPORTFILES)
@ -165,7 +168,7 @@ lib582_SOURCES = lib582.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
lib583_SOURCES = lib583.c $(SUPPORTFILES)
lib585_SOURCES = lib500.c $(SUPPORTFILES)
lib585_SOURCES = lib500.c $(SUPPORTFILES) $(TESTUTIL) $(TSTTRACE)
lib585_CPPFLAGS = $(AM_CPPFLAGS) -DLIB585
lib586_SOURCES = lib586.c $(SUPPORTFILES)

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@ -21,6 +21,7 @@
***************************************************************************/
#include "test.h"
#include "testtrace.h"
#include "memdebug.h"
#ifdef LIB585
@ -76,6 +77,12 @@ int test(char *URL)
test_setopt(curl, CURLOPT_URL, URL);
test_setopt(curl, CURLOPT_HEADER, 1L);
libtest_debug_config.nohex = 1;
libtest_debug_config.tracetime = 1;
test_setopt(curl, CURLOPT_DEBUGDATA, &libtest_debug_config);
test_setopt(curl, CURLOPT_DEBUGFUNCTION, libtest_debug_cb);
test_setopt(curl, CURLOPT_VERBOSE, 1L);
if(libtest_arg3 && !strcmp(libtest_arg3, "activeftp"))
test_setopt(curl, CURLOPT_FTPPORT, "-");

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@ -21,6 +21,7 @@
***************************************************************************/
#include "test.h"
#include "testtrace.h"
#include "testutil.h"
#include "warnless.h"
#include "memdebug.h"
@ -54,6 +55,12 @@ int test(char *URL)
easy_setopt(c, CURLOPT_HEADER, 1L);
easy_setopt(c, CURLOPT_URL, URL);
libtest_debug_config.nohex = 1;
libtest_debug_config.tracetime = 1;
easy_setopt(c, CURLOPT_DEBUGDATA, &libtest_debug_config);
easy_setopt(c, CURLOPT_DEBUGFUNCTION, libtest_debug_cb);
easy_setopt(c, CURLOPT_VERBOSE, 1L);
multi_init(m);
multi_add_handle(m, c);