[Aptitude-svn-commit] r3954 - in branches/aptitude-0.3/aptitude: .
tests
Daniel Burrows
dburrows at costa.debian.org
Thu Aug 25 22:00:37 UTC 2005
Author: dburrows
Date: Thu Aug 25 22:00:34 2005
New Revision: 3954
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/tests/test_apt_universe.cc
Log:
Place an arbitrary limit on testSolves().
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Thu Aug 25 22:00:34 2005
@@ -1,5 +1,10 @@
2005-08-25 Daniel Burrows <dburrows at debian.org>
+ * tests/test_apt_universe.cc:
+
+ Arbitrarily limit testSolves() so that it terminates in a
+ reasonable amount of time.
+
* src/generic/aptitude_resolver_universe.cc:
Further fix handling of conflicts-through-provides in
Modified: branches/aptitude-0.3/aptitude/tests/test_apt_universe.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/tests/test_apt_universe.cc (original)
+++ branches/aptitude-0.3/aptitude/tests/test_apt_universe.cc Thu Aug 25 22:00:34 2005
@@ -59,6 +59,12 @@
* dependency solver graph, and incidentally (just to be anal) test
* that solvers appear exactly once in the global versions list and
* that each solver appears there.
+ *
+ * NB: so that this test terminates before the end of the
+ * millenium, I placed a limit on the number of dependencies to
+ * check. This limit is high enough that it should test a pretty
+ * good swathe of the dependency set; nonetheless, it is far from a
+ * guarantee that all is well in the (current) universe.
*/
void testSolves()
{
@@ -66,8 +72,10 @@
aptitude_universe u(*apt_cache_file);
+ int dep_count = 1000;
+
for(aptitude_universe::dep_iterator di = u.deps_begin();
- !di.end(); ++di)
+ !di.end() && dep_count > 0; ++di, --dep_count)
{
aptitude_universe::dep d = *di;
std::set<aptitude_universe::version> solvers;
More information about the Aptitude-svn-commit
mailing list