Re: [boost] [gil][test] HOWTO set up the Boost testing process for projects with extra prerequisites ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [boost] [gil][test] HOWTO set up the Boost testing process for projects with extra prerequisites ?

Boost - Build mailing list
Hi,

I'm following up with a technical Boost.Build question, so this mailing list seems more appropriate...


On 17.11.2017 12:02, Rene Rivera via Boost wrote:
On Fri, Nov 17, 2017 at 10:42 AM, Steven Watanabe via Boost <
[hidden email]> wrote:

AMDG

On 11/17/2017 09:29 AM, Stefan Seefeld via Boost wrote:
I just merged some work to GIL's `develop` branch. This notably involves
improvements to the testing infrastructure. Testing GIL is a bit
involved, as it requires various backend libraries (PNG, JPEG, TIFF,
etc.) to be installed. While the stand-alone testing works fine
(https://github.com/boostorg/gil/blob/develop/.travis.yml#L304-L306),
the integrated testing will thus fail, until the testing logic is
augmented by the necessary instructions to a) install the prerequisites
and b) invoke the build system with the appropriate flags
(https://github.com/boostorg/gil/blob/develop/io/test/Jamfile#L13-L22)

  Please use the Boost.Build modules for these libraries
instead.  You can make the tests run only when the
corresponding libraries are available, like this:

using zlib ;

run png_test.cpp
  : # args
  : # input-files
  : # requirements
    [ ac.check-library /zlib//zlib : <library>/zlib//zlib : <build>no ]
    # in English, if the library is found, use it, otherwise,
    # skip this test
;

Although ideally it should be:

import zlib ;

run ... ;

And then ask the testers to add the appropriate "using zlib ... ;" to their
configuration. And that should also include any CI testing you do also.

Is there a way for the Jamfile to add a "using zlib ;" or similar that will serve as a default, i.e. whenever the user-config.jam file doesn't contain a "using zlib " statement ? I'd like to be able to write a valid Jamfile that works (and finds prerequisite libs in default locations) without a user-config.jam, but allow users to override the paths. But right now it seems I have to add "using zlib ;" to either my user-config.jam, or the Jamfile, but not both.

Thanks,

Stefan
-- 

      ...ich hab' noch einen Koffer in Berlin...
    

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: [boost] [gil][test] HOWTO set up the Boost testing process for projects with extra prerequisites ?

Boost - Build mailing list
AMDG

On 11/23/2017 07:26 PM, Stefan Seefeld via Boost-build wrote:
>
> Is there a way for the Jamfile to add a "using zlib ;" or similar that will
> serve as a default, i.e. whenever the user-config.jam file doesn't contain a
> "using zlib " statement ? I'd like to be able to write a valid Jamfile that
> works (and finds prerequisite libs in default locations) without a
> user-config.jam, but allow users to override the paths. But right now it seems I
> have to add "using zlib ;" to either my user-config.jam, or the Jamfile, but not
> both.
>

They're not exclusive.  It's designed so that

  using zlib ;

with no arguments will work correctly in a Jamfile.
As long as none of <source>, <search>, <name>, or
<include> are specified, `using zlib`, will be ignored,
if a previous `using zlib` already exists.

In Christ,
Steven Watanabe

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: [boost] [gil][test] HOWTO set up the Boost testing process for projects with extra prerequisites ?

Boost - Build mailing list
On 23.11.2017 21:48, Steven Watanabe via Boost-build wrote:
AMDG

On 11/23/2017 07:26 PM, Stefan Seefeld via Boost-build wrote:
Is there a way for the Jamfile to add a "using zlib ;" or similar that will 
serve as a default, i.e. whenever the user-config.jam file doesn't contain a 
"using zlib " statement ? I'd like to be able to write a valid Jamfile that 
works (and finds prerequisite libs in default locations) without a 
user-config.jam, but allow users to override the paths. But right now it seems I 
have to add "using zlib ;" to either my user-config.jam, or the Jamfile, but not 
both.

They're not exclusive.  It's designed so that

  using zlib ;

with no arguments will work correctly in a Jamfile.
As long as none of <source>, <search>, <name>, or
<include> are specified, `using zlib`, will be ignored,
if a previous `using zlib` already exists.

That sounds sensible indeed, but unfortunately doesn't correspond to my observations. A recent PR build results in

error: at libs\gil\io\test\Jamfile:14
error: libjpeg is already configured
(the full output from AppVeyor is here: https://ci.appveyor.com/project/stefanseefeld/gil/build/job/bb645sw469pbk7ta)

corresponding to this PR: https://github.com/boostorg/gil/commit/fc9e7e2bcb3c85cfe5d8d0930230c9827bdaa8e3

Notice the lines changes to the Jamefile in question ("using libjpeg ;"), in addition to a generated ~/user-config.jam file
containing the CI-specific paths, in the .appveyor.yml logic.

Can you see anything that I'm doing wrong ?

Thanks,

Stefan
-- 

      ...ich hab' noch einen Koffer in Berlin...
    

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: [boost] [gil][test] HOWTO set up the Boost testing process for projects with extra prerequisites ?

Boost - Build mailing list
AMDG

On 11/23/2017 07:57 PM, Stefan Seefeld via Boost-build wrote:

> On 23.11.2017 21:48, Steven Watanabe via Boost-build wrote:
>> On 11/23/2017 07:26 PM, Stefan Seefeld via Boost-build wrote:
>>> <snip> I'd like to be able to write a valid Jamfile that
>>> works (and finds prerequisite libs in default locations) without a
>>> user-config.jam, but allow users to override the paths. <snip>
>>>
>> They're not exclusive.  It's designed so that
>>
>>    using zlib ;
>>
>> with no arguments will work correctly in a Jamfile.
>> <snip>
>
> That sounds sensible indeed, but unfortunately doesn't correspond to my
> observations. A recent PR build results in
>
> error: at libs\gil\io\test\Jamfile:14
> error: libjpeg is already configured
> (the full output from AppVeyor is here:
> https://ci.appveyor.com/project/stefanseefeld/gil/build/job/bb645sw469pbk7ta)
>
> <snip>
>
> Can you see anything that I'm doing wrong ?
>

  Nope.  This is a bug.  Your original question only
mentioned zlib, which /does/ work as I described.
(And I know it works, because it's used by iostreams)
libjpeg.jam was unused, so it apparently didn't get
the same cleanup that I applied to bzip2 and zlib.
I'll try to fix this some time tomorrow along with
your other report and Peter's.

In Christ,
Steven Watanabe

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: [boost] [gil][test] HOWTO set up the Boost testing process for projects with extra prerequisites ?

Boost - Build mailing list
AMDG

On 11/23/2017 08:09 PM, Steven Watanabe wrote:

>
> On 11/23/2017 07:57 PM, Stefan Seefeld via Boost-build wrote:
>> On 23.11.2017 21:48, Steven Watanabe via Boost-build wrote:
>>>
>>>    using zlib ;
>>>
>>> with no arguments will work correctly in a Jamfile.
>>> <snip>
>>
>> That sounds sensible indeed, but unfortunately doesn't correspond to my
>> observations. A recent PR build results in
>>
>> error: at libs\gil\io\test\Jamfile:14
>> error: libjpeg is already configured
>> (the full output from AppVeyor is here:
>> https://ci.appveyor.com/project/stefanseefeld/gil/build/job/bb645sw469pbk7ta)
>>
>> <snip>
>>
>> Can you see anything that I'm doing wrong ?
>>
>
>   Nope.  This is a bug.
>

You can make it work with

using libjpeg
  : # version
  : # options
  : # requirements
  : # is-default
    true
  ;

(The options are described by `b2 --help libjpeg.init`)

I'll update libjpeg to match zlib, which decides
automatically whether it should be a default configuration.

In Christ,
Steven Watanabe

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: [boost] [gil][test] HOWTO set up the Boost testing process for projects with extra prerequisites ?

Boost - Build mailing list
On 23.11.2017 22:25, Steven Watanabe via Boost-build wrote:
AMDG

On 11/23/2017 08:09 PM, Steven Watanabe wrote:
On 11/23/2017 07:57 PM, Stefan Seefeld via Boost-build wrote:
On 23.11.2017 21:48, Steven Watanabe via Boost-build wrote:
   using zlib ;

with no arguments will work correctly in a Jamfile.
<snip>
That sounds sensible indeed, but unfortunately doesn't correspond to my 
observations. A recent PR build results in

error: at libs\gil\io\test\Jamfile:14
error: libjpeg is already configured
(the full output from AppVeyor is here: 
https://ci.appveyor.com/project/stefanseefeld/gil/build/job/bb645sw469pbk7ta)

<snip>

Can you see anything that I'm doing wrong ?

  Nope.  This is a bug.

You can make it work with

using libjpeg
  : # version
  : # options
  : # requirements
  : # is-default
    true
  ;

(The options are described by `b2 --help libjpeg.init`)

I'll update libjpeg to match zlib, which decides
automatically whether it should be a default configuration.

Thank you ! (I'm also using libpng and libtiff, so it's possible that these exhibit the same problem. We shall find out soon enough.)

Stefan
-- 

      ...ich hab' noch einen Koffer in Berlin...
    

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: [boost] [gil][test] HOWTO set up the Boost testing process for projects with extra prerequisites ?

Boost - Build mailing list
On 24.11.2017 07:59, Stefan Seefeld wrote:
On 23.11.2017 22:25, Steven Watanabe via Boost-build wrote:
I'll update libjpeg to match zlib, which decides
automatically whether it should be a default configuration.

Thank you ! (I'm also using libpng and libtiff, so it's possible that these exhibit the same problem. We shall find out soon enough.)

And indeed, both of them suffer the same problem.

Stefan
-- 

      ...ich hab' noch einen Koffer in Berlin...
    

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: [boost] [gil][test] HOWTO set up the Boost testing process for projects with extra prerequisites ?

Boost - Build mailing list
AMDG

On 11/24/2017 02:44 PM, Stefan Seefeld via Boost-build wrote:

> On 24.11.2017 07:59, Stefan Seefeld wrote:
>> On 23.11.2017 22:25, Steven Watanabe via Boost-build wrote:
>>> I'll update libjpeg to match zlib, which decides
>>> automatically whether it should be a default configuration.
>>
>> Thank you ! (I'm also using libpng and libtiff, so it's possible that these
>> exhibit the same problem. We shall find out soon enough.)
>
> And indeed, both of them suffer the same problem.
>

I just fixed all three.

In Christ,
Steven Watanabe

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build