summaryrefslogtreecommitdiff
path: root/test/pacman/util.py
AgeCommit message (Collapse)Author
2012-03-08Point python shebangs at python2Allan McRae
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-09-01pactest: remove PACMAN_OUTPUT from ldconfig testsDan McGee
This removes the last usages of this rule that aren't explicitly looking at real output from pacman. Notably, these tests depended on one particular debug logger not ever being changed, which is too fragile, not to mention doesn't work at all with --nolog. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-17Fix trailing whitespace in whole codebaseDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-02Implement parsing of the new SigLevel directiveDan McGee
Add code to conf.c that parses the new SigLevel directive. An overwhelming number of options are presented, but most users will still be fine with the Never/Optional/Required trio. More advanced users can combine these or any of the other options on a 'SigLevel = ' line, which is parsed in a left-to-right fashion and flags turned on and off accordingly. For example, all three of these will net the same config: SigLevel = Required PackageOptional SigLevel = Optional DatabaseRequired SigLevel = DatabaseRequired PackageOptional Additionally, database-specific lines assume you wish to start with any global default that has been set. For example, if any of the above lines were in the [options] section, something such as: SigLevel = PackageRequired PackageAllowMarginal Would continue to enforce required database signatures. Inspiration-by: Kerrick Staley <mail@kerrickstaley.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-30pactest: create packages in memoryDan McGee
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: refactor install file creationDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24pactest: move filelist/backup generation into package objectDan McGee
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: make pmfile a bit more pythonicDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24pactest: small cleanups and chmod -x most filesDan McGee
Remove empty docstrings, small and easy pylint fixes, etc. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-19Merge branch 'maint'Dan McGee
Conflicts: lib/libalpm/trans.c src/pacman/query.c
2011-05-16pactest: treat symlinks with more respectDan McGee
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-03-23Added gpg verification options per repo to the config file.Xavier Chantry
Once we do this, add support for VerifySig to pactest. We just check if the repo name contains Always, Never or Optional to determine the value of VerifySig. The default is Never. pacman uses Always by default but this is not suitable for pactest. Original-work-by: shankar <jatheendra@gmail.com> Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-01pactest: use actual regexes in OUTPUT rulesDan McGee
I managed to just make deptest001.py fail by changing a DEBUG-level logger in commit b12be99c89. This should not be this fickle. Enhance the OUTPUT rule to use an actual Python re object when looking for matches, and make a lot of the rules use stronger patterns to match with. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22pactest: sort repos by alpha order in config fileDan McGee
The order was non-deterministic before, and just happened to work for sync023.py as it was written. Ensure there is some sort of predictable ordering. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22pactest: pylint changes for utilDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22pactest: pylint changes for pmruleDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-05pactest: remove dead functionDan McGee
Stopped being used after commit fa933df65b9. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-13Add epoch support to pactestDan McGee
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-11pactest: fix gensyncXavier Chantry
gensync generated a sync.db file with PKGINFO syntax, this is not quite what pacman expects. Also the file was only added to the Server path: root/var/pub/sync/sync.db but it was not available in the normal sync db path: root/var/lib/pacman/sync/sync.db Change gensync() to generate var/lib/pacman/sync/sync.db and then copy it to var/pub/sync/sync.db (this is used by sync200 -Sy test). Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-07Remove DBEXT usageAllan McRae
With commit 5dffef78, the repo database always has a symlink of the form reponame.db. Use that filename and let libarchive determine the compression type. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-02Move pacman test suiteAllan McRae
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>