mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-13 16:06:59 +02:00
added autotest testing to test_ami
This commit is contained in:
parent
89fa680892
commit
aec8cffb60
@ -123,7 +123,37 @@ for host in ${ips[@]}; do
|
|||||||
done
|
done
|
||||||
echo "OK"
|
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... "
|
echo -n "Cleaning up environment... "
|
||||||
|
cp ~/.ssh/config.back ~/.ssh/config
|
||||||
ec2-terminate-instances $instances > /dev/null
|
ec2-terminate-instances $instances > /dev/null
|
||||||
while ! $ec2_cmd | grep INSTANCE | grep -q terminated
|
while ! $ec2_cmd | grep INSTANCE | grep -q terminated
|
||||||
do sleep 10; done
|
do sleep 10; done
|
||||||
|
Loading…
Reference in New Issue
Block a user