added autotest testing to test_ami

This commit is contained in:
Josh Deare 2013-08-20 14:37:49 -07:00
parent 89fa680892
commit aec8cffb60

View File

@ -123,7 +123,37 @@ for host in ${ips[@]}; do
done
echo "OK"
AUTOTEST_DIR=$(mktemp -d)
trap 'cd /; rm -rf "${AUTOTEST_DIR}"' EXIT
cd "${AUTOTEST_DIR}"
wget https://github.com/autotest/autotest/archive/0.15.1.tar.gz
tar -xzf 0.15.1.tar.gz
git clone git://github.com/coreos/coreos-autotest.git
cp -r ./coreos-autotest/client/* ./autotest-0.15.1/client/tests
cp ~/.ssh/config ~/.ssh/config.back
for host in ${ips[@]}; do
echo <<EOF >> ~/.ssh/config
Host $host
User core
IdentityFile $key_file
EOF
done
sed -i 's_/usr/local/autotest,/home/autotest_/tmp/autotest_' /tmp/autotest-0.15.1/global_config.ini
cd ./autotest-0.15.1
for file in find -wholename "./client/tests/coreos_*/control"
do
./server/autotest-remote -m ${ips} -c ${file} --install-in-tmpdir --ssh-user core
done
echo -n "Cleaning up environment... "
cp ~/.ssh/config.back ~/.ssh/config
ec2-terminate-instances $instances > /dev/null
while ! $ec2_cmd | grep INSTANCE | grep -q terminated
do sleep 10; done