[robotframework-seleniumlibrary] push by janne.t.harkonen@gmail.com - run_tests: oops, fix syntax on 2012-05-07 08:24 GMT

4 views
Skip to first unread message

robotframework-...@googlecode.com

unread,
May 7, 2012, 4:25:09 AM5/7/12
to robotframework-se...@googlegroups.com
Revision: af2d74ca1580
Author: Janne Härkönen <j...@reaktor.fi>
Date: Mon May 7 01:24:51 2012
Log: run_tests: oops, fix syntax
http://code.google.com/p/robotframework-seleniumlibrary/source/detail?r=af2d74ca1580

Modified:
/test/run_tests.py

=======================================
--- /test/run_tests.py Mon May 7 01:13:54 2012
+++ /test/run_tests.py Mon May 7 01:24:51 2012
@@ -17,24 +17,29 @@
IS_WINDOWS = os.sep == '\\'

ARG_VALUES = {'outdir': RESULTDIR, 'pythonpath': SRCDIR}
-ROBOT_ARGS = (a % ARG_VALUES for a in (
- '--doc', 'SeleniumSPacceptanceSPtestsSPwithSP%(browser)s',
- '--outputdir', '%(outdir)s',
- '--variable', 'browser:%(browser)s',
- '--escape', 'space:SP',
- '--report', 'none',
- '--log', 'none',
- '--loglevel', 'DEBUG',
- '--pythonpath', '%(pythonpath)s')
-)
-REBOT_ARGS = (a % ARG_VALUES for a in (
- '--outputdir', '%(outdir)s',
- '--output', 'output.xml',
- '--name', '%(browser)sSPAcceptanceSPTests',
- '--escape', 'space:SP',
- '--critical', 'regression',
- '--noncritical', 'knownissue')
-)
+
+
+def robot_args():
+ return [a % ARG_VALUES for a in (
+ '--doc', 'SeleniumSPacceptanceSPtestsSPwithSP%(browser)s',
+ '--outputdir', '%(outdir)s',
+ '--variable', 'browser:%(browser)s',
+ '--escape', 'space:SP',
+ '--report', 'none',
+ '--log', 'none',
+ '--loglevel', 'DEBUG',
+ '--pythonpath', '%(pythonpath)s')
+ ]
+
+def rebot_args():
+ return [a % ARG_VALUES for a in (
+ '--outputdir', '%(outdir)s',
+ '--output', 'output.xml',
+ '--name', '%(browser)sSPAcceptanceSPTests',
+ '--escape', 'space:SP',
+ '--critical', 'regression',
+ '--noncritical', 'knownissue')
+ ]


def acceptance_tests(interpreter, browser, args):
@@ -59,7 +64,7 @@
def execute_tests(runner):
if not os.path.exists(RESULTDIR):
os.mkdir(RESULTDIR)
- command = [runner] + ROBOT_ARGS + args + [TESTDATADIR]
+ command = [runner] + robot_args() + args + [TESTDATADIR]
print 'Starting test execution with command:\n' + ' '.join(command)
syslog = os.path.join(RESULTDIR, 'syslog.txt')
call(command, shell=IS_WINDOWS,
@@ -73,7 +78,7 @@
call(['python', os.path.join(RESOURCEDIR, 'statuschecker.py'),
os.path.join(RESULTDIR, 'output.xml')])
rebot = 'rebot' if os.sep == '/' else 'rebot.bat'
- rebot_cmd = [rebot] + REBOT_ARGS +\
+ rebot_cmd = [rebot] + rebot_args() +\
[os.path.join(ARG_VALUES['outdir'], 'output.xml')]
rc = call(rebot_cmd, env=os.environ)
if rc == 0:
Reply all
Reply to author
Forward
0 new messages