Skip to content

Commit 63f7843

Browse files
authored
Update pavement.py
Updated with run_behave_test to resolve data corruption
1 parent 2af5e54 commit 63f7843

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

pavement.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from paver.easy import *
22
from paver.setuputils import setup
3-
import threading , os
3+
import threading, os, platform
44

55
setup(
66
name = "behave-browserstack",
@@ -15,9 +15,10 @@
1515
)
1616

1717
def 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

0 commit comments

Comments
 (0)