summaryrefslogtreecommitdiff
path: root/test/testproc.c
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2011-04-05 16:50:28 +0000
committerJeff Trawick <trawick@apache.org>2011-04-05 16:50:28 +0000
commitb48278d96ec6cde8ff7f69afe232e22871776cf1 (patch)
treee7f81c822c8a415ac8b5e0970e3e103d8b184200 /test/testproc.c
parent9d4212a72da5ddbc99ac75581f60a49364da247f (diff)
downloadapr-b48278d96ec6cde8ff7f69afe232e22871776cf1.tar.gz
MinGW: Resolve paths to test DSOs and executables within the test
suite. PR: 51021 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1089129 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testproc.c')
-rw-r--r--test/testproc.c9
1 files changed, 7 insertions, 2 deletions
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);