From 49f746009853de0738d75c138be27e57b12fd25d Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 27 Dec 2010 18:48:31 +0000 Subject: [PATCH] Enable running just one unittest module via the master build script git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@66460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- b | 1 - build.py | 10 +++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/b b/b index b7a05adf..deb03d6a 100755 --- a/b +++ b/b @@ -5,7 +5,6 @@ PYVER=2.6 PYVER2=26 - if [ "$OSTYPE" = "cygwin" ]; then $TOOLS/python$PYVER2/python.exe -u build.py "$@" else diff --git a/build.py b/build.py index 3c4598c3..81bd3515 100755 --- a/build.py +++ b/build.py @@ -49,6 +49,7 @@ Usage: ./build.py [command(s)] [options] SIP files sip Run sip test Run the unit test suite + test_* Run just one test module build_wx Do the wxWidgets part of the build build_py Build wxPython only @@ -80,7 +81,9 @@ def main(args): while commands: cmd = commands[0] commands = commands[1:] - if cmd in ['dox', 'doxhtml', 'etg', 'sip', 'touch', 'test', + if cmd.startswith('test_'): + testOne(cmd, options, args) + elif cmd in ['dox', 'doxhtml', 'etg', 'sip', 'touch', 'test', 'build_wx', 'build_py', 'build', 'clean_wx', 'clean_py', 'cleanall']: function = globals()[cmd] @@ -376,6 +379,11 @@ def test(options, args): runcmd(PYTHON + ' unittests/runtests.py -v') +def testOne(name, options, args): + msg('Running test %s:' % name) + pwd = pushDir(phoenixDir()) + runcmd(PYTHON + ' unittests/%s.py -v' % name) + def build(options, args): msg('Running command: build')