Boost logo

Boost-Build :

Subject: Re: [Boost-build] Fixing the time action in testing.jam.
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2012-05-26 20:16:55


AMDG

On 05/26/2012 12:29 PM, Jurko Gospodnetić wrote:
> Hi all.
>
> I'd like to fix the seemingly incorrect variable expansion implemented
> in testing.jam module's time action. However before committing the
> change - I'd like to make sure this change will not break something I'm
> not aware of at the moment.
>

LGTM.

> Effect is that the time action will output something like:
>
> user: xxxxx seconds
> system: yyyyy seconds
>
> into its target file instead of:
>
> user: xxxxx" seconds"
> system: yyyyy" seconds"
>
> that it does now when run under the Windows cmd shell, i.e. using the
> Windows echo command.
>
> When using the unix echo command (e.g. under Cygwin) it should make no
> difference.
>
> I grepped through Boost trunk and found no code that would be affected
> by this. Is there something else like the automated regression testing
> system or something related to the Boost library web site that could get
> broken by this?
>
> If there are no complaints - I'll go ahead and commit a change such as
> presented in the following diff:
>
> --- testing.jam : Working Base, Revision 78629
> +++ testing.jam : Working Copy
> @@ -551,4 +551,10 @@
> USER_TIME on $(target) += $(src-string)$(user) ;
> SYSTEM_TIME on $(target) += $(src-string)$(system) ;
> +
> + # We need the following variables because attempting to perform such
> + # variable expansion in actions would not work due to quotes
> getting treated
> + # as regular characters.
> + USER_TIME_SECONDS on $(target) += $(src-string)$(user)" seconds" ;
> + SYSTEM_TIME_SECONDS on $(target) += $(src-string)$(system)" seconds" ;
> }
>
> @@ -577,5 +583,5 @@
> echo system: $(SYSTEM_TIME)
>
> - echo user: $(USER_TIME)" seconds" > "$(<)"
> - echo system: $(SYSTEM_TIME)" seconds" >> "$(<)"
> + echo user: $(USER_TIME_SECONDS) > "$(<)"
> + echo system: $(SYSTEM_TIME_SECONDS) >> "$(<)"
> }
>
> + a corresponding change in Python port's testing-aux.jam module.
>

In Christ,
Steven Watanabe


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk