summaryrefslogtreecommitdiff
path: root/pactest/util.py
AgeCommit message (Collapse)Author
2010-05-17Add some machinery to test the Include directiveDan McGee
After the previous patch that re-enabled its use outside of sync repository sections which we had unintentionally disabled. Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-23Update pactest to use hashlibDan McGee
The md5 module is deprecated in favor of hashlib. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-24pactest: exit with a non-zero error code on unexpected failureDan McGee
This will allow the return code of pactest to be useful, for such things as use in a git-bisect test script. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-04-28Update pactest to allow setting modes on created filesDan McGee
This should allow some future tests to set modes and ensure they are set after installation. It is also in anticipation of a test for checking permissions on pacnew files. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-17Drop case insensitive comparisons in the config parsing.Chantry Xavier
These case insensitive comparisons didn't work in some locales, like tr_TR where upper(i) != I. So a second case sensitive comparison had to be made for each directive. Only keeping case sensitive comparisons make the code cleaner and treat all locales equally. Ref: http://www.archlinux.org/pipermail/pacman-dev/2008-March/011445.html Also fix pactests to use the correct case. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-07pactest: make more resiliant to missing filesDan McGee
Add a bunch of guards around function calls like open() and stat() to ensure we are not going to get ourselves a python error. This made implementing and testing the new upgrade045 pactest much easier, as its whole purpose was to create a dead symlink and debug a segfault of pacman (which caused no DB entries to be written) to support the previously checked in fix for FS#9235 (commit 0c2206f542ce6df2606586d43f190cd5a423fb13). Both of these cases are now non-fatal in pactest. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-06bugfix in pactest when creating a symlink at the top level.Chantry Xavier
Trying to make a symlink at the top level previously made pactest fail. For example : "test -> test2/" as a file in a package. The path to the test symlink was empty in this case, but the python code still tried to chdir in "", which failed. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-12-10Add "which" path searching functionality to pactestAaron Griffin
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-12-10Update GNU GPL boilerplate and copyright datesDan McGee
Update the GPL boilerplate to direct people to the GNU website for a copy of the license, as well as bump all of Judd's copyrights to 2007. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04Added optdepends support to pactestJeff Mickey
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-27Remove lockfile configuration from frontend, make it job of libalpmDan McGee
I previously introduced some patches to make just about every path in pacman/libalpm configurable; doing this with the lockfile seemed a bit too far and we really should just place the lockfile where it belongs- with the DB that needs locking. More details in this thread: http://archlinux.org/pipermail/pacman-dev/2007-June/008499.html Signed-off-by: Dan McGee <dan@archlinux.org>
2007-05-31Move DB and cache dirs away from there dependence on ROOTDIRDan McGee
This change allows us to use all autoconf specified paths, most notably $(localstatedir). It is quite a change and touches a lot of files, as all references to the DB and cache were done with the ROOTDIR as a prefix. * add --lock command-line option to pacman to specify the location of the lockfile (this can now be specified at configure time by setting the $localstatedir path). * Rip quite a few settings out of configure.ac as they are now picked by setting the paths during configure or make. * Fix bug with /tmp fallback for sync downloads not working correctly (related to root location, now the system tmp dir is used). * Simplified the parameters to some libalpm functions, and added get/set for the new lockfile option. * Renamed several of the DEFS to names without the PM_ prefix. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-03-22Quick pactest changes:Aaron Griffin
* Minor change to utils.py(grep) to make it cleaner * Added scriptlet check to verify scriptlet events happen
2007-03-05This commit looks much more monumental than it is. Almost all just #includeDan McGee
reordering and adding ones that were forgotten (noticed when trying to compile after reordering). * Updated the HACKING file to include information on #include usage. * print -> vprint in "making dir" function in pactest.
2007-03-05* Fixed an issue with globbing the --test argumentAaron Griffin
* Added a custom 'mkdir' function which makes parents and doesn't fail on existence * Added output for 'SKIP' messages (it did not indicate WHY it was skipped) * Added the ability to generate DB packages in the sync dir (not the cache dir) for testing downloading. (self.cachepkgs = False) * Added pmtest.path for the full path to the package file
2007-02-28* Unifying placement of REPLACES in desc file, as pacman2 does. We'll worryDan McGee
about bigger DB changes later, but lets not screw anything up for release. * Removed some weird uses of "not ... ==" usage in pactest- correct me if I'm wrong, but isn't "!=" a lot more clean and concise? * Print description of failed tests in the pactest summary. This could get dirty with a lot of failed tests though, so watch out.
2007-02-26* corrected (IMO) --debug usage with pactest. --debug is now passed straightAaron Griffin
through to pacman, whereas --verbose affects the pactest output - this cleans up the standard test output significantly * sorted tests a bit better, sectioning off failed tests AFTER successful tests, to make it easier to see what failed at a glance * added a 'testname' member to pmtest, which strips path info (cleaner output)
2007-02-21* Indentation changes - 4 spaces for python, we standardized this before (andAaron Griffin
it's a PEP) * Modified some sync tests
2006-10-15Added pactest to repository, from Aurelien Foret:Aaron Griffin
http://aurelien.foret.free.fr/archlinux/pactest/