]>
wolfpit.net Git - tool/Arch-pacman/.git/blob - test/pacman/pmenv.py
3 # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com>
4 # Copyright (c) 2006-2013 Pacman Developmet Team <pacman-dev@archlinux.org>
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
36 def __init__(self
, root
= "root"):
37 self
.root
= os
.path
.abspath(root
)
47 return "root = %s\n" \
49 % (self
.root
, self
.pacman
)
51 def addtest(self
, testcase
):
54 if not os
.path
.isfile(testcase
):
55 raise IOError("test file %s not found" % testcase
)
56 test
= pmtest
.pmtest(testcase
, self
.root
)
57 self
.testcases
.append(test
)
62 tap
.plan(len(self
.testcases
))
63 for t
in self
.testcases
:
64 tap
.diag("Running '%s'" % t
.testname
)
67 t
.generate(self
.pacman
)
70 tap
.diag("==> Checking rules")
71 tap
.todo
= t
.expectfailure
72 tap
.subtest(lambda: t
.check(), t
.description
)
74 # vim: set ts=4 sw=4 et: