{"id":21,"date":"2012-07-11T18:21:32","date_gmt":"2012-07-11T16:21:32","guid":{"rendered":"http:\/\/blogs.gentoo.org\/ago\/?p=21"},"modified":"2012-08-06T21:34:11","modified_gmt":"2012-08-06T19:34:11","slug":"how-to-test-a-library","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/ago\/2012\/07\/11\/how-to-test-a-library\/","title":{"rendered":"How to test a library"},"content":{"rendered":"<p>This article should be useful for every arch tester that ask how properly test a library.<\/p>\n<p>Today we see a case like boost. The firsts steps will be:<\/p>\n<ol>\n<li>Emerge the new boost version<\/li>\n<li>Do a multiple compile test changing the USE<\/li>\n<li>Make sure the new boost is set as default: <code>eselect boost list<\/code><\/li>\n<\/ol>\n<p>Now, to make sure to don&#8217;t break the tree, you will compile all\u00a0<strong>stable<\/strong> packages that have boost as DEPEND. To do this task we will use the <a href=\"http:\/\/git.overlays.gentoo.org\/gitweb\/?p=proj\/arch-tools.git;a=blob;f=reverse-dependencies.py;h=4f87139ebf7495ba731546517c3a115d23d47ae2;hb=HEAD\">reverse-dependencies.py<\/a>\u00a0script from the <a href=\"http:\/\/git.overlays.gentoo.org\/gitweb\/?p=proj\/arch-tools.git;a=tree\">arch-tools<\/a>\u00a0repository ( thanks to\u00a0Pawe\u0142 Hajdan to make it ).<\/p>\n<p>How reverse-dependencies works? Is very simple, follow this example:<\/p>\n<p><code>touch boost_in;touch boost_out<\/code><br \/>\n<code>echo \"=dev-libs\/boost-1.49.0-r1\" &gt;&gt; boost_in<\/code><br \/>\n<code>echo \"=dev-util\/boost-build-1.49.0\" &gt;&gt; boost_in<\/code><br \/>\n<code>python reverse-dependecies.py -i boost_in -o boost_out<\/code><\/p>\n<p>Let me explain a bit.<\/p>\n<p>First we have created 2 files;<\/p>\n<ul>\n<li>in the first will go the package that needs to check.<\/li>\n<li>in the last will go the package found by the script.<\/li>\n<\/ul>\n<p>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:<\/p>\n<p><code># One of the following USE flag combinations is required:<br \/>\n# boost<br \/>\nsci-mathematics\/singular<\/code><\/p>\n<p>That obviously means that you need to enable boost USE to make sure that\u00a0sci-mathematics\/singular will use boost.<\/p>\n<p>&nbsp;<\/p>\n<p>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 <a href=\"https:\/\/bugs.gentoo.org\">bugzilla<\/a>\u00a0and make it as a blocker for boost stabilization.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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: Emerge the new boost version Do a multiple compile test changing the &hellip; <a href=\"https:\/\/blogs.gentoo.org\/ago\/2012\/07\/11\/how-to-test-a-library\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":140,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[4,3],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2EaBc-l","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/21"}],"collection":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/users\/140"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/comments?post=21"}],"version-history":[{"count":8,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/21\/revisions"}],"predecessor-version":[{"id":57,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/21\/revisions\/57"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/media?parent=21"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/categories?post=21"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/tags?post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}