* Removed a stray print statement left in there
* Fail when no tests defined * Added --manual-confirm to help with hand testing
This commit is contained in:
parent
8e1cdc5f8d
commit
6cd69fa9ff
2 changed files with 15 additions and 7 deletions
|
@ -34,7 +34,6 @@ def resolveBinPath(option, opt_str, value, parser):
|
||||||
def globTests(option, opt_str, value, parser):
|
def globTests(option, opt_str, value, parser):
|
||||||
globlist = []
|
globlist = []
|
||||||
globlist.extend(glob.glob(value))
|
globlist.extend(glob.glob(value))
|
||||||
print "globlist=%s" % globlist
|
|
||||||
setattr(parser.values, option.dest, globlist)
|
setattr(parser.values, option.dest, globlist)
|
||||||
|
|
||||||
def createOptParser():
|
def createOptParser():
|
||||||
|
@ -68,6 +67,9 @@ def createOptParser():
|
||||||
parser.add_option("--valgrind", action = "store_true",
|
parser.add_option("--valgrind", action = "store_true",
|
||||||
dest = "valgrind", default = False,
|
dest = "valgrind", default = False,
|
||||||
help = "use valgrind while calling pacman")
|
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
|
return parser
|
||||||
|
|
||||||
|
|
||||||
|
@ -84,8 +86,12 @@ if __name__ == "__main__":
|
||||||
env.pacman["nolog"] = opts.nolog
|
env.pacman["nolog"] = opts.nolog
|
||||||
env.pacman["gdb"] = opts.gdb
|
env.pacman["gdb"] = opts.gdb
|
||||||
env.pacman["valgrind"] = opts.valgrind
|
env.pacman["valgrind"] = opts.valgrind
|
||||||
for i in opts.testcases:
|
env.pacman["manual-confirm"] = opts.manualconfirm
|
||||||
env.addtest(i)
|
|
||||||
|
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
|
# run tests and print overall results
|
||||||
env.run()
|
env.run()
|
||||||
|
|
|
@ -188,7 +188,9 @@ class pmtest:
|
||||||
cmd.append("libtool gdb --args")
|
cmd.append("libtool gdb --args")
|
||||||
if pacman["valgrind"]:
|
if pacman["valgrind"]:
|
||||||
cmd.append("valgrind --tool=memcheck --leak-check=full --show-reachable=yes")
|
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))
|
% (pacman["bin"], os.path.join(self.root, PACCONF), self.root))
|
||||||
if pacman["debug"]:
|
if pacman["debug"]:
|
||||||
cmd.append("--debug=%s" % pacman["debug"])
|
cmd.append("--debug=%s" % pacman["debug"])
|
||||||
|
|
Loading…
Add table
Reference in a new issue