index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Aaron Griffin <aaron@archlinux.org> | 2007-02-21 06:33:13 +0000 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2007-02-21 06:33:13 +0000 |
commit | 786cd38c0a1cfeff96e5c755852a7e1c7f5e7d75 (patch) | |
tree | 3dbf7d7a1a314665602df9e1c0465afd3f2728e1 /pactest/pactest.py | |
parent | a8dd8d5770094ad8c925a56d47c3607c96363a51 (diff) |
-rwxr-xr-x | pactest/pactest.py | 67 |
diff --git a/pactest/pactest.py b/pactest/pactest.py index 2f7358ac..d9227ba4 100755 --- a/pactest/pactest.py +++ b/pactest/pactest.py @@ -32,42 +32,43 @@ __version__ = "0.3" def usage(retcode): - """ - """ - print "Usage: %s [options] [[--test=<path/to/testfile.py>] ...]\n\n" % __file__ - sys.exit(retcode) + """ + """ + print "Usage: %s [options] [[--test=<path/to/testfile.py>] ...]\n\n" % __file__ + sys.exit(retcode) if __name__ == "__main__": - env = pmenv.pmenv() - testcases = [] + env = pmenv.pmenv() + testcases = [] - try: - opts, args = getopt.getopt(sys.argv[1:], - "d:hp:t:v", - ["debug=", "gdb", "help", "pacman=", "test=", "valgrind", "verbose", "nolog"]) - except getopt.GetoptError: - usage(1) + try: + opts, args = getopt.getopt(sys.argv[1:], + "d:hp:t:v", + ["debug=", "gdb", "help", "pacman=", "test=", "valgrind", "verbose", "nolog"]) + except getopt.GetoptError: + usage(1) - for (cmd, param) in opts: - if cmd == "-v" or cmd == "--verbose": - util.verbose += 1 - elif cmd == "-d" or cmd == "--debug": - env.pacman["debug"] = int(param) - elif cmd == "-t" or cmd == "--test": - testcases.extend(glob.glob(param)) - elif cmd == "-p" or cmd == "--pacman": - env.pacman["bin"] = os.path.abspath(param) - elif cmd == "-h" or cmd == "--help": - usage(0) - elif cmd == "--nolog": - env.pacman["nolog"] = 1 - elif cmd == "--gdb": - env.pacman["gdb"] = 1 - elif cmd == "--valgrind": - env.pacman["valgrind"] = 1 + for (cmd, param) in opts: + if cmd == "-v" or cmd == "--verbose": + util.verbose += 1 + elif cmd == "-d" or cmd == "--debug": + env.pacman["debug"] = int(param) + elif cmd == "-t" or cmd == "--test": + testcases.extend(glob.glob(param)) + elif cmd == "-p" or cmd == "--pacman": + env.pacman["bin"] = os.path.abspath(param) + elif cmd == "-h" or cmd == "--help": + usage(0) + elif cmd == "--nolog": + env.pacman["nolog"] = 1 + elif cmd == "--gdb": + env.pacman["gdb"] = 1 + elif cmd == "--valgrind": + env.pacman["valgrind"] = 1 - for i in testcases: - env.addtest(i) + for i in testcases: + env.addtest(i) - env.run() - env.results() + env.run() + env.results() +# vim: set ts=4 sw=4 et: |