Opened 14 years ago
Closed 14 years ago
#2267 closed Bugs (fixed)
graphml_test broken
Reported by: | Dave Abrahams | Owned by: | Douglas Gregor |
---|---|---|---|
Milestone: | Boost 1.37.0 | Component: | graph |
Version: | Boost 1.35.0 | Severity: | Problem |
Keywords: | Cc: |
Description (last modified by )
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:
-
graphml_test.cpp
43 43 dp.property("foo",get(vertex_color_t(),g)); 44 44 dp.property("weight",get(edge_weight_t(),g)); 45 45 46 ifstream ifile( "graphml_test.xml");46 ifstream ifile( argv[1] ); 47 47 read_graphml(ifile, g, dp); 48 48 ifile.close(); 49 49 -
Jamfile.v2
17 17 18 18 if [ modules.peek : EXPAT_INCLUDE ] && [ modules.peek : EXPAT_LIBPATH ] 19 19 { 20 optional_tests += [ run graphml_test.cpp ../build//boost_graph ] ;20 optional_tests += [ run graphml_test.cpp ../build//boost_graph : : "graphml_test.xml" ] ; 21 21 } 22 22 23 23 test-suite graph_test :
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.
Problem 2: The test still doesn't work.
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 4: 4887 Aborted "/zorak/sles/build/boost/bin.v2/libs/graph/test/graphml_test.test/gcc-4.1.0/release/graphml_test" "graphml_test.xml" >"/zorak/sles/build/boost/bin.v2/libs/graph/test/graphml_test.test/gcc-4.1.0/release/graphml_test.output" 2>&1 ====== BEGIN OUTPUT ====== terminate called after throwing an instance of 'boost::undirected_graph_error' what(): read_graphviz: Tried to read an undirected graph into a directed graph. EXIT STATUS: 134 ====== END OUTPUT ====== LD_LIBRARY_PATH=/usr/bin:/usr/lib:/usr/lib32:/usr/lib64:/zorak/sles/build/boost/bin.v2/libs/graph/build/gcc-4.1.0/release:$LD_LIBRARY_PATH export LD_LIBRARY_PATH "/zorak/sles/build/boost/bin.v2/libs/graph/test/graphml_test.test/gcc-4.1.0/release/graphml_test" "graphml_test.xml" > "/zorak/sles/build/boost/bin.v2/libs/graph/test/graphml_test.test/gcc-4.1.0/release/graphml_test.output" 2>&1 status=$? echo >> "/zorak/sles/build/boost/bin.v2/libs/graph/test/graphml_test.test/gcc-4.1.0/release/graphml_test.output" echo EXIT STATUS: $status >> "/zorak/sles/build/boost/bin.v2/libs/graph/test/graphml_test.test/gcc-4.1.0/release/graphml_test.output" if test $status -eq 0 ; then cp "/zorak/sles/build/boost/bin.v2/libs/graph/test/graphml_test.test/gcc-4.1.0/release/graphml_test.output" "/zorak/sles/build/boost/bin.v2/libs/graph/test/graphml_test.test/gcc-4.1.0/release/graphml_test.run" fi verbose=0 if test $status -ne 0 ; then verbose=1 fi if test $verbose -eq 1 ; then echo ====== BEGIN OUTPUT ====== cat "/zorak/sles/build/boost/bin.v2/libs/graph/test/graphml_test.test/gcc-4.1.0/release/graphml_test.output" echo ====== END OUTPUT ====== fi exit $status
Change History (3)
comment:1 by , 14 years ago
Component: | None → graph |
---|---|
Owner: | set to |
Version: | Boost 1.36.0 → Boost 1.35.0 |
comment:2 by , 14 years ago
Description: | modified (diff) |
---|
comment:3 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Problem 1 still exists in Boost 1.36; not sure about problem 2