summaryrefslogtreecommitdiff
path: root/pactest/pactest.py
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2007-02-21 06:33:13 +0000
committerAaron Griffin <aaron@archlinux.org>2007-02-21 06:33:13 +0000
commit786cd38c0a1cfeff96e5c755852a7e1c7f5e7d75 (patch)
tree3dbf7d7a1a314665602df9e1c0465afd3f2728e1 /pactest/pactest.py
parenta8dd8d5770094ad8c925a56d47c3607c96363a51 (diff)
downloadpacman-786cd38c0a1cfeff96e5c755852a7e1c7f5e7d75.tar.xz
* Indentation changes - 4 spaces for python, we standardized this before (and
it's a PEP) * Modified some sync tests
Diffstat (limited to 'pactest/pactest.py')
-rwxr-xr-xpactest/pactest.py67
1 files changed, 34 insertions, 33 deletions
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: