[pacman-dev] [PATCH] testsuite
hi http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=pacman;a=plain_commitdif...; currently only 3 tests, for fakeroot itself, add and remove do you like this idea? imho this is a very efficent way to prevent pacman regressions udv / greetings, VMiklos -- Developer of Frugalware Linux, to make things frugal - http://frugalware.org
VMiklos wrote:
http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=pacman;a=plain_commitdif...;
currently only 3 tests, for fakeroot itself, add and remove
do you like this idea?
In fact, yes: I've been working on a test suite for pacman for the last two weeks. The idea is basically the same, although it extends it a little bit further. The whole thing is a python script allowing to perform high level tests with pacman. What I've got so far is working pretty well and is quite easy to use. I put in it some test cases today as examples on how to use it. The script generates automatically the test environment described in the test case, run pacman, collect its logs, and then check a set of rules. Make sure the pacman binary to test is in the PATH, then run: ./pactest.py --debug=-1 --test=test/* I hadn't plan to release it before a few days, but now that the idea is in the air, I thought it would be better to share it as is. Note: this is mainly the reason why a "--disable-fakeroot" option was added to the CVS code a few days ago, in order to allow running the test suite as a normal user. The attached patch allows to do the same with pacman 2.9.7. -- Aurelien
On Mon, Jan 30, 2006 at 11:29:50PM +0100, Aurelien Foret <aurelien@archlinux.org> wrote:
In fact, yes: I've been working on a test suite for pacman for the last two weeks. The idea is basically the same, although it extends it a little bit further.
The whole thing is a python script allowing to perform high level tests with pacman. What I've got so far is working pretty well and is quite easy to use. I put in it some test cases today as examples on how to use it. The script generates automatically the test environment described in the test case, run pacman, collect its logs, and then check a set of rules. Make sure the pacman binary to test is in the PATH, then run: ./pactest.py --debug=-1 --test=test/*
I hadn't plan to release it before a few days, but now that the idea is in the air, I thought it would be better to share it as is.
i'll never understand how could one working on something for more than a day without sharing it :) btw i don't know python so i can't send a patch and/or figure out what the problem is, but: $ ./pactest.py --debug=-1 --test=test/* -p ../../src/pacman/pacman (...) PASSED=1/25 (4%) FAILED=24/25 (96%) yes, compiled with --disable-fakeroot. is this normal? udv / greetings, VMiklos -- Developer of Frugalware Linux, to make things frugal - http://frugalware.org
VMiklos wrote:
$ ./pactest.py --debug=-1 --test=test/* -p ../../src/pacman/pacman (...) PASSED=1/25 (4%) FAILED=24/25 (96%)
yes, compiled with --disable-fakeroot. is this normal?
It looks like the "-p" flag only accepts absolute paths (added in the TODO for pactest 0.2). Try to run a single test in verbose mode (-v or -vv): $ ./pactest.py --debug=-1 -v --test=test/add001 Or have a look at the log file: ./root/var/log/pactest.log. -- Aurelien
On Tue, Jan 31, 2006 at 09:46:47PM +0100, Aurelien Foret <aurelien@archlinux.org> wrote:
It looks like the "-p" flag only accepts absolute paths (added in the TODO for pactest 0.2).
yes, that was the first problem
Try to run a single test in verbose mode (-v or -vv): $ ./pactest.py --debug=-1 -v --test=test/add001
Or have a look at the log file: ./root/var/log/pactest.log.
ok, the second problem was that just changing the package extenstion in pactest.py is not enough, it is hardwired to the tests + our package names are pkgname-pkgver-pkgrel-arch.fpm udv / greetings, VMiklos -- Developer of Frugalware Linux, to make things frugal - http://frugalware.org
participants (2)
-
Aurelien Foret
-
VMiklos