Last active
August 29, 2015 14:03
-
-
Save lukego/bdefc792b8255d141e4c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
trap "touch /vagrant/done" EXIT | |
sudo su vagrant /vagrant/test-run.sh 2>&1 | tee /vagrant/console.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install -q -y git | |
# Install and run devstack | |
echo -n "$(date '+%F %T') devstack.. " >> /vagrant/progress.txt | |
cd $HOME | |
git clone https://github.com/openstack-dev/devstack.git | |
cd devstack | |
cp /vagrant/local.conf . | |
./stack.sh | |
echo "ok" >> /vagrant/progress.txt | |
# Install and run tempest | |
echo -n "$(date '+%F %T') tempest.. " >> /vagrant/progress.txt | |
cd $HOME | |
git clone git://git.openstack.org/openstack/tempest.git | |
cd tempest | |
sudo python ./setup.py install | |
cd /opt/stack/tempest | |
testr init | |
testr run tempest.api.network.test_networks | tee /vagrant/tempest.log | |
if grep PASSED /vagrant/tempest.log; then | |
echo "passed" >> /vagrant/progress.txt | |
else | |
echo "failed" >> /vagrant/progress.txt | |
fi | |
# That's it | |
echo "$(date '+%F %T') Finished" >> /vagrant/progress.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "trusty" | |
config.vm.provision "shell", path: "ci.sh" | |
config.vm.provider "virtualbox" do |vb| | |
vb.customize ["modifyvm", :id, "--memory", "4096"] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
grepping for PASSED seems delicate. Can't you just check the return code of testr?