Cam & Ed | Script to run tests with moto and openstack started

This commit is contained in:
cameron-r
2014-10-20 17:19:48 -05:00
committed by Ed Thome
parent 0cac93e178
commit 3dc04a0a18
2 changed files with 50 additions and 0 deletions

29
tests/run_tests.sh Executable file
View File

@@ -0,0 +1,29 @@
#! /usr/bin/env bash
#source ~/devstack/openrc admin
sh ~/devstack/openrc admin
export TEST=True
ps aux | grep 'screen\|nova\|cinder\|horizon' | grep -v grep | awk '{print $2}' | xargs kill -9
ps aux | grep moto_server | grep -v grep | awk '{print $2}' | xargs kill -9
echo "START MOTO"
moto_server ec2 -p1234 &
echo "START OPENSTACK"
bash ../start_openstack.sh
#sh ../start_openstack.sh > testlog.txt 2>&1 &
#/usr/bin/env bash ~/devstack/rejoin-stack.sh &
sleep 10
echo "START TESTS"
nosetests -s test_ec2driver.py > test_output.txt 2>&1
#nosetests -s test_ec2driver.py
echo "KILL EVERYTHING"
ps aux | grep 'screen\|nova\|cinder\|horizon' | grep -v grep | awk '{print $2}' | xargs kill -9
#ps aux | grep moto_server | grep -v grep | awk '{print $2}' | xargs kill -9
unset TEST
echo 'DONE'