tests: enable time tracing on tests 500, 573 and 585
authorYang Tse <yangsita@gmail.com>
Tue, 17 Jan 2012 20:33:17 +0000 (21:33 +0100)
committerYang Tse <yangsita@gmail.com>
Tue, 17 Jan 2012 20:33:17 +0000 (21:33 +0100)
tests/libtest/Makefile.inc
tests/libtest/lib500.c
tests/libtest/lib573.c

index e37e63b..0ff5888 100644 (file)
@@ -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)
index 109312b..dda1d7f 100644 (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, "-");
 
index 50aedfa..b49d26a 100644 (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);