{"id":30,"date":"2011-05-22T08:53:25","date_gmt":"2011-05-22T06:53:25","guid":{"rendered":"https:\/\/blogs.gentoo.org\/mgorny\/?p=30"},"modified":"2011-05-22T09:36:46","modified_gmt":"2011-05-22T07:36:46","slug":"pms-test-suite-the-project-design","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/mgorny\/2011\/05\/22\/pms-test-suite-the-project-design\/","title":{"rendered":"PMS Test Suite: the project design"},"content":{"rendered":"<p>As the GSoC coding period starts tomorrow, today seems like the last good day to write a little about the project design. For that reason, I created a little diagram in dia:<\/p>\n<p><a href=\"http:\/\/blogs.gentoo.org\/mgorny\/files\/2011\/05\/pms-test-suite-design.png\"><img loading=\"lazy\" src=\"http:\/\/blogs.gentoo.org\/mgorny\/files\/2011\/05\/pms-test-suite-design-300x169.png\" alt=\"PMS Test Suite design diagram\" width=\"300\" height=\"169\" class=\"alignnone size-medium wp-image-33\" srcset=\"https:\/\/blogs.gentoo.org\/mgorny\/files\/2011\/05\/pms-test-suite-design-300x169.png 300w, https:\/\/blogs.gentoo.org\/mgorny\/files\/2011\/05\/pms-test-suite-design.png 855w\" sizes=\"(max-width: 300px) 85vw, 300px\" \/><\/a><\/p>\n<p>As you can see there, the project code is currently broken down into three repositories. The main code repository, called <code>pms-test-suite.git<\/code> is going to hold the core project code \u2014 main scripts, library-handling Python modules and so on. The <code>pms-test-suite-library.git<\/code> repository is going to contain the bundled test library, and <code>pms-test-suite-overlay.git<\/code> holds temporary test ebuilds and the eclass.<\/p>\n<p>Looking from the left hand side, you can see a greyed out part with the <code>test-generator<\/code> script in the middle of it.\tThis module is not a part of GSoC design goals but a possible future guideline. It is supposed to read the human-readable definitions from the <a rel=\"external\" href=\"http:\/\/www.gentoo.org\/proj\/en\/qa\/pms.xml\">Package Manager Specification<\/a>, match them with helper data and create a complete test library. However, right now the project will simple use a bundled test library.<\/p>\n<p>The test library will consist of modules describing various tests for PMS compliance. Each of these modules, called a test case will provide at least the following information:<\/p>\n<ol>\n<li>A human-readable test description (which will be reused in program output and ebuild <code>DESCRIPTION<\/code>s,<\/li>\n<li>a list of relevant <code>EAPI<\/code>s for which ebuilds will be generated,<\/li>\n<li>definitions of ebuild-specific variables and phase functions necessary to perform the test,<\/li>\n<li>a test result checking function, possibly EAPI-conditional.<\/li>\n<\/ol>\n<p>Those test cases will be reused by two other PMS Test Suite scripts. The <code>ebuild-generator<\/code> module will use them to generate the ebuilds resembling the particular tests, and the <code>test-runner<\/code> module will use them to check the test results.<\/p>\n<p>The <code>test-runner<\/code> script will perform the most important task of testing a particular Package Manager. It is supposed to match the test cases with generated ebuilds (or even call <code>ebuild-generator<\/code> internally), run the Package Manager on them and collect the results. The results will be used then to determine whether the test case succeeded, failed or its result is ambiguous.<\/p>\n<p>The test ebuilds will use an PM-independent method of exchanging information with the <code>test-runner<\/code> module. The internal details of this communication will be handled in the <code>pms-test.eclass<\/code>. Right now, this code uses <a rel=\"external\" href=\"http:\/\/www.freedesktop.org\/wiki\/Software\/dbus\">D-Bus<\/a> for this task.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As the GSoC coding period starts tomorrow, today seems like the last good day to write a little about the project design. For that reason, I created a little diagram in dia: As you can see there, the project code is currently broken down into three repositories. The main code repository, called pms-test-suite.git is going &hellip; <a href=\"https:\/\/blogs.gentoo.org\/mgorny\/2011\/05\/22\/pms-test-suite-the-project-design\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;PMS Test Suite: the project design&#8221;<\/span><\/a><\/p>\n","protected":false},"author":137,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[4],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/posts\/30"}],"collection":[{"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/users\/137"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/comments?post=30"}],"version-history":[{"count":13,"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":44,"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/posts\/30\/revisions\/44"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/media?parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/categories?post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/mgorny\/wp-json\/wp\/v2\/tags?post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}