|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53825 - trunk/libs/graph/test
From: jewillco_at_[hidden]
Date: 2009-06-12 10:43:44
Author: jewillco
Date: 2009-06-12 10:43:41 EDT (Fri, 12 Jun 2009)
New Revision: 53825
URL: http://svn.boost.org/trac/boost/changeset/53825
Log:
Made random graph test size configurable and reduced the regression test size to avoid timeout errors on slow machines; refs #3134
Text files modified:
trunk/libs/graph/test/Jamfile.v2 | 2 +-
trunk/libs/graph/test/betweenness_centrality_test.cpp | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)
Modified: trunk/libs/graph/test/Jamfile.v2
==============================================================================
--- trunk/libs/graph/test/Jamfile.v2 (original)
+++ trunk/libs/graph/test/Jamfile.v2 2009-06-12 10:43:41 EDT (Fri, 12 Jun 2009)
@@ -41,7 +41,7 @@
[ run bfs.cpp ../../test/build//boost_test_exec_monitor ]
[ compile bfs_cc.cpp ]
[ run bellman-test.cpp ]
- [ run betweenness_centrality_test.cpp ]
+ [ run betweenness_centrality_test.cpp : 100 ]
[ run bidir_remove_edge.cpp ]
[ run csr_graph_test.cpp : : : : : <variant>release ]
[ run dag_longest_paths.cpp ]
Modified: trunk/libs/graph/test/betweenness_centrality_test.cpp
==============================================================================
--- trunk/libs/graph/test/betweenness_centrality_test.cpp (original)
+++ trunk/libs/graph/test/betweenness_centrality_test.cpp 2009-06-12 10:43:41 EDT (Fri, 12 Jun 2009)
@@ -16,6 +16,7 @@
#include <boost/test/minimal.hpp>
#include <boost/random/uniform_01.hpp>
#include <boost/random/linear_congruential.hpp>
+#include <boost/lexical_cast.hpp>
using namespace boost;
@@ -440,8 +441,10 @@
}
}
-int test_main(int, char*[])
+int test_main(int argc, char* argv[])
{
+ int random_test_num_vertices = 300;
+ if (argc >= 2) random_test_num_vertices = boost::lexical_cast<int>(argv[1]);
typedef adjacency_list<listS, listS, undirectedS,
property<vertex_index_t, int>, EdgeProperties>
Graph;
@@ -512,7 +515,7 @@
run_wheel_test((Graph*)0, 15);
- random_unweighted_test((Graph*)0, 300);
+ random_unweighted_test((Graph*)0, random_test_num_vertices);
return 0;
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk