summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRémy Oudompheng <remyoudompheng@gmail.com>2010-09-28 04:16:25 +0200
committerDan McGee <dan@archlinux.org>2010-10-05 18:14:24 +0200
commit302188b1690e68333a3768f2a6d261559e81ca0a (patch)
tree12c76457a2667d24341385efe43f67be266f2527 /test
parentfd38319106789e2239d2d31208e463aad8e11a8e (diff)
downloadpacman-302188b1690e68333a3768f2a6d261559e81ca0a.tar.gz
pacman-302188b1690e68333a3768f2a6d261559e81ca0a.tar.xz
Make testsuite python-2.7 compatible
os.walk(".") adds a prefix of "./" to filenames in python-2.7 which causes libalpm not to like archives generated in the testsuite resulting in widespread failure. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'test')
-rwxr-xr-xtest/pacman/pmpkg.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/test/pacman/pmpkg.py b/test/pacman/pmpkg.py
index 48d79a35..1d55175e 100755
--- a/test/pacman/pmpkg.py
+++ b/test/pacman/pmpkg.py
@@ -164,14 +164,8 @@ class pmpkg:
# Generate package archive
tar = tarfile.open(self.path, "w:gz")
-
- # package files
- for root, dirs, files in os.walk('.'):
- for d in dirs:
- tar.add(os.path.join(root, d), recursive=False)
- for f in files:
- tar.add(os.path.join(root, f))
-
+ for i in os.listdir("."):
+ tar.add(i)
tar.close()
os.chdir(curdir)