diff options
author | Aaron Griffin <aaron@archlinux.org> | 2007-02-23 04:22:21 +0000 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2007-02-23 04:22:21 +0000 |
commit | 6cd69fa9ff66a3dd77f9773bd7fb62e79512f5e7 (patch) | |
tree | 456b66138b87373dae12dc6b8fe73c74f3887d4f /pactest/pactest.py | |
parent | 8e1cdc5f8d78a1a4d3c253e8c3abf1c3d18aa7ea (diff) | |
download | pacman-6cd69fa9ff66a3dd77f9773bd7fb62e79512f5e7.tar.xz |
* Removed a stray print statement left in there
* Fail when no tests defined
* Added --manual-confirm to help with hand testing
Diffstat (limited to 'pactest/pactest.py')
-rwxr-xr-x | pactest/pactest.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/pactest/pactest.py b/pactest/pactest.py index c7ce619a..7166a9d4 100755 --- a/pactest/pactest.py +++ b/pactest/pactest.py @@ -34,7 +34,6 @@ def resolveBinPath(option, opt_str, value, parser): 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 @@ def createOptParser(): 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 @@ if __name__ == "__main__": 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: |