apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1089129 - in /apr/apr/trunk: build/apr_hints.m4 test/testproc.c
Date Tue, 05 Apr 2011 16:50:28 GMT
Author: trawick
Date: Tue Apr  5 16:50:28 2011
New Revision: 1089129

URL: http://svn.apache.org/viewvc?rev=1089129&view=rev
Log:
MinGW: Resolve paths to test DSOs and executables within the test
suite.

PR: 51021

Modified:
    apr/apr/trunk/build/apr_hints.m4
    apr/apr/trunk/test/testproc.c

Modified: apr/apr/trunk/build/apr_hints.m4
URL: http://svn.apache.org/viewvc/apr/apr/trunk/build/apr_hints.m4?rev=1089129&r1=1089128&r2=1089129&view=diff
==============================================================================
--- apr/apr/trunk/build/apr_hints.m4 (original)
+++ apr/apr/trunk/build/apr_hints.m4 Tue Apr  5 16:50:28 2011
@@ -442,6 +442,7 @@ dnl	       # Not a problem in 10.20.  Ot
 	APR_ADDTO(CPPFLAGS, [-DCYGWIN])
 	;;
     *mingw*)
+        APR_ADDTO(INTERNAL_CPPFLAGS, -DBINPATH=$apr_builddir/test/.libs)
         APR_ADDTO(CPPFLAGS, [-DWIN32 -D__MSVCRT__])
 	APR_ADDTO(LDFLAGS, [-Wl,--enable-auto-import,--subsystem,console])
 	APR_SETIFNULL(have_unicode_fs, [1])

Modified: apr/apr/trunk/test/testproc.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testproc.c?rev=1089129&r1=1089128&r2=1089129&view=diff
==============================================================================
--- apr/apr/trunk/test/testproc.c (original)
+++ apr/apr/trunk/test/testproc.c Tue Apr  5 16:50:28 2011
@@ -23,6 +23,10 @@
 
 #define TESTSTR "This is a test"
 
+#define PROC_CHILD_NAME TESTBINPATH "proc_child" EXTENSION
+
+static char *proc_child;
+
 static apr_proc_t newproc;
 
 static void test_create_proc(abts_case *tc, void *data)
@@ -50,7 +54,7 @@ static void test_create_proc(abts_case *
     args[0] = "proc_child" EXTENSION;
     args[1] = NULL;
     
-    rv = apr_proc_create(&newproc, "../" TESTBINPATH "proc_child" EXTENSION, args, NULL,

+    rv = apr_proc_create(&newproc, proc_child, args, NULL, 
                          attr, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
@@ -126,7 +130,7 @@ static void test_file_redir(abts_case *t
     args[0] = "proc_child";
     args[1] = NULL;
 
-    rv = apr_proc_create(&newproc, "../" TESTBINPATH "proc_child" EXTENSION, args, NULL,

+    rv = apr_proc_create(&newproc, proc_child, args, NULL, 
                          attr, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
@@ -160,6 +164,7 @@ abts_suite *testproc(abts_suite *suite)
 {
     suite = ADD_SUITE(suite)
 
+    apr_filepath_merge(&proc_child, NULL, PROC_CHILD_NAME, 0, p);
     abts_run_test(suite, test_create_proc, NULL);
     abts_run_test(suite, test_proc_wait, NULL);
     abts_run_test(suite, test_file_redir, NULL);



Mime
View raw message