summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2012-08-12 23:05:58 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2012-08-12 23:05:58 +0000
commit6426f05fea3a3e289483b3eeb4bcffab1cc5c5ca (patch)
treead9054f1f1d373d4532b7249aacc70ba4dac4836
parent2adb42e0cc5d694931d5ebe20c94e11eaebbffe4 (diff)
downloadlibapr-6426f05fea3a3e289483b3eeb4bcffab1cc5c5ca.tar.gz
Merge r1089129 from trunk:
MinGW: Resolve paths to test DSOs and executables within the test suite. PR: 51021 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1372210 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--build/apr_hints.m41
-rw-r--r--test/testproc.c9
2 files changed, 8 insertions, 2 deletions
diff --git a/build/apr_hints.m4 b/build/apr_hints.m4
index 5999a81dc..29f37712f 100644
--- a/build/apr_hints.m4
+++ b/build/apr_hints.m4
@@ -442,6 +442,7 @@ dnl # Not a problem in 10.20. Otherwise, who knows?
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])
diff --git a/test/testproc.c b/test/testproc.c
index c983f2594..096ecfdfc 100644
--- a/test/testproc.c
+++ b/test/testproc.c
@@ -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 *tc, void *data)
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 *tc, void *data)
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);