summaryrefslogtreecommitdiff
path: root/Makefile.decl
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2013-05-28 12:44:41 -0400
committerRyan Lortie <desrt@desrt.ca>2013-05-29 09:03:31 -0400
commit0c4806733cb30f56325b0f1c4e95a400e4998c14 (patch)
tree03dc2177af76101f03bd2f61cf162f105ac51122 /Makefile.decl
parent2afd39a90dbde31159a78b780bacdd636badb34e (diff)
downloadglib-0c4806733cb30f56325b0f1c4e95a400e4998c14.tar.gz
Add g_test_build_filename()
This function allows testcases to find data files in various situations of srcdir == builddir, srcdir != builddir and for installed tests. https://bugzilla.gnome.org/show_bug.cgi?id=549783
Diffstat (limited to 'Makefile.decl')
-rw-r--r--Makefile.decl6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile.decl b/Makefile.decl
index 50cf16953..067e7e5cd 100644
--- a/Makefile.decl
+++ b/Makefile.decl
@@ -20,7 +20,7 @@ if OS_UNIX
# test-nonrecursive: run tests only in cwd
test-nonrecursive: ${TEST_PROGS}
- @test -z "${TEST_PROGS}" || G_DEBUG=gc-friendly MALLOC_CHECK_=2 MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256)) ${GTESTER} --verbose ${TEST_PROGS}
+ @test -z "${TEST_PROGS}" || G_TEST_SRCDIR="$(abs_srcdir)" G_TEST_BUILDDIR="$(abs_builddir)" G_DEBUG=gc-friendly MALLOC_CHECK_=2 MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256)) ${GTESTER} --verbose ${TEST_PROGS}
else
test-nonrecursive:
endif
@@ -36,9 +36,9 @@ test-report perf-report full-report: ${TEST_PROGS}
full-report) test_options="-k -m=perf -m=slow";; \
esac ; \
if test -z "$$GTESTER_LOGDIR" ; then \
- ${GTESTER} --verbose $$test_options -o test-report.xml ${TEST_PROGS} ; \
+ G_TEST_SRCDIR="$(abs_srcdir)" G_TEST_BUILDDIR="$(abs_builddir)" ${GTESTER} --verbose $$test_options -o test-report.xml ${TEST_PROGS} ; \
elif test -n "${TEST_PROGS}" ; then \
- ${GTESTER} --verbose $$test_options -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ${TEST_PROGS} ; \
+ G_TEST_SRCDIR="$(abs_srcdir)" G_TEST_BUILDDIR="$(abs_builddir)" ${GTESTER} --verbose $$test_options -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ${TEST_PROGS} ; \
fi ; \
}
@ ignore_logdir=true ; \