aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2012-01-17 21:33:17 +0100
committerYang Tse <yangsita@gmail.com>2012-01-17 21:33:17 +0100
commit24526d0c0f4209eb77c807afdb15da301c7d021b (patch)
treebeb9c31ab950b5a4a7592d2cfd7fd122db53a763 /tests/libtest
parenta752850acc4fda72a36fdc53d5d5b7c6da5693c0 (diff)
tests: enable time tracing on tests 500, 573 and 585
Diffstat (limited to 'tests/libtest')
-rw-r--r--tests/libtest/Makefile.inc9
-rw-r--r--tests/libtest/lib500.c9
-rw-r--r--tests/libtest/lib573.c9
3 files changed, 22 insertions, 5 deletions
diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc
index e37e63b9e..0ff588809 100644
--- a/tests/libtest/Makefile.inc
+++ b/tests/libtest/Makefile.inc
@@ -2,6 +2,9 @@
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
# these files are used in every single test program below
@@ -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)
diff --git a/tests/libtest/lib500.c b/tests/libtest/lib500.c
index 109312b37..dda1d7f42 100644
--- a/tests/libtest/lib500.c
+++ b/tests/libtest/lib500.c
@@ -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, "-");
diff --git a/tests/libtest/lib573.c b/tests/libtest/lib573.c
index 50aedfa6c..b49d26a5d 100644
--- a/tests/libtest/lib573.c
+++ b/tests/libtest/lib573.c
@@ -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);