How to test a library

This article should be useful for every arch tester that ask how properly test a library.

Today we see a case like boost. The firsts steps will be:

  1. Emerge the new boost version
  2. Do a multiple compile test changing the USE
  3. Make sure the new boost is set as default: eselect boost list

Now, to make sure to don’t break the tree, you will compile all stable packages that have boost as DEPEND. To do this task we will use the script from the arch-tools repository ( thanks to Paweł Hajdan to make it ).

How reverse-dependencies works? Is very simple, follow this example:

touch boost_in;touch boost_out
echo "=dev-libs/boost-1.49.0-r1" >> boost_in
echo "=dev-util/boost-build-1.49.0" >> boost_in
python -i boost_in -o boost_out

Let me explain a bit.

First we have created 2 files;

  • in the first will go the package that needs to check.
  • in the last will go the package found by the script.

Yes in this case boost-build is not useful, but this example should tell you that you can put more than one package in the input file(boost_in). With the last command we have now a boost_out structured in this manner:

# One of the following USE flag combinations is required:
# boost

That obviously means that you need to enable boost USE to make sure that sci-mathematics/singular will use boost.


Now you need to compile all of packages in boost_out list and if you see failure related to boost you need to create a new bug on our bugzilla and make it as a blocker for boost stabilization.

This entry was posted in arch testing, gentoo. Bookmark the permalink.

3 Responses to How to test a library

  1. Alberta says:

    thanks for such a nice information. i appreciate your work.

  2. Ro says:

    Hi, can you not use the equery command from the gentoolkit package to look for reverse dependencies? For example,

    $ equery depends boost


Leave a Reply to ago Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.