2011-11-09 22:26:23 +01:00
#!/bin/bash
exec 2>& 1
2013-10-10 22:58:00 +02:00
target = "airtime_git_branch:2.5.x"
2013-01-09 21:32:58 +01:00
#target="airtime_git_branch:airtime-2.0.0-RC1"
2013-10-18 17:28:01 +02:00
#airtime_versions=("")
airtime_versions = ( "airtime_241_tar" )
ubuntu_versions = ( "ubuntu_lucid_32" "ubuntu_lucid_64" "ubuntu_precise_32" "ubuntu_precise_64" "ubuntu_quantal_32" "ubuntu_quantal_64" "ubuntu_raring_32" "ubuntu_raring_64" "debian_squeeze_32" "debian_squeeze_64" "debian_wheezy_32" "debian_wheezy_64" "ubuntu_saucy_32" "ubuntu_saucy_64" )
#ubuntu_versions=("ubuntu_saucy_64" "ubuntu_saucy_32")
2011-11-09 22:26:23 +01:00
num1 = ${# ubuntu_versions [@] }
num2 = ${# airtime_versions [@] }
2013-10-18 17:28:01 +02:00
upgrade_log_folder = "upgrade_logs"
rm -rf ./upgrade_logs
2011-11-10 21:45:35 +01:00
mkdir -p ./upgrade_logs
2011-11-09 22:26:23 +01:00
for i in $( seq 0 $(( $num1 - 1 )) ) ;
do
2011-11-28 10:42:20 +01:00
#echo fab -f fab_setup.py os_update shutdown
2011-11-09 22:26:23 +01:00
for j in $( seq 0 $(( $num2 - 1 )) ) ;
do
2013-10-10 22:58:00 +02:00
#since 2.5.0 airtime start to support saucy, before that, we don't need to test on those combinations
platform = ` echo ${ ubuntu_versions [ $i ] } | awk '/(saucy)/' `
airtime = ` echo ${ airtime_versions [ $j ] } | awk '/2[2-4][0-3]/' `
2013-01-09 21:32:58 +01:00
if [ " $platform " = "" ] || [ " $airtime " = "" ] ; then
echo fab -f fab_release_test.py ${ ubuntu_versions [ $i ] } ${ airtime_versions [ $j ] } $target shutdown
fab -f fab_release_test.py ${ ubuntu_versions [ $i ] } ${ airtime_versions [ $j ] } $target shutdown 2>& 1 | tee " ./ $upgrade_log_folder / ${ ubuntu_versions [ $i ] } _ ${ airtime_versions [ $j ] } _ $target .log "
#touch "./$upgrade_log_folder/${ubuntu_versions[$i]}_${airtime_versions[$j]}_$target.log"
tail -20 " ./ $upgrade_log_folder / ${ ubuntu_versions [ $i ] } _ ${ airtime_versions [ $j ] } _ $target .log " | grep -E "Your installation of Airtime looks OK"
returncode = $?
if [ " $returncode " -ne "0" ] ; then
mv " ./ $upgrade_log_folder / ${ ubuntu_versions [ $i ] } _ ${ airtime_versions [ $j ] } _ $target .log " " ./ $upgrade_log_folder /fail_ ${ ubuntu_versions [ $i ] } _ ${ airtime_versions [ $j ] } _ $target .log "
fi
fi
2011-11-09 22:26:23 +01:00
done
done
2013-01-09 21:32:58 +01:00