[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to pass parameters to test program
From: |
Ralf Wildenhues |
Subject: |
Re: How to pass parameters to test program |
Date: |
Thu, 16 Apr 2009 20:25:31 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hello Dmitry,
* Dmitry V. Krivenok wrote on Thu, Apr 16, 2009 at 02:18:25PM CEST:
>
> I implemented some tests for my library using Boost.Test.
> Resulting test executable works fine.
> It's automatically executed when I run "make check".
Does it use the "simple Automake tests" test driver that is invoked when
the TESTS variable is set?
> The problem is that I want to pass parameters (--report_level=detailed
> --log_level=all) to my test program via command line.
> How can I specify parameters to be passed to test executable during
> "make check"?
> Is it possible at all?
With Automake 1.10.2, it is possible but only through a kludge.
For example:
--- test-driver ---
#! /bin/sh
exec $1 --report_level=detailed --log_level=all
--- Makefile.am ---
# hack: put a driver right before the test name.
TESTS_ENVIRONMENT = ./test-driver
TESTS = prog1 ...
---
With the 'parallel-tests' driver in upcoming Automake 1.11, it will at
least be possible not use the TESTS_ENVIRONMENT variable (which is
indented to be a user variable), but a LOG_COMPILER variable (or
FOO_LOG_COMPILER for tests with known extension .foo) for this same
hack. We still don't support passing arguments; I'm wondering whether
we should, and what to name the respective variables, and how to allow
to per-target'ify them.
Cheers,
Ralf