Add env variables to identify workers

This commit is contained in:
Bruno Oliveira
2016-08-04 20:50:54 -03:00
parent 1c7eb24a1f
commit d498cb3e0f
4 changed files with 34 additions and 2 deletions

View File

@@ -148,6 +148,8 @@ if __name__ == '__channelexec__':
os.environ['PYTHONPATH'] = (
importpath + os.pathsep +
os.environ.get('PYTHONPATH', ''))
os.environ['PYTEST_XDIST_WORKER'] = slaveinput['slaveid']
os.environ['PYTEST_XDIST_WORKER_COUNT'] = str(slaveinput['slavecount'])
# os.environ['PYTHONPATH'] = importpath
import py
config = remote_initconfig(option_dict, args)