diff options
Diffstat (limited to 'pym/portage/tests/dbapi/test_portdb_cache.py')
-rw-r--r-- | pym/portage/tests/dbapi/test_portdb_cache.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pym/portage/tests/dbapi/test_portdb_cache.py b/pym/portage/tests/dbapi/test_portdb_cache.py index e6d2ba7c9..4a0129b3e 100644 --- a/pym/portage/tests/dbapi/test_portdb_cache.py +++ b/pym/portage/tests/dbapi/test_portdb_cache.py @@ -96,6 +96,21 @@ class PortdbCacheTestCase(TestCase): if not isinstance(portage.portdb._pregen_auxdb[portage.portdb.porttree_root], pms_database): sys.exit(1) """),), + + # Test auto-detection and preference for md5-cache when both + # cache formats are available but layout.conf is absent. + (BASH_BINARY, "-c", "rm %s" % portage._shell_quote(layout_conf_path)), + python_cmd + (textwrap.dedent(""" + import os, sys, portage + if portage.portdb.porttree_root not in portage.portdb._pregen_auxdb: + sys.exit(1) + """),), + python_cmd + (textwrap.dedent(""" + import os, sys, portage + from portage.cache.flat_hash import md5_database + if not isinstance(portage.portdb._pregen_auxdb[portage.portdb.porttree_root], md5_database): + sys.exit(1) + """),), ) features = [] |