Revision: 961bcf3517b5
Branch: default
Author: Pekka Klärck
Date: Thu Dec 12 23:37:13 2013 UTC
Log: enhanced rundevel.py. run it w/o args to see usage.
http://code.google.com/p/robotframework/source/detail?r=961bcf3517b5
Modified:
/rundevel.py
=======================================
--- /rundevel.py Thu Dec 12 23:22:52 2013 UTC
+++ /rundevel.py Thu Dec 12 23:37:13 2013 UTC
@@ -1,9 +1,24 @@
#!/usr/bin/env python
+"""rundevel.py -- script to run current code
+
+Usage: [interpreter] rundevel.py [run|rebot] [options] [arguments]
+
+Examples:
+ ./rundevel.py --name Example tests.txt # run with python
+ ./rundevel.py run --name Example tests.txt # same as above
+ jython rundevel.py --name Example tests.txt # run with jython
+ ./rundevel.py rebot --name Example out.xml # rebot with python
+ ipy rundevel.py rebot --name Example out.xml # rebot with ipy
+"""
+
from os.path import abspath, dirname, exists, join
from os import mkdir, putenv
import sys
+if len(sys.argv) == 1:
+ sys.exit(__doc__)
+
curdir = dirname(abspath(__file__))
tmp = join(curdir, 'tmp')
if not exists(tmp):
@@ -12,13 +27,14 @@
sys.path.insert(0, join(curdir, 'src'))
from robot import run_cli, rebot_cli
-if len(sys.argv) > 1 and sys.argv[1] == 'rebot':
+if sys.argv[1] == 'rebot':
runner = rebot_cli
args = sys.argv[2:]
else:
runner = run_cli
args = ['--pythonpath',
join(curdir, 'atest', 'testresources', 'testlibs'),
- '--pythonpath', tmp, '--loglevel', 'DEBUG'] + sys.argv[1:]
+ '--pythonpath', tmp, '--loglevel', 'DEBUG']
+ args += sys.argv[2:] if sys.argv[1] == 'run' else sys.argv[1:]
putenv('ROBOT_SYSLOG_FILE', join(tmp, 'syslog.txt'))
runner(['--outputdir', 'tmp'] + args)
--
---
You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to robotframework-commit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.