summaryrefslogtreecommitdiffstats
path: root/test/pacman/pmpkg.py
AgeCommit message (Collapse)AuthorFilesLines
2012-03-09Point python shebangs at python2Allan McRae1-1/+1
Python PEP-394 states that all python code should point at the python2 or python3 symlinks at maintain cross-distro compatibility. Note that this does not matter when calling these scripts using "make check" as they are explictly called using the detected python version. As this only affects manually calling these scripts, I have not had configure/make replace the shebangs. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-08-18Fix trailing whitespace in whole codebaseDan McGee1-5/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-30pactest: remove no longer necessary newline hacksDan McGee1-1/+0
libalpm can now cope with this as of commit 719e0d3ddb300. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-30pactest: create packages in memoryDan McGee1-18/+39
This is similar to what was just done for the sync databases. Move a few pieces around so we never need to actually write out the filesystem to create a package, and simply stream the tarfile out from the data we've collected. Once again, a few newline addition hacks and other things have to be left in place in order not to break everything; this time however most of the assumptions are in pactest and not libalpm. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24pactest: generate sync DB's in memoryDan McGee1-1/+1
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 <dan@archlinux.org>
2011-06-24pactest: refactor install file creationDan McGee1-1/+9
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24pactest: move filelist/backup generation into package objectDan McGee1-1/+37
These are definite methods that operate on a package, so move them there which cleans up util a bit more. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24pactest: small cleanups and chmod -x most filesDan McGee1-0/+0
Remove empty docstrings, small and easy pylint fixes, etc. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24pactest: add isize attribute, fix url attributeDan McGee1-0/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-08pactest: only create install file if necessaryDan McGee1-2/+2
We were testing whether there were any values in the array, rather than looking if the values contained anything. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-20Merge branch 'maint'Dan McGee1-1/+1
Conflicts: lib/libalpm/trans.c src/pacman/query.c
2011-05-16pactest: treat symlinks with more respectDan McGee1-1/+1
Don't call os.stat() when we should be using os.lstat(); this allows us to actually test dead symlinks that don't have a corresponding file. Add a new LINK_EXIST rule that complements FILE_EXIST for a similar purpose. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-21Header inclusion cleanupDan McGee1-2/+2
This does touch a lot of things, and hopefully doesn't break things on other platforms, but allows us to also clean up a bunch of crud that no longer needs to be there. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-23Add PGP signature support to pactestDan McGee1-0/+1
Allow pkg.pgpsig to end up in the created sync databases. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22pactest: use new-style python classesDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22pactest: revamp modified logicDan McGee1-17/+0
Remove all logic dealing with PKG_MODIFIED as this rule no longer exists. This removes a bunch of unnecessary stat and checksum logic that most of the time we were never even using. Also update the file modified checks to mark every file created using mkfile() with an older time so any modified checks will just work without hacks. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22pactest: pylint changes for pmpkgDan McGee1-13/+8
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22Remove epoch as an independent fieldDan McGee1-6/+0
Instead, go the same route we have always taken with version-release in libalpm and treat it all as one piece of information. Makepkg is the only script that knows about epoch as a distinct value; from there on out we will parse out the components as necessary. This makes the code a lot simpler as far as epoch handling goes. The downside here is that we are tossing some compatibility to the wind; packages using force will have to be rebuilt with an incremented epoch to keep their special status. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-10pactest: correctly write epoch and force as necessaryDan McGee1-0/+4
We were missing this in a few places; also add the ability to check the outcome via a new rule type. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-06pactest: Use booleans where it makes senseDan McGee1-1/+1
No need to use 0/1 when we can use False/True for the force option. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-13Update pactest suite for change in db structureAllan McRae1-4/+0
Merging desc and depends files in sync and local db. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-14Add epoch support to pactestDan McGee1-2/+3
This adds epoch support to pactest, while still producing packages and database entries the same way makepkg and repo-add currently do in a backward compatible fashion (still including the 'force' option). Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-05Make testsuite python-2.7 compatibleRémy Oudompheng1-8/+2
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>
2010-06-02Move pacman test suiteAllan McRae1-0/+184
Move the test suite to test/pacman in order to make a logical location for a future makepkg test suite. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>