Subject: Re: [boost] [bjam] Can I disable a test based on an environment variable?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2018-01-21 05:17:31


AMDG

On 01/20/2018 10:03 PM, James E. King, III via Boost wrote:
> I'd like to disable some serialization tests if I am running a ubsan build
> on travis. Is there a way in the Jamfile I can make it conditional on an
> environment variable, or should I define something like
> BOOST_DATE_TIME_UBSAN and put "if !defined" in the appropriate tests?
>

import os ;
if ! [ os.environ BOOST_DATE_TIME_UBSAN ]
{
   ...
}

This will work with both environment variables and
-sBOOST_DATE_TIME_UBSAN=... on the command line.

For the record, I think that disabling tests like
this is a great way to make sure that the bug
never gets fixed.

In Christ,
Steven Watanabe