Opened 14 years ago

Last modified 14 years ago

#2267 closed Bugs

graphml_test broken — at Initial Version

Reported by: Dave Abrahams Owned by:
Milestone: Boost 1.37.0 Component: graph
Version: Boost 1.35.0 Severity: Problem
Keywords: Cc:

Description

Problem 1: the test can't work unless bjam is run from the test's directory. The minimal fix:

  • graphml_test.cpp

     
    4343    dp.property("foo",get(vertex_color_t(),g));
    4444    dp.property("weight",get(edge_weight_t(),g));
    4545
    46     ifstream ifile("graphml_test.xml");
     46    ifstream ifile( argv[1] );
    4747    read_graphml(ifile, g, dp);
    4848    ifile.close();
    4949
  • Jamfile.v2

     
    1717
    1818if [ modules.peek : EXPAT_INCLUDE ] && [ modules.peek : EXPAT_LIBPATH ]
    1919{
    20   optional_tests += [ run graphml_test.cpp ../build//boost_graph ] ;
     20  optional_tests += [ run graphml_test.cpp ../build//boost_graph : : "graphml_test.xml" ] ;
    2121}
    2222
    2323test-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 (0)

Note: See TracTickets for help on using tickets.