From mboxrd@z Thu Jan 1 00:00:00 1970 From: nathan_lynch@mentor.com (Nathan Lynch) Date: Tue, 25 Oct 2016 10:34:25 -0500 Subject: [lttng-dev] [RFC/PATCH 1/3] babeltrace: use AM_TESTS_ENVIRONMENT for tests In-Reply-To: <1477409667-8309-1-git-send-email-nathan_lynch@mentor.com> References: <1477409667-8309-1-git-send-email-nathan_lynch@mentor.com> Message-ID: <1477409667-8309-2-git-send-email-nathan_lynch@mentor.com> Export convenient variables from the build system into the runtime environment of the testcases, so that fewer test scripts need to be generated at configure time using Autoconf variable substitutions. This makes it less tedious to add and work on testcases in script form. The user can supplement or override settings in AM_TESTS_ENVIRONMENT by using TESTS_ENVIRONMENT on the command line. Signed-off-by: Nathan Lynch --- tests/Makefile.am | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/Makefile.am b/tests/Makefile.am index eda9f2351310..28cb2eca7770 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -29,3 +29,15 @@ endif if USE_PYTHON TESTS += bin/intersection/test_multi_trace_intersection.py endif + +AM_TESTS_ENVIRONMENT = \ + abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir ; \ + abs_top_builddir='$(abs_top_builddir)'; export abs_top_builddir ; \ + TAPLIB='$(abs_top_srcdir)'/tests/utils/tap/tap.sh ; export TAPLIB ; \ + CTF_TRACES='$(abs_top_srcdir)'/tests/ctf-traces ; export CTF_TRACES ; \ + BABELTRACE_BIN='$(abs_top_builddir)'/converter/babeltrace ; \ + export BABELTRACE_BIN ; \ + DEBUG_INFO_DATA='$(abs_top_srcdir)'/tests/debug-info-data ; \ + export DEBUG_INFO_DATA ; \ + GREP='$(GREP)' ; export GREP; \ + SED='$(SED)' ; export SED; -- 2.7.4