Commit a7e13b6a authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add a macro "topsrc" with an absolute path to the top of the source

tree we are testing in.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5181 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 0cd26bc5
......@@ -29,6 +29,9 @@ varnishtest_LDADD = \
$(top_builddir)/lib/libvarnishapi/libvarnishapi.la \
${LIBM} ${PTHREAD_LIBS}
varnishtest_CFLAGS = \
-DTOP_SRCDIR='"${top_srcdir}"'
EXTRA_DIST = $(top_srcdir)/bin/varnishtest/tests/*.vtc \
$(top_srcdir)/bin/varnishtest/tests/README
......
......@@ -617,6 +617,8 @@ main(int argc, char * const *argv)
unsigned dur = 30;
const char *nmax;
char cmd[BUFSIZ];
char *cwd;
char topsrc[BUFSIZ];
setbuf(stdout, NULL);
setbuf(stderr, NULL);
......@@ -655,6 +657,10 @@ main(int argc, char * const *argv)
AZ(mkdir(vtc_tmpdir, 0700));
macro_def(vltop, NULL, "tmpdir", vtc_tmpdir);
cwd = getcwd(NULL, 0);
bprintf(topsrc, "%s/%s", cwd, TOP_SRCDIR);
macro_def(vltop, NULL, "topsrc", topsrc);
AZ(pthread_mutex_init(&vtc_mtx, NULL));
AZ(pthread_cond_init(&vtc_cond, NULL));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment