File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from paver .easy import *
22from paver .setuputils import setup
3- import threading , os
3+ import threading , os , platform
44
55setup (
66 name = "behave-browserstack" ,
1515)
1616
1717def run_behave_test (config , feature , task_id = 0 ):
18- os .environ ['CONFIG_FILE' ] = 'config/{}.json' .format (config )
19- os .environ ['TASK_ID' ] = str (task_id )
20- sh ('behave features/{}.feature' .format (feature ))
18+ if (platform .system ()== 'Windows' ):
19+ sh ('SET CONFIG_FILE=config/%s.json & SET TASK_ID=%s & behave features/%s.feature' % (config , task_id , feature ))
20+ else :
21+ sh ('export CONFIG_FILE=config/%s.json && export TASK_ID=%s && behave features/%s.feature' % (config , task_id , feature ))
2122
2223@task
2324@consume_nargs (1 )
@@ -31,7 +32,7 @@ def run(args):
3132 p = threading .Thread (target = run_behave_test ,args = (args [0 ], "single" ,i ))
3233 jobs .append (p )
3334 p .start ()
34-
35+
3536 for th in jobs :
3637 th .join ()
3738
You can’t perform that action at this time.
0 commit comments