instructions.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
  7. <title>Running Boost Regression Tests</title>
  8. <style type="text/css">
  9. /*
  10. :Author: David Goodger
  11. :Contact: goodger@users.sourceforge.net
  12. :date: $Date$
  13. :version: $Revision$
  14. :copyright: This stylesheet has been placed in the public domain.
  15. Default cascading style sheet for the HTML output of Docutils.
  16. */
  17. body {
  18. background-color: #fffff5;
  19. }
  20. h2 {
  21. text-decoration: underline;
  22. }
  23. .first {
  24. margin-top: 0 }
  25. .last {
  26. margin-bottom: 0 }
  27. a.toc-backref {
  28. text-decoration: none ;
  29. color: black }
  30. blockquote.epigraph {
  31. margin: 2em 5em ; }
  32. dd {
  33. margin-bottom: 0.5em }
  34. div.abstract {
  35. margin: 2em 5em }
  36. div.abstract p.topic-title {
  37. font-weight: bold ;
  38. text-align: center }
  39. div.attention, div.caution, div.danger, div.error, div.hint,
  40. div.important, div.note, div.tip, div.warning, div.admonition {
  41. margin: 2em ;
  42. border: medium outset ;
  43. padding: 1em }
  44. div.attention p.admonition-title, div.caution p.admonition-title,
  45. div.danger p.admonition-title, div.error p.admonition-title,
  46. div.warning p.admonition-title {
  47. color: red ;
  48. font-weight: bold ;
  49. font-family: sans-serif }
  50. div.hint p.admonition-title, div.important p.admonition-title,
  51. div.note p.admonition-title, div.tip p.admonition-title,
  52. div.admonition p.admonition-title {
  53. font-weight: bold ;
  54. font-family: sans-serif }
  55. div.dedication {
  56. margin: 2em 5em ;
  57. text-align: center ;
  58. font-style: italic }
  59. div.dedication p.topic-title {
  60. font-weight: bold ;
  61. font-style: normal }
  62. div.figure {
  63. margin-left: 2em }
  64. div.footer, div.header {
  65. font-size: smaller }
  66. div.sidebar {
  67. margin-left: 1em ;
  68. border: medium outset ;
  69. padding: 0em 1em ;
  70. background-color: #ffffee ;
  71. width: 40% ;
  72. float: right ;
  73. clear: right }
  74. div.sidebar p.rubric {
  75. font-family: sans-serif ;
  76. font-size: medium }
  77. div.system-messages {
  78. margin: 5em }
  79. div.system-messages h1 {
  80. color: red }
  81. div.system-message {
  82. border: medium outset ;
  83. padding: 1em }
  84. div.system-message p.system-message-title {
  85. color: red ;
  86. font-weight: bold }
  87. div.topic {
  88. margin: 2em }
  89. h1.title {
  90. text-align: center }
  91. h2.subtitle {
  92. text-align: center }
  93. hr {
  94. width: 75% }
  95. ol.simple, ul.simple {
  96. margin-bottom: 1em }
  97. ol.arabic {
  98. list-style: decimal }
  99. ol.loweralpha {
  100. list-style: lower-alpha }
  101. ol.upperalpha {
  102. list-style: upper-alpha }
  103. ol.lowerroman {
  104. list-style: lower-roman }
  105. ol.upperroman {
  106. list-style: upper-roman }
  107. p.attribution {
  108. text-align: right ;
  109. margin-left: 50% }
  110. p.caption {
  111. font-style: italic }
  112. p.credits {
  113. font-style: italic ;
  114. font-size: smaller }
  115. p.label {
  116. white-space: nowrap }
  117. p.rubric {
  118. font-weight: bold ;
  119. font-size: larger ;
  120. color: maroon ;
  121. text-align: center }
  122. p.sidebar-title {
  123. font-family: sans-serif ;
  124. font-weight: bold ;
  125. font-size: larger }
  126. p.sidebar-subtitle {
  127. font-family: sans-serif ;
  128. font-weight: bold }
  129. p.topic-title {
  130. font-weight: bold }
  131. pre.address {
  132. margin-bottom: 0 ;
  133. margin-top: 0 ;
  134. font-family: serif ;
  135. font-size: 100% }
  136. pre.line-block {
  137. font-family: serif ;
  138. font-size: 100% }
  139. pre.literal-block, pre.doctest-block {
  140. margin-left: 2em ;
  141. margin-right: 2em ;
  142. background-color: #eeeeee }
  143. span.classifier {
  144. font-family: sans-serif ;
  145. font-style: oblique }
  146. span.classifier-delimiter {
  147. font-family: sans-serif ;
  148. font-weight: bold }
  149. span.interpreted {
  150. font-family: sans-serif }
  151. span.option {
  152. white-space: nowrap }
  153. span.option-argument {
  154. font-style: italic }
  155. span.pre {
  156. white-space: pre }
  157. span.problematic {
  158. color: red }
  159. table {
  160. margin-top: 0.5em ;
  161. margin-bottom: 0.5em }
  162. table.citation {
  163. border-left: solid thin gray ;
  164. padding-left: 0.5ex }
  165. table.docinfo {
  166. margin: 2em 4em }
  167. table.footnote {
  168. border-left: solid thin black ;
  169. padding-left: 0.5ex }
  170. td, th {
  171. padding-left: 0.5em ;
  172. padding-right: 0.5em ;
  173. vertical-align: top }
  174. th.docinfo-name, th.field-name {
  175. font-weight: bold ;
  176. text-align: left ;
  177. white-space: nowrap }
  178. h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
  179. font-size: 100% }
  180. tt {
  181. background-color: #eeeeee }
  182. ul.auto-toc {
  183. list-style-type: none }
  184. </style>
  185. </head>
  186. <body>
  187. <h1 class="title">Running Boost Regression Tests</h1>
  188. <div class="document" id="running-boost-regression">
  189. <div class="section" id="requirements">
  190. <h2><a name="requirements">Requirements</a></h2>
  191. <ul class="simple">
  192. <li>Python 2.3</li>
  193. </ul>
  194. <p>That's it! You don't even need a CVS client installed.</p>
  195. </div>
  196. <div class="section" id="installation">
  197. <h2><a name="installation">Installation</a></h2>
  198. <ul class="simple">
  199. <li>Download regression driver <tt class="docutils literal"><span class="pre">regression.py</span></tt> from <a class="reference" href="http://cvs.sourceforge.net/viewcvs.py/*checkout*/boost/boost/tools/regression/xsl_reports/runner/regression.py">here</a> (<a class="reference" href="http://tinyurl.com/4fp4g">http://tinyurl.com/4fp4g</a>)
  200. and put it in the directory where you want all the regression
  201. test files to be placed.</li>
  202. </ul>
  203. <ul>
  204. <li><p class="first"><strong>Optional</strong>: If you already have <tt class="docutils literal"><span class="pre">bjam</span></tt> and/or <tt class="docutils literal"><span class="pre">process_jam_log</span></tt> executables
  205. you'd like to use, just put them in the same directory with <tt class="docutils literal"><span class="pre">regression.py</span></tt>, e.g.:</p>
  206. <pre class="literal-block">
  207. my_boost_regressions/
  208. regression.py
  209. bjam<em>[.exe]</em>
  210. </pre>
  211. </li>
  212. </ul>
  213. </div>
  214. <div class="section" id="running-tests">
  215. <h2><a name="running-tests">Running tests</a></h2>
  216. <p>To start a regression run, simply run <tt class="docutils literal"><span class="pre">regression.py</span></tt> providing it with the following
  217. two arguments:</p>
  218. <ul class="simple">
  219. <li>runner id (something unique of your choice that will identify your
  220. results in the reports <a class="footnote-reference" href="#runnerid1" id="id2" name="id2">[1]</a>, <a class="footnote-reference" href="#runnerid2" id="id3" name="id3">[2]</a>)</li>
  221. <li>a particular set of toolsets you want to test with <a class="footnote-reference" href="#toolsets" id="id4" name="id4">[3]</a>.</li>
  222. </ul>
  223. <p>For example:</p>
  224. <pre class="literal-block">
  225. python regression.py --runner=Metacomm --toolsets=gcc,vc7
  226. </pre>
  227. <p>If you are interested in seeing all available options, run <tt class="docutils literal"><span class="pre">python</span> <span class="pre">regression.py</span></tt>
  228. or <tt class="docutils literal"><span class="pre">python</span> <span class="pre">regression.py</span> <span class="pre">--help</span></tt>. See also the <a class="reference" href="#advanced-use">Advanced use</a> section below.</p>
  229. <p><strong>Note</strong>: If you are behind a firewall/proxy server, everything should still &quot;just work&quot;.
  230. In the rare cases when it doesn't, you can explicitly specify the proxy server
  231. parameters through the <tt class="docutils literal"><span class="pre">--proxy</span></tt> option, e.g.:</p>
  232. <pre class="literal-block">
  233. python regression.py ... <strong>--proxy=http://www.someproxy.com:3128</strong>
  234. </pre>
  235. </div>
  236. <div class="section" id="details">
  237. <h2><a name="details">Details</a></h2>
  238. <p>The regression run procedure will:</p>
  239. <ul class="simple">
  240. <li>Download the most recent tarball from <a class="reference" href="http://www.meta-comm.com/engineering/boost/snapshot/">http://www.meta-comm.com/engineering/boost/snapshot/</a>,
  241. unpack it in the subdirectory <tt class="docutils literal"><span class="pre">boost</span></tt>.</li>
  242. <li>Build <tt class="docutils literal"><span class="pre">bjam</span></tt> and <tt class="docutils literal"><span class="pre">process_jam_log</span></tt> if needed. (<tt class="docutils literal"><span class="pre">process_jam_log</span></tt> is an
  243. utility, which extracts the test results from the log file produced by
  244. Boost.Build).</li>
  245. <li>Run regression tests, process and collect the results.</li>
  246. <li>Upload the results to <a class="reference" href="ftp://fx.meta-comm.com/boost-regression">ftp://fx.meta-comm.com/boost-regression</a>.</li>
  247. </ul>
  248. <p>The report merger process running on MetaCommunications site every 2 hours will
  249. merge all submitted test runs and publish them at
  250. <a class="reference" href="http://boost.sourceforge.net/regression-logs/developer">http://boost.sourceforge.net/regression-logs/developer</a>.</p>
  251. </div>
  252. <div class="section" id="advanced-use">
  253. <h2><a name="advanced-use">Advanced use</a></h2>
  254. <div class="section" id="incremental-runs">
  255. <h3><a name="incremental-runs">Incremental runs</a></h3>
  256. <p>You can run <tt class="docutils literal"><span class="pre">regression.py</span></tt> in incremental mode <a class="footnote-reference" href="#incremental" id="id5" name="id5">[4]</a> by simply passing
  257. it an identically named command-line flag:</p>
  258. <pre class="literal-block">
  259. python regression.py ... <strong>--incremental</strong>
  260. </pre>
  261. </div>
  262. <div class="section" id="dealing-with-misbehaved">
  263. <h3><a name="dealing-with-misbehaved">Dealing with misbehaved tests/compilers</a></h3>
  264. <p>Depending on the environment/C++ runtime support library the test is compiled with,
  265. a test failure/termination may cause an appearance of a dialog window, requiring
  266. human intervention to proceed. Moreover, the test (or even of the compiler itself)
  267. can fall into infinite loop, or simply run for too long. To allow <tt class="docutils literal"><span class="pre">regression.py</span></tt>
  268. to take care of these obstacles, add the <tt class="docutils literal"><span class="pre">--monitored</span></tt> flag to the script
  269. invocation:</p>
  270. <pre class="literal-block">
  271. python regression.py ... <strong>--monitored</strong>
  272. </pre>
  273. <p>That's it. Knowing your intentions, the script will be able to automatically deal
  274. with the listed issues <a class="footnote-reference" href="#monitored" id="id6" name="id6">[5]</a>.</p>
  275. </div>
  276. <div class="section" id="getting-sources-from-cvs">
  277. <h3><a name="getting-sources-from-cvs">Getting sources from CVS</a></h3>
  278. <p>If you already have a CVS client installed and configured, you might prefer to get
  279. the sources directly from the Boost CVS repository. To communicate this to the
  280. script, you just need to pass it your SourceForge user ID using the <tt class="docutils literal"><span class="pre">--user</span></tt>
  281. option; for instance:</p>
  282. <pre class="literal-block">
  283. python regression.py ... <strong>--user=agurtovoy</strong>
  284. </pre>
  285. <p>You can also specify the user as <tt class="docutils literal"><span class="pre">anonymous</span></tt>, requesting anonymous CVS access.
  286. Note, though, that the files obtained this way tend to lag behind the actual CVS
  287. state by several hours, sometimes up to twelve. By contrast, the tarball the script
  288. downloads by default is at most one hour behind.</p>
  289. </div>
  290. <div class="section" id="integration-with-a-custom">
  291. <h3><a name="integration-with-a-custom">Integration with a custom driver script</a></h3>
  292. <p>Even if you've already been using a custom driver script, and for some
  293. reason you don't want <tt class="docutils literal"><span class="pre">regression.py</span></tt> to take over of the entire test cycle,
  294. getting your regression results into <a class="reference" href="http://www.boost.org/regression-logs/developer/">Boost-wide reports</a> is still easy!</p>
  295. <p>In fact, it's just a matter of modifying your script to perform two straightforward
  296. operations:</p>
  297. <ol class="arabic">
  298. <li><p class="first"><em>Timestamp file creation</em> needs to be done before the CVS update/checkout.
  299. The file's location doesn't matter (nor does the content), as long as you know how
  300. to access it later. Making your script to do something as simple as
  301. <tt class="docutils literal"><span class="pre">echo</span> <span class="pre">&gt;timestamp</span></tt> would work just fine.</p>
  302. </li>
  303. <li><p class="first"><em>Collecting and uploading logs</em> can be done any time after <tt class="docutils literal"><span class="pre">process_jam_log</span></tt>' s
  304. run, and is as simple as an invocation of the local copy of
  305. <tt class="docutils literal"><span class="pre">$BOOST_ROOT/tools/regression/xsl_reports/runner/collect_and_upload_logs.py</span></tt>
  306. script that was just obtained from the CVS with the rest of the sources.
  307. You'd need to provide <tt class="docutils literal"><span class="pre">collect_and_upload_logs.py</span></tt> with the following three
  308. arguments:</p>
  309. <pre class="literal-block">
  310. --locate-root directory to to scan for &quot;test_log.xml&quot; files
  311. --runner runner ID (e.g. &quot;Metacomm&quot;)
  312. --timestamp path to a file which modification time will be used
  313. as a timestamp of the run (&quot;timestamp&quot; by default)
  314. </pre>
  315. <p>For example, assuming that the run's resulting binaries are in the
  316. <tt class="docutils literal"><span class="pre">$BOOST_ROOT/bin</span></tt> directory (the default Boost.Build setup), the
  317. <tt class="docutils literal"><span class="pre">collect_and_upload_logs.py</span></tt> invocation might look like this:</p>
  318. <pre class="literal-block">
  319. python $BOOST_ROOT/tools/regression/xsl_reports/runner/collect_and_upload_logs.py
  320. --locate-root=$BOOST_ROOT/bin
  321. --runner=Metacomm
  322. --timestamp=timestamp
  323. </pre>
  324. </li>
  325. </ol>
  326. </div>
  327. </div>
  328. <div class="section" id="feedback">
  329. <h2><a name="feedback">Feedback</a></h2>
  330. <p>Please send all comments/suggestions regarding this document and the testing procedure
  331. itself to the <a class="reference" href="http://lists.boost.org/mailman/listinfo.cgi/boost-testing">Boost Testing list</a>.</p>
  332. </div>
  333. <div class="section" id="notes">
  334. <h2><a name="notes">Notes</a></h2>
  335. <table class="docutils footnote" frame="void" id="runnerid1" rules="none">
  336. <colgroup><col class="label" /><col /></colgroup>
  337. <tbody valign="top">
  338. <tr><td class="label"><a class="fn-backref" href="#id2" name="runnerid1">[1]</a></td><td>If you are running regressions interlacingly with a different
  339. set of compilers (e.g. for Intel in the morning and GCC at the end of the day), you need
  340. to provide a <em>different</em> runner id for each of these runs, e.g. <tt class="docutils literal"><span class="pre">your_name-intel</span></tt>, and
  341. <tt class="docutils literal"><span class="pre">your_name-gcc</span></tt>.</td></tr>
  342. </tbody>
  343. </table>
  344. <table class="docutils footnote" frame="void" id="runnerid2" rules="none">
  345. <colgroup><col class="label" /><col /></colgroup>
  346. <tbody valign="top">
  347. <tr><td class="label"><a class="fn-backref" href="#id3" name="runnerid2">[2]</a></td><td>The limitations of the reports' format/medium impose a direct dependency
  348. between the number of compilers you are testing with and the amount of space available
  349. for your runner id. If you are running regressions for a single compiler, please make
  350. sure to choose a short enough id that does not significantly disturb the reports' layout.</td></tr>
  351. </tbody>
  352. </table>
  353. <table class="docutils footnote" frame="void" id="toolsets" rules="none">
  354. <colgroup><col class="label" /><col /></colgroup>
  355. <tbody valign="top">
  356. <tr><td class="label"><a class="fn-backref" href="#id4" name="toolsets">[3]</a></td><td>If <tt class="docutils literal"><span class="pre">--toolsets</span></tt> option is not provided, the script will try to use the
  357. platform's default toolset (<tt class="docutils literal"><span class="pre">gcc</span></tt> for most Unix-based systems).</td></tr>
  358. </tbody>
  359. </table>
  360. <table class="docutils footnote" frame="void" id="incremental" rules="none">
  361. <colgroup><col class="label" /><col /></colgroup>
  362. <tbody valign="top">
  363. <tr><td class="label"><a class="fn-backref" href="#id5" name="incremental">[4]</a></td><td><p class="first">By default, the script runs in what is known as <em>full mode</em>: on
  364. each <tt class="docutils literal"><span class="pre">regression.py</span></tt> invocation all the files that were left in place by the
  365. previous run -- including the binaries for the successfully built tests and libraries
  366. -- are deleted, and everything is rebuilt once again from scratch. By contrast, in
  367. <em>incremental mode</em> the already existing binaries are left intact, and only the
  368. tests and libraries which source files has changed since the previous run are
  369. re-built and re-tested.</p>
  370. <p>The main advantage of incremental runs is a significantly shorter turnaround time,
  371. but unfortunately they don't always produce reliable results. Some type of changes
  372. to the codebase (changes to the bjam testing subsystem in particular)
  373. often require switching to a full mode for one cycle in order to produce
  374. trustworthy reports.</p>
  375. <p class="last">As a general guideline, if you can afford it, testing in full mode is preferable.</p>
  376. </td></tr>
  377. </tbody>
  378. </table>
  379. <table class="docutils footnote" frame="void" id="monitored" rules="none">
  380. <colgroup><col class="label" /><col /></colgroup>
  381. <tbody valign="top">
  382. <tr><td class="label"><a class="fn-backref" href="#id6" name="monitored">[5]</a></td><td>Note that at the moment this functionality is available only if you
  383. are running on a Windows platform. Contributions are welcome!</td></tr>
  384. </tbody>
  385. </table>
  386. </div>
  387. </div>
  388. <hr class="docutils footer" />
  389. <div class="footer">
  390. <a class="reference" href="instructions.rst">View document source</a>.
  391. Generated on: 2005-01-07 14:24 UTC.
  392. Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
  393. </div>
  394. </body>
  395. </html>
粤ICP备19079148号