Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: nathan_lynch@mentor.com (Nathan Lynch)
Subject: [lttng-dev] [RFC/PATCH 1/3] babeltrace: use AM_TESTS_ENVIRONMENT for tests
Date: Tue, 25 Oct 2016 10:34:25 -0500	[thread overview]
Message-ID: <1477409667-8309-2-git-send-email-nathan_lynch@mentor.com> (raw)
In-Reply-To: <1477409667-8309-1-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 <nathan_lynch at mentor.com>
---
 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



  reply	other threads:[~2016-10-25 15:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-25 15:34 [lttng-dev] [RFC/PATCH 0/3] babeltrace: test harness improvements + new tests Nathan Lynch
2016-10-25 15:34 ` Nathan Lynch [this message]
2016-10-25 15:34 ` [lttng-dev] [RFC/PATCH 2/3] babeltrace: drop configure-time substitutions in test scripts Nathan Lynch
2016-10-25 15:34 ` [lttng-dev] [RFC/PATCH 3/3] babeltrace: add simple tests for converter command line options Nathan Lynch
2016-10-26  7:11   ` Sebastien Boisvert
2016-10-26 13:36     ` Mathieu Desnoyers
2016-10-26 16:29       ` Nathan Lynch
2016-10-25 15:50 ` [lttng-dev] [RFC/PATCH 0/3] babeltrace: test harness improvements + new tests Jonathan Rajotte Julien
2016-10-25 16:05   ` Nathan Lynch
2016-10-25 17:43     ` Michael Jeanson
2016-10-25 20:48       ` Nathan Lynch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1477409667-8309-2-git-send-email-nathan_lynch@mentor.com \
    --to=nathan_lynch@mentor.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox