[Zodb-checkins] CVS: StandaloneZODB - test.py:1.10.6.3

Guido van Rossum guido@python.org
Sun, 23 Dec 2001 13:28:34 -0500


Update of /cvs-repository/StandaloneZODB
In directory cvs.zope.org:/tmp/cvs-serv16310

Modified Files:
      Tag: Standby-branch
	test.py 
Log Message:
Add option -b which runs "python setup.py -q build" before running the
tests.  Very handy.  Might even work on Windows.


=== StandaloneZODB/test.py 1.10.6.2 => 1.10.6.3 ===
     LOOP = 0
     MERGE_SUITES = 1
+    build = 0
 
-    opts, args = getopt.getopt(sys.argv[1:], 'vLi')
+    opts, args = getopt.getopt(sys.argv[1:], 'vLib')
     for k, v in opts:
         if k == '-v':
             VERBOSE = VERBOSE + 1
@@ -189,6 +190,18 @@
             LOOP = 1
         elif k == '-i':
             MERGE_SUITES = 0
+        elif k == '-b':
+            build = 1
+
+    if build:
+        cmd = sys.executable + " setup.py -q build"
+        if VERBOSE:
+            print cmd
+        sts = os.system(cmd)
+        if sts:
+            print "Build failed", hex(sts)
+            sys.exit(1)
+
     if args:
         filter = args[0]
     try: