[pacman-dev] CVS update of pacman-lib/pactest (pactest.py pmtest.py)
Aaron Griffin
aaron at archlinux.org
Thu Feb 22 23:22:21 EST 2007
Date: Thursday, February 22, 2007 @ 23:22:21
Author: aaron
Path: /home/cvs-pacman/pacman-lib/pactest
Modified: pactest.py (1.4 -> 1.5) pmtest.py (1.2 -> 1.3)
* Removed a stray print statement left in there
* Fail when no tests defined
* Added --manual-confirm to help with hand testing
------------+
pactest.py | 18 ++++++++++++------
pmtest.py | 4 +++-
2 files changed, 15 insertions(+), 7 deletions(-)
Index: pacman-lib/pactest/pactest.py
diff -u pacman-lib/pactest/pactest.py:1.4 pacman-lib/pactest/pactest.py:1.5
--- pacman-lib/pactest/pactest.py:1.4 Thu Feb 22 21:10:56 2007
+++ pacman-lib/pactest/pactest.py Thu Feb 22 23:22:21 2007
@@ -34,7 +34,6 @@
def globTests(option, opt_str, value, parser):
globlist = []
globlist.extend(glob.glob(value))
- print "globlist=%s" % globlist
setattr(parser.values, option.dest, globlist)
def createOptParser():
@@ -68,6 +67,9 @@
parser.add_option("--valgrind", action = "store_true",
dest = "valgrind", default = False,
help = "use valgrind while calling pacman")
+ parser.add_option("--manual-confirm", action = "store_true",
+ dest = "manualconfirm", default = False,
+ help = "do not use --noconfirm for pacman calls")
return parser
@@ -84,11 +86,15 @@
env.pacman["nolog"] = opts.nolog
env.pacman["gdb"] = opts.gdb
env.pacman["valgrind"] = opts.valgrind
- for i in opts.testcases:
- env.addtest(i)
+ env.pacman["manual-confirm"] = opts.manualconfirm
- # run tests and print overall results
- env.run()
- env.results()
+ if len(opts.testcases) == 0:
+ print "no tests defined, nothing to do"
+ else:
+ for i in opts.testcases: env.addtest(i)
+
+ # run tests and print overall results
+ env.run()
+ env.results()
# vim: set ts=4 sw=4 et:
Index: pacman-lib/pactest/pmtest.py
diff -u pacman-lib/pactest/pmtest.py:1.2 pacman-lib/pactest/pmtest.py:1.3
--- pacman-lib/pactest/pmtest.py:1.2 Wed Feb 21 01:33:13 2007
+++ pacman-lib/pactest/pmtest.py Thu Feb 22 23:22:21 2007
@@ -188,7 +188,9 @@
cmd.append("libtool gdb --args")
if pacman["valgrind"]:
cmd.append("valgrind --tool=memcheck --leak-check=full --show-reachable=yes")
- cmd.append("%s --noconfirm --config=%s --root=%s" \
+ if not pacman["manual-confirm"]:
+ cmd.append("--noconfirm")
+ cmd.append("%s --config=%s --root=%s" \
% (pacman["bin"], os.path.join(self.root, PACCONF), self.root))
if pacman["debug"]:
cmd.append("--debug=%s" % pacman["debug"])
More information about the pacman-dev
mailing list