| 80 | | This is a real-life example that resulted in a long [http://thread.gmane.org/gmane.comp.lib.boost.testing/4202/focus=4266 thread] on the boost-testing mailing list, and was finally resolved only through an intensive back-and-forth over IRC. I should add that it was this difficult to debug ''despite the fact that I had already written most of this proposal''; I just failed to recognize this as a manifestation of the same problem. |
| 81 | | |
| | 80 | This is a real-life example that resulted in a long [http://thread.gmane.org/gmane.comp.lib.boost.testing/4202/focus=4266 thread] on the boost-testing mailing list, and was finally resolved only through an intensive back-and-forth with Martin over IRC. I should add that it was this difficult to debug ''despite the fact that I had already written most of this proposal''; I just failed to recognize this as a manifestation of the same problem. |
| | 81 | |
| | 82 | Martin's test-config.jam file is shown at the bottom of http://thread.gmane.org/gmane.comp.lib.boost.testing/4202/focus=4271. The crucial fragment is: |
| | 83 | |
| | 84 | {{{ |
| | 85 | using python : 2.3 : /usr : : ; |
| | 86 | ... |
| | 87 | using gcc : 3.4.5_linux : /usr/local/gcc-3.4.5/bin/g++wrap --limit-memory=600 --limit-cpu=1800 : <root>/usr/local/gcc-3.4.5 <debug-symbols>off ; |
| | 88 | using python : 2.4 : /usr/local/python/2.4/gcc-3.4.4 : : : <toolset>gcc <toolset-gcc:version>3.4.5_linux ; |
| | 89 | }}} |
| | 90 | |
| | 91 | Here, Martin conifigures python 2.3 as the default, and then configures a specific build of python 2.4 to be used with gcc-3.4.5_linux. Then he runs his tests, in the simplest case, with: |
| | 92 | |
| | 93 | {{{ |
| | 94 | bjam gcc-3.4.5_linux |
| | 95 | }}} |
| | 96 | |
| | 97 | and the system uses the wrong python (2.3) to build and run these tests. To understand the reasons, you must know that |
| | 98 | |
| | 99 | {{{using python : }}} ''version'' {{{ : ... : : : }}} ''condition'' {{{;}}} |
| | 100 | |
| | 101 | ends up declaring a python library with the following requirements: |
| | 102 | |
| | 103 | ''condition'' {{{<python>}}}''version'' |
| | 104 | |
| | 105 | As a result of the first {{{using python}}}... invocation, the default value of {{{<python>}}} is "{{{2.3}}}". Since "{{{python=}}}..." was not given explicitly in the build request, the current semantics add the default value to the request and thus fail to match the intended python installation. In fact, to test with multiple toolsets and their intended versions of Python, Martin has to invoke {{{bjam}}} as follows: |
| | 106 | |
| | 107 | {{{bjam gcc-3.3.6_linux gcc-3.4.5_linux/python=2.4 gcc-4.0.2_linux/python=2.4}}} ''etc...'' |
| | 108 | |
| | 109 | This is not only inconvenient, but counterintuitive and uses a syntax that is not widely known (is it even documented?) |
| | 110 | |