[PyObjC-svn] r2554 - trunk/pyobjc/build-support
[email protected] Thu, 29 Jul 2010 13:52:34 -0500
| Newsgroups | gmane.comp.python.pyobjc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: ronaldoussoren
Date: Thu Jul 29 13:52:34 2010
New Revision: 2554
Log:
* run_tests: add option to only run the initial setup
* release: new script to publish a new release
Added:
trunk/pyobjc/build-support/release.py (contents, props changed)
Modified:
trunk/pyobjc/build-support/run_tests.py
Modified: trunk/pyobjc/build-support/run_tests.py
==============================================================================
--- trunk/pyobjc/build-support/run_tests.py (original)
+++ trunk/pyobjc/build-support/run_tests.py Thu Jul 29 13:52:34 2010
@@ -40,7 +40,7 @@
gUsage = """\
-run_tests.py [-a archs] [--archs=archs] [-v versions] [--versions,versions]
+run_tests.py [-a archs] [--archs=archs] [-v versions] [--versions=versions] [-s|--setup-only]
archs: 32-bit,3-way (values separated by commas)
versions: 2.6,2.7,3.1,3.2 (values seperated by commas)
@@ -84,7 +84,7 @@
logging.basicConfig(level=logging.DEBUG)
try:
- opts, args = getopt.getopt(sys.argv[1:], 'a:v:h?', ["help", "archs=", "versions="])
+ opts, args = getopt.getopt(sys.argv[1:], 'a:v:h?s', ["help", "archs=", "versions=", "setup-only"])
except getopt.error as msg:
print(msg, file=sys.stderr)
print(gUsage, file=sys.stderr)
@@ -97,6 +97,7 @@
versions=gVersions
archs=gArchs
+ setup_only=False
for k, v in opts:
if k in ('-?', '-h', '--help'):
@@ -119,6 +120,10 @@
print("Unsupported Python version: {0}".format(v),
file=sys.stderr)
sys.exit(1)
+
+ elif k in ['-s', '--setup-only']:
+ setup_only = True
+
else:
print("ERROR: Unhandled script option: {0}".format(k),
file=sys.stderr)
@@ -126,7 +131,10 @@
for ver in versions:
for arch in archs:
- run_tests(ver, arch)
+ run_tests(ver, arch, setup_only)
+
+ if setup_only:
+ return
gen_summary(versions, archs)
@@ -169,7 +177,7 @@
-def run_tests(version, archs):
+def run_tests(version, archs, setup_only):
lg = logging.getLogger("run_tests")
@@ -272,6 +280,10 @@
lg.warning("Install %s failed", pkg)
raise RuntimeError(pkg)
+ if setup_only:
+ lg.info("Don't actually run the tests")
+ return
+
lg.debug("Start testing cycle")
for pkg in ["pyobjc-core"] + detect_frameworks():
if not os.path.exists(os.path.join(resultdir, pkg)):
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm