Boost C++ Libraries: Ticket #2267: graphml_test broken https://svn.boost.org/trac10/ticket/2267 <p> Problem 1: the test can't work unless bjam is run from the test's directory. That makes it useless as part of the Boost test suite. None of your testers have libexpat installed/configured. The minimal fix: </p> <div class="wiki-code"> <div class="diff"> <ul class="entries"> <li class="entry"> <h2> <a>graphml_test.cpp</a> </h2> <table class="trac-diff inline" cellspacing="0"> <colgroup> <col class="lineno"/><col class="lineno"/><col class="content"/> </colgroup> <thead> <tr> <th title="File graphml_test.cpp (revision 48407)"> </th> <th title="File graphml_test.cpp (working copy)"> </th> <td> <em></em> &nbsp; </td> </tr> </thead> <tbody class="unmod"> <tr> <th>43</th><th>43</th><td class="l"><span>&nbsp; &nbsp; dp.property("foo",get(vertex_color_t(),g));</span></td> </tr> <tr> <th>44</th><th>44</th><td class="l"><span>&nbsp; &nbsp; dp.property("weight",get(edge_weight_t(),g));</span></td> </tr> <tr> <th>45</th><th>45</th><td class="l"><span></span></td> </tr> </tbody> <tbody class="mod"> <tr class="first"> <th>46</th><th>&nbsp;</th><td class="l"><span>&nbsp; &nbsp; ifstream ifile(<del>"graphml_test.xml"</del>);</span></td> </tr> <tr class="last"> <th>&nbsp;</th><th>46</th><td class="r"><span>&nbsp; &nbsp; ifstream ifile(<ins>&nbsp;argv[1] </ins>);</span></td> </tr> </tbody> <tbody class="unmod"> <tr> <th>47</th><th>47</th><td class="l"><span>&nbsp; &nbsp; read_graphml(ifile, g, dp);</span></td> </tr> <tr> <th>48</th><th>48</th><td class="l"><span>&nbsp; &nbsp; ifile.close();</span></td> </tr> <tr> <th>49</th><th>49</th><td class="l"><span></span></td> </tr> </tbody> </table> </li> <li class="entry"> <h2> <a>Jamfile.v2</a> </h2> <table class="trac-diff inline" cellspacing="0"> <colgroup> <col class="lineno"/><col class="lineno"/><col class="content"/> </colgroup> <thead> <tr> <th title="File Jamfile.v2 (revision 48407)"> </th> <th title="File Jamfile.v2 (working copy)"> </th> <td> <em></em> &nbsp; </td> </tr> </thead> <tbody class="unmod"> <tr> <th>17</th><th>17</th><td class="l"><span></span></td> </tr> <tr> <th>18</th><th>18</th><td class="l"><span>if [ modules.peek : EXPAT_INCLUDE ] &amp;&amp; [ modules.peek : EXPAT_LIBPATH ]</span></td> </tr> <tr> <th>19</th><th>19</th><td class="l"><span>{</span></td> </tr> </tbody> <tbody class="mod"> <tr class="first"> <th>20</th><th>&nbsp;</th><td class="l"><span>&nbsp; optional_tests += [ run graphml_test.cpp ../build//boost_graph <del></del>] ;</span></td> </tr> <tr class="last"> <th>&nbsp;</th><th>20</th><td class="r"><span>&nbsp; optional_tests += [ run graphml_test.cpp ../build//boost_graph <ins>: : "graphml_test.xml" </ins>] ;</span></td> </tr> </tbody> <tbody class="unmod"> <tr> <th>21</th><th>21</th><td class="l"><span>}</span></td> </tr> <tr> <th>22</th><th>22</th><td class="l"><span></span></td> </tr> <tr> <th>23</th><th>23</th><td class="l"><span>test-suite graph_test : </span></td> </tr> </tbody> </table> </li> </ul> </div></div><p> However note that the original code actually yields an XML parse error rather than something that indicates the real problem. I suggest setting the bit on the ifstream that tells it to throw on failure. </p> <p> Problem 2: The test still doesn't work. </p> <div class="wiki-code"><div class="code"><pre>testing.capture-output /zorak/sles/build/boost/bin.v2/libs/graph/test/graphml_test.test/gcc-4.1.0/release/graphml_test.run /bin/sh: line <span class="m">4</span>: <span class="m">4887</span> Aborted <span class="s2">&quot;/zorak/sles/build/boost/bin.v2/libs/graph/test/graphml_test.test/gcc-4.1.0/release/graphml_test&quot;</span> <span class="s2">&quot;graphml_test.xml&quot;</span> &gt;<span class="s2">&quot;/zorak/sles/build/boost/bin.v2/libs/graph/test/graphml_test.test/gcc-4.1.0/release/graphml_test.output&quot;</span> <span class="m">2</span>&gt;<span class="p">&amp;</span><span class="nv">1</span> <span class="o">======</span> BEGIN <span class="nv">OUTPUT</span> <span class="o">======</span> terminate called after throwing an instance of <span class="s1">&#39;boost::undirected_graph_error&#39;</span> what<span class="o">()</span>: read_graphviz: Tried to <span class="nb">read</span> an undirected graph into a directed graph. EXIT STATUS: <span class="nv">134</span> <span class="o">======</span> END <span class="nv">OUTPUT</span> <span class="o">======</span> <span class="nv">LD_LIBRARY_PATH</span><span class="o">=</span>/usr/bin:/usr/lib:/usr/lib32:/usr/lib64:/zorak/sles/build/boost/bin.v2/libs/graph/build/gcc-4.1.0/release:<span class="nv">$LD_LIBRARY_PATH</span> <span class="nb">export</span> LD_LIBRARY_PATH <span class="s2">&quot;/zorak/sles/build/boost/bin.v2/libs/graph/test/graphml_test.test/gcc-4.1.0/release/graphml_test&quot;</span> <span class="s2">&quot;graphml_test.xml&quot;</span> &gt; <span class="s2">&quot;/zorak/sles/build/boost/bin.v2/libs/graph/test/graphml_test.test/gcc-4.1.0/release/graphml_test.output&quot;</span> <span class="m">2</span>&gt;<span class="p">&amp;</span><span class="m">1</span> <span class="nv">status</span><span class="o">=</span><span class="nv">$?</span> <span class="nb">echo</span> &gt;&gt; <span class="s2">&quot;/zorak/sles/build/boost/bin.v2/libs/graph/test/graphml_test.test/gcc-4.1.0/release/graphml_test.output&quot;</span> <span class="nb">echo</span> EXIT STATUS: <span class="nv">$status</span> &gt;&gt; <span class="s2">&quot;/zorak/sles/build/boost/bin.v2/libs/graph/test/graphml_test.test/gcc-4.1.0/release/graphml_test.output&quot;</span> <span class="k">if</span> <span class="nb">test</span> <span class="nv">$status</span> -eq <span class="m">0</span> <span class="p">;</span> <span class="k">then</span> cp <span class="s2">&quot;/zorak/sles/build/boost/bin.v2/libs/graph/test/graphml_test.test/gcc-4.1.0/release/graphml_test.output&quot;</span> <span class="s2">&quot;/zorak/sles/build/boost/bin.v2/libs/graph/test/graphml_test.test/gcc-4.1.0/release/graphml_test.run&quot;</span> <span class="k">fi</span> <span class="nv">verbose</span><span class="o">=</span><span class="m">0</span> <span class="k">if</span> <span class="nb">test</span> <span class="nv">$status</span> -ne <span class="m">0</span> <span class="p">;</span> <span class="k">then</span> <span class="nv">verbose</span><span class="o">=</span><span class="m">1</span> <span class="k">fi</span> <span class="k">if</span> <span class="nb">test</span> <span class="nv">$verbose</span> -eq <span class="m">1</span> <span class="p">;</span> <span class="k">then</span> <span class="nb">echo</span> <span class="o">======</span> BEGIN <span class="nv">OUTPUT</span> <span class="o">======</span> cat <span class="s2">&quot;/zorak/sles/build/boost/bin.v2/libs/graph/test/graphml_test.test/gcc-4.1.0/release/graphml_test.output&quot;</span> <span class="nb">echo</span> <span class="o">======</span> END <span class="nv">OUTPUT</span> <span class="o">======</span> <span class="k">fi</span> <span class="nb">exit</span> <span class="nv">$status</span> </pre></div></div> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2267 Trac 1.4.3 Dave Abrahams Thu, 28 Aug 2008 06:56:07 GMT version, component changed; owner set https://svn.boost.org/trac10/ticket/2267#comment:1 https://svn.boost.org/trac10/ticket/2267#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Douglas Gregor</span> </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.36.0</span> → <span class="trac-field-new">Boost 1.35.0</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">graph</span> </li> </ul> <p> Problem 1 still exists in Boost 1.36; not sure about problem 2 </p> Ticket Dave Abrahams Thu, 28 Aug 2008 06:57:29 GMT description changed https://svn.boost.org/trac10/ticket/2267#comment:2 https://svn.boost.org/trac10/ticket/2267#comment:2 <ul> <li><strong>description</strong> modified (<a href="/trac10/ticket/2267?action=diff&amp;version=2">diff</a>) </li> </ul> Ticket Douglas Gregor Thu, 04 Sep 2008 19:49:51 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2267#comment:3 https://svn.boost.org/trac10/ticket/2267#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/48583" title="Make graphml_test.cpp accept the name of its input file on the command ...">[48583]</a>) Make graphml_test.cpp accept the name of its input file on the command line, Jamfile.v2 provide the input file (both thanks to Dave A), and make the input XML well-formed. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2267" title="#2267: Bugs: graphml_test broken (closed: fixed)">#2267</a>. </p> Ticket