#!/bin/bash set -e echo "Spinning up xdist workers with pytest_worker_manager.py" python scripts/xdist/pytest_worker_manager.py -a up -n ${XDIST_NUM_WORKERS} \ -ami ${XDIST_WORKER_AMI} \ -type ${XDIST_INSTANCE_TYPE} \ -s ${XDIST_WORKER_SUBNET} \ -sg ${XDIST_WORKER_SECURITY_GROUP} \ -key ${XDIST_WORKER_KEY_NAME} \ -iam ${XDIST_WORKER_IAM_PROFILE_ARN} # Install the correct version of Django depending on which tox environment (if any) is in use if [[ -z ${TOX_ENV+x} ]] || [[ ${TOX_ENV} == 'null' ]]; then DJANGO_REQUIREMENT="-r requirements/edx/django.txt" else DJANGO_REQUIREMENT=$(pip freeze | grep "^[Dd]jango==") fi ip_list=$(