Install test dependencies inside virtualenv
Related: rhbz#1698366
This commit is contained in:
parent
89e56aa3b4
commit
77649cbf76
@ -47,6 +47,10 @@ if ! rpm -q python2-pip; then
|
|||||||
yum -y install python2-pip
|
yum -y install python2-pip
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! rpm -q python-virtualenv; then
|
||||||
|
yum -y install python-virtualenv
|
||||||
|
fi
|
||||||
|
|
||||||
# don't build images with EPEL enabled
|
# don't build images with EPEL enabled
|
||||||
rm -f $EPEL_REPO
|
rm -f $EPEL_REPO
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ set -e
|
|||||||
. $(dirname $0)/lib/lib.sh
|
. $(dirname $0)/lib/lib.sh
|
||||||
|
|
||||||
CLI="${CLI:-./src/bin/composer-cli}"
|
CLI="${CLI:-./src/bin/composer-cli}"
|
||||||
|
VENV=`mktemp -d /tmp/venv.XXX`
|
||||||
|
|
||||||
|
|
||||||
rlJournalStart
|
rlJournalStart
|
||||||
@ -40,6 +41,10 @@ rlJournalStart
|
|||||||
rlAssertRpm python2-pip
|
rlAssertRpm python2-pip
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
rlAssertRpm python-virtualenv
|
||||||
|
rlRun -t -c "virtualenv $VENV"
|
||||||
|
source $VENV/bin/activate
|
||||||
|
|
||||||
rlRun -t -c "pip install --upgrade pip setuptools"
|
rlRun -t -c "pip install --upgrade pip setuptools"
|
||||||
rlRun -t -c "pip install awscli"
|
rlRun -t -c "pip install awscli"
|
||||||
|
|
||||||
@ -200,7 +205,7 @@ __EOF__
|
|||||||
rlRun -t -c "aws ec2 delete-snapshot --snapshot-id $SNAPSHOT_ID"
|
rlRun -t -c "aws ec2 delete-snapshot --snapshot-id $SNAPSHOT_ID"
|
||||||
rlRun -t -c "aws s3 rm s3://$AWS_BUCKET/$AMI"
|
rlRun -t -c "aws s3 rm s3://$AWS_BUCKET/$AMI"
|
||||||
rlRun -t -c "$CLI compose delete $UUID"
|
rlRun -t -c "$CLI compose delete $UUID"
|
||||||
rlRun -t -c "rm -rf $AMI $SSH_KEY_DIR containers.json"
|
rlRun -t -c "rm -rf $AMI $SSH_KEY_DIR containers.json $VENV"
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlJournalEnd
|
rlJournalEnd
|
||||||
|
@ -13,6 +13,7 @@ set -e
|
|||||||
. $(dirname $0)/lib/lib.sh
|
. $(dirname $0)/lib/lib.sh
|
||||||
|
|
||||||
CLI="${CLI:-./src/bin/composer-cli}"
|
CLI="${CLI:-./src/bin/composer-cli}"
|
||||||
|
VENV=`mktemp -d /tmp/venv.XXX`
|
||||||
|
|
||||||
|
|
||||||
rlJournalStart
|
rlJournalStart
|
||||||
@ -55,8 +56,9 @@ rlJournalStart
|
|||||||
rlAssertRpm python2-pip
|
rlAssertRpm python2-pip
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rlRun -t -c "rpm -e --nodeps pyOpenSSL"
|
rlAssertRpm python-virtualenv
|
||||||
rlRun -t -c "yum -y remove python*-requests python*-dateutil"
|
rlRun -t -c "virtualenv $VENV"
|
||||||
|
source $VENV/bin/activate
|
||||||
|
|
||||||
rlRun -t -c "pip install --upgrade pip setuptools"
|
rlRun -t -c "pip install --upgrade pip setuptools"
|
||||||
rlRun -t -c "pip install ansible[azure] futures"
|
rlRun -t -c "pip install ansible[azure] futures"
|
||||||
@ -155,7 +157,7 @@ __EOF__
|
|||||||
rlRun -t -c "ansible localhost -m azure_rm_image -a 'resource_group=$AZURE_RESOURCE_GROUP name=$OS_IMAGE_NAME state=absent'"
|
rlRun -t -c "ansible localhost -m azure_rm_image -a 'resource_group=$AZURE_RESOURCE_GROUP name=$OS_IMAGE_NAME state=absent'"
|
||||||
rlRun -t -c "ansible localhost -m azure_rm_storageblob -a 'resource_group=$AZURE_RESOURCE_GROUP storage_account_name=$AZURE_STORAGE_ACCOUNT container=$AZURE_STORAGE_CONTAINER blob=$IMAGE state=absent'"
|
rlRun -t -c "ansible localhost -m azure_rm_storageblob -a 'resource_group=$AZURE_RESOURCE_GROUP storage_account_name=$AZURE_STORAGE_ACCOUNT container=$AZURE_STORAGE_CONTAINER blob=$IMAGE state=absent'"
|
||||||
rlRun -t -c "$CLI compose delete $UUID"
|
rlRun -t -c "$CLI compose delete $UUID"
|
||||||
rlRun -t -c "rm -rf $IMAGE $SSH_KEY_DIR $TMP_DIR"
|
rlRun -t -c "rm -rf $IMAGE $SSH_KEY_DIR $TMP_DIR $VENV"
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlJournalEnd
|
rlJournalEnd
|
||||||
|
@ -44,10 +44,8 @@ rlJournalStart
|
|||||||
rlAssertRpm python2-pip
|
rlAssertRpm python2-pip
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rlRun -t -c "yum -y install python-virtualenv"
|
|
||||||
rlAssertRpm python-virtualenv
|
rlAssertRpm python-virtualenv
|
||||||
rlRun -t -c "virtualenv $VENV"
|
rlRun -t -c "virtualenv $VENV"
|
||||||
|
|
||||||
source $VENV/bin/activate
|
source $VENV/bin/activate
|
||||||
|
|
||||||
rlRun -t -c "pip install --upgrade pip setuptools"
|
rlRun -t -c "pip install --upgrade pip setuptools"
|
||||||
|
@ -13,6 +13,7 @@ set -e
|
|||||||
. $(dirname $0)/lib/lib.sh
|
. $(dirname $0)/lib/lib.sh
|
||||||
|
|
||||||
CLI="${CLI:-./src/bin/composer-cli}"
|
CLI="${CLI:-./src/bin/composer-cli}"
|
||||||
|
VENV=`mktemp -d /tmp/venv.XXX`
|
||||||
|
|
||||||
|
|
||||||
rlJournalStart
|
rlJournalStart
|
||||||
@ -55,6 +56,10 @@ rlJournalStart
|
|||||||
rlAssertRpm python2-pip
|
rlAssertRpm python2-pip
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
rlAssertRpm python-virtualenv
|
||||||
|
rlRun -t -c "virtualenv $VENV"
|
||||||
|
source $VENV/bin/activate
|
||||||
|
|
||||||
rlRun -t -c "pip install --upgrade pip setuptools"
|
rlRun -t -c "pip install --upgrade pip setuptools"
|
||||||
rlRun -t -c "pip install pyvmomi"
|
rlRun -t -c "pip install pyvmomi"
|
||||||
|
|
||||||
@ -156,7 +161,7 @@ __EOF__
|
|||||||
python $SAMPLES/destroy_vm.py -S -s $V_HOST -u $V_USERNAME -p $V_PASSWORD --uuid $INSTANCE_UUID
|
python $SAMPLES/destroy_vm.py -S -s $V_HOST -u $V_USERNAME -p $V_PASSWORD --uuid $INSTANCE_UUID
|
||||||
rlAssert0 "VM destroyed" $?
|
rlAssert0 "VM destroyed" $?
|
||||||
rlRun -t -c "$CLI compose delete $UUID"
|
rlRun -t -c "$CLI compose delete $UUID"
|
||||||
rlRun -t -c "rm -rf $IMAGE $TMP_DIR $SSH_KEY_DIR"
|
rlRun -t -c "rm -rf $IMAGE $TMP_DIR $SSH_KEY_DIR $VENV"
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlJournalEnd
|
rlJournalEnd
|
||||||
|
Loading…
Reference in New Issue
Block a user