From 624a87870164ab48bda485204d6fd49c86a0c354 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 22 Jun 2011 15:45:09 -0500 Subject: pactest: generate sync DB's in memory Sync database are no longer exploded on the filesystem. Rework the logic used to generate our test databases so we can create them completely in memory without having to write the individual files to disk at all. The local database is unaffected. Note that several shortcomings in libalpm parsing were discovered by this change, which have since been temporarily patched around in this test suite: * archive_fgets() did not properly handle a file that ended in a non-newline, and would silently drop the data in this line. * sync database with only the file entries and not the directories would fail to parse properly, and even cause segfaults in some cases. Signed-off-by: Dan McGee --- test/pacman/pmpkg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/pacman/pmpkg.py') diff --git a/test/pacman/pmpkg.py b/test/pacman/pmpkg.py index e9721310..64c4f5ef 100644 --- a/test/pacman/pmpkg.py +++ b/test/pacman/pmpkg.py @@ -190,7 +190,7 @@ class pmpkg(object): data = [] for key, value in self.install.iteritems(): if value: - data.append("%s() {\n%s\n}" % (key, value)) + data.append("%s() {\n%s\n}\n" % (key, value)) return "\n".join(data) -- cgit v1.2.3