Using $(@) seems to work.


import testing ;

run
    [ glob *.cpp ]
: : : <testing.launcher>"valgrind --leak-check=full --track-origins=yes --error-exitcode=1 --quiet --suppressions=$(@)/.valgrind.supp"
: unit_test
;

Is that correct?

Where can I find details about automatic variables in the documentation?


On 15 October 2015 at 11:03, Steve Lorimer <steve.lorimer@gmail.com> wrote:
I am running my unit tests through valgrind using the <testing.launcher> rule

For one particular test I want to use a local valgrind suppressions file.

As such, I've specified the file using the --suppressions command line option

import testing ;

run
    [ glob *.cpp ]
: : : <testing.launcher>"valgrind --leak-check=full --track-origins=yes --error-exitcode=1 --quiet --suppressions=.valgrind.supp"
: unit_test
;


This works fine when building from the same directory as the unit test itself (ie: the same directory in which .valgrind.supp is located).

When building from elsewhere the file is not found, and valgrind exits with an error.

How can I specify the full path (or relative path to where the build is executing from)?

TIA
Steve