From: Beman Dawes [mailto:bdawes@acm.org]
Sent: Thursday, December 26, 2013 1:48 PM
To: Boost.Build developer's and user's list
Subject: Re: [Boost-build] How to run inspect as part of a test-suite?

 

On Thu, Dec 26, 2013 at 5:59 AM, Paul A. Bristow <pbristow@hetp.u-net.com> wrote:

 

 

From: Beman Dawes [mailto:bdawes@acm.org]
Sent: Tuesday, December 24, 2013 8:56 PM
To: steven; Boost.Build developer's and user's list
Subject: Re: [Boost-build] How to run inspect as part of a test-suite?

 

On Fri, Dec 20, 2013 at 11:17 AM, Steven Watanabe <watanabesj@gmail.com> wrote:

AMDG


On 12/20/2013 08:03 AM, Beman Dawes wrote:
> On Fri, Dec 20, 2013 at 10:43 AM, Steven Watanabe <watanabesj@gmail.com>wrote:
>

>> On 12/20/2013 07:10 AM, Beman Dawes wrote:
>>> On Thu, Dec 19, 2013 at 10:54 AM, Vladimir Prus <ghost@cs.msu.su> wrote:
>>>

>>>      [ run /boost/tools/inspect//inspect/<variant>release
>>>        : .. -text -brief # command line
>>
>> You just need to root .. by using path-constant.
>>
>
> Sorry, that's way above my bjam skill level. And since use of inspect in
> this context is almost always going to need command line arguments, the ..
> doesn't appear to be a problem.
>

What I mean is that passing a literal .. won't work
when bjam is run from a different directory
(status/ for instance).

path-constant parent : .. ;
# ...
run ... : $(parent) -text -brief ;

 

I've now tested this and it worked fine, AFAICS.

All changes to inspect, timer, and the super have been merged to master.

Actually, I didn't push the timer changes to master until a few minutes ago.

This is a Really Useful Thing.

I'm hoping so.

Please give it a try and report any problems. Once it is working smoothly, I'll post a note to the main list letting maintainers know how to use it. Basically, what you do is to update your test Jamfile.v2:

* Before anything else, add:

     path-constant parent : .. ;  # so that inspect will start in boost-root/libs/timer
                                 # when run from another directory, such as boost-root/status

* In the test-suite section add:

     [ run /boost/tools/inspect//inspect/<variant>release
       : $(parent) -text -brief # command line
       : # input files
       : <dependency>/boost/filesystem//boost_filesystem
         <test-info>always_show_run_output # requirements
       : inspect # test name
     ]

As usual, I am too stupid to get this to work L

I've added this to end of my jamfile (there being no test-suite in my Quickbook building docs file).

test-suite "svg_plot"

:

[ run /boost/tools/inspect//inspect/<variant>release

           : $(parent) -text -brief # command line

           : # input files

           : <dependency>/boost/filesystem//boost_filesystem

                          <test-info>always_show_run_output # requirements

           : inspect # test name

]

;

but I get this:

Jamfile.v2:250: in modules.load

*** argument error

* rule run ( sources + : args * : input-files * : requirements * : target-name ? : default-build * )

* called with: (  : I:\boost-trunk\libs\svg_plot -text -brief :  : <dependency>/boost/filesystem//boost_filesystem <test-info>always_show_run_output : inspect )

* missing argument sources

I:/boost-trunk/tools/build/v2/tools\testing.jam:170:see definition of rule 'run' being called

I:/boost-trunk/tools/build/v2/build\project.jam:311: in load-jamfile

I:/boost-trunk/tools/build/v2/build\project.jam:64: in load

I:/boost-trunk/tools/build/v2/build\project.jam:145: in project.find

I:/boost-trunk/tools/build/v2\build-system.jam:535: in load

I:\boost-trunk\tools\build\v2/kernel\modules.jam:289: in import

I:\boost-trunk\tools\build\v2/kernel/bootstrap.jam:139: in boost-build

I:\boost-trunk\boost-build.jam:17: in module scope

I'm still not using GIT but existing last boost-trunk - is this cause of my trouble?

so the html folder to inspect is in boost-trunk/libs/svg_plot/doc/html

but inspect is in my path

FWIW my .bat file in svg_plot /doc to do this is:

b2 html -a > svgplot_doc_html_%date%_%tim%.log

if ERRORLEVEL 1 goto :exit

echo "boost-no-inspect" >  inspect_%date%_%tim%.html

cd ./html

inspect.exe >> ../inspect_%date%_%tim%.html 2>&1

Happy New Year,

Paul