From 1ab78fd1c0276603b4ca9794e9bf846449374c2d Mon Sep 17 00:00:00 2001 From: Karanbir Singh Date: Oct 04 2012 15:55:56 +0000 Subject: Merge branch 'master' of gitorious.org:testautomation/t_functional --- diff --git a/tests/0_lib/functions.sh b/tests/0_lib/functions.sh index 8643624..3e10393 100755 --- a/tests/0_lib/functions.sh +++ b/tests/0_lib/functions.sh @@ -102,6 +102,8 @@ function t_DistCheck { rpm -q --queryformat '%{version}\n' centos-release } +# Additionally set distro release to $centos_ver +centos_ver=$(t_DistCheck) # Description: Get a package (rpm) version number function t_GetPkgVer @@ -133,3 +135,4 @@ export -f t_DistCheck export -f t_GetPkgVer export -f t_GetArch export -f t_Assert +export centos_ver diff --git a/tests/p_arpwatch/arpwatch_test.sh b/tests/p_arpwatch/arpwatch_test.sh index e382dd0..3a7eebf 100755 --- a/tests/p_arpwatch/arpwatch_test.sh +++ b/tests/p_arpwatch/arpwatch_test.sh @@ -19,16 +19,16 @@ fi # beginning and running test arpwatch -sleep 1 +sleep 4 arp -d $defgw -sleep 1 -ping -q -i 0.25 -c 5 $defgw +sleep 2 +ping -q -i 0.5 -c 5 $defgw killall arpwatch -sleep 1 +sleep 2 grep -q $defgw $arpdat -ret_val=$? + +t_CheckExitStatus $? # cleaning up cat /dev/null > $arpdat -t_CheckExitStatus $ret_val diff --git a/tests/p_bridge-utils/00-install_bridge-utils.sh b/tests/p_bridge-utils/00-install_bridge-utils.sh new file mode 100755 index 0000000..69045ed --- /dev/null +++ b/tests/p_bridge-utils/00-install_bridge-utils.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Author: Madhurranjan Mohaan + +# Install bridge_utils package +t_Log "Running $0 - bridge-utils: Installation" + +t_InstallPackage bridge-utils diff --git a/tests/p_bridge-utils/05-add_bridge.sh b/tests/p_bridge-utils/05-add_bridge.sh new file mode 100755 index 0000000..e21c60b --- /dev/null +++ b/tests/p_bridge-utils/05-add_bridge.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# Author : Madhurranjan Mohaan + +if [ $# -eq 0 ] +then + bridge=testbridge1 +else + bridge=$1 +fi + +t_Log "Running $0 - Adding a dummy Bridge: $bridge" +bridge_present=`brctl show | grep $bridge` +if ! [ "$bridge_present" ] + then + brctl addbr $bridge + bridge_present=`brctl show | grep $bridge` + if [ "$bridge_present" ] + then + ret_val=0 + else + ret_val=1 + fi +else + ret_val=0 +fi + +t_CheckExitStatus $ret_val diff --git a/tests/p_bridge-utils/10-delete_bridge.sh b/tests/p_bridge-utils/10-delete_bridge.sh new file mode 100755 index 0000000..1472401 --- /dev/null +++ b/tests/p_bridge-utils/10-delete_bridge.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Author : Madhurranjan Mohaan +#add bridge +bridge=testbridge2 +./tests/p_bridge-utils/05-add_bridge.sh $bridge +#delete the bridge created +bridge_present=`brctl show | grep $bridge` +t_Log "Running $0 - Deleting the dummy bridge: $bridge" + +if ! [ "$bridge_present" ] + then + ret_val=1 +else + t_Log "Deleting bridge $bridge" + brctl delbr $bridge + bridge_present=`brctl show | grep $bridge` + if [ $bridge_present ] + then + ret_val=1 + else + ret_val=0 + fi +fi +t_CheckExitStatus $ret_val diff --git a/tests/p_git/0-install_git.sh b/tests/p_git/0-install_git.sh index 872e5e3..682830d 100755 --- a/tests/p_git/0-install_git.sh +++ b/tests/p_git/0-install_git.sh @@ -1,7 +1,13 @@ #!/bin/bash # Author: Pratima Singh , Nilesh Bairagi , Madhurranjan Mohaan +# Christoph Galuschka -# Install git t_Log "Running $0 - installing git" -t_InstallPackage git +# Install git +if [ $centos_ver == '6' ] + then + t_InstallPackage git +else + t_Log "This test is skipped in CentOS5." +fi diff --git a/tests/p_git/10-test_git.sh b/tests/p_git/10-test_git.sh index ba249f6..719ea91 100755 --- a/tests/p_git/10-test_git.sh +++ b/tests/p_git/10-test_git.sh @@ -1,6 +1,18 @@ #!/bin/bash # Author: Pratima Singh , Nilesh Bairagi , Madhurranjan Mohaan +# Christoph Galuschka # Check git installation -git --version -t_CheckExitStatus $? + +t_Log "Running $0 - checking git installation" + +if [ $centos_ver == '6' ] + then + git --version + ret_val=$? +else + t_Log "This test is skipped in CentOS5." + ret_val=0 +fi + +t_CheckExitStatus $ret_val diff --git a/tests/p_git/11-test_git_clone.sh b/tests/p_git/11-test_git_clone.sh index f7118dd..c748ecb 100755 --- a/tests/p_git/11-test_git_clone.sh +++ b/tests/p_git/11-test_git_clone.sh @@ -1,24 +1,37 @@ #!/bin/bash # Author: Pratima Singh , Nilesh Bairagi , Madhurranjan Mohaan +# Christoph Galuschka -# Testing Git clone by comparing SHAs -rm -rf /tmp/temprepo/ /tmp/cloned_repo/ /tmp/testing_clone_repo -temp_repo="/tmp/temprepo" -SHA1=`echo "hello world" | git hash-object --stdin` -mkdir -p $temp_repo -cd $temp_repo -git init . --bare -cd /tmp -git clone $temp_repo cloned_repo -cd cloned_repo -echo "hello world" > hello -git add hello -git commit -m "Temp commit" -git push origin master +t_Log "Running $0 - testing a local git clone operation" -git clone $temp_repo /tmp/testing_clone_repo -cd /tmp/testing_clone_repo -SHA2=`cat hello | git hash-object --stdin` -expr $SHA1 == $SHA2 2>&1 -t_CheckExitStatus $? +if [ $centos_ver == '6' ] + then + # Testing Git clone by comparing SHAs + workpath=$(pwd) + rm -rf /tmp/temprepo/ /tmp/cloned_repo/ /tmp/testing_clone_repo + temp_repo="/tmp/temprepo" + SHA1=`echo "hello world" | git hash-object --stdin` + mkdir -p $temp_repo + cd $temp_repo + git init . --bare + cd /tmp + git clone $temp_repo cloned_repo + cd cloned_repo + echo "hello world" > hello + git add hello + git commit -m "Temp commit" + git push origin master + + git clone $temp_repo /tmp/testing_clone_repo + cd /tmp/testing_clone_repo + SHA2=`cat hello | git hash-object --stdin` + expr $SHA1 == $SHA2 2>&1 + ret_val=$? + cd $workpath +else + t_Log "This test is skipped in CentOS5." + ret_val=0 +fi + +t_CheckExitStatus $ret_val diff --git a/tests/p_git/12-test_git_log.sh b/tests/p_git/12-test_git_log.sh index 89d0ba8..0c37264 100755 --- a/tests/p_git/12-test_git_log.sh +++ b/tests/p_git/12-test_git_log.sh @@ -1,18 +1,31 @@ #!/bin/bash # Author: Pratima Singh , Nilesh Bairagi , Madhurranjan Mohaan +# Christoph Galuschka -# Tsting git log and git commit msgs -rm -rf /tmp/temprepo/ /tmp/cloned_repo/ -temp_repo="/tmp/temprepo" -mkdir -p $temp_repo -cd $temp_repo -git init . --bare -cd /tmp -git clone $temp_repo cloned_repo -cd cloned_repo -echo "hello world" > hello -git add hello -git commit -m "Temp commit" 2>&1 -git log --grep="Temp commit" 2>&1 -t_CheckExitStatus $? +t_Log "Running $0 - testing git logging and commit messages" + +if [ $centos_ver == '6' ] + then + # Testing git log and git commit msgs + workpath=$(pwd) + rm -rf /tmp/temprepo/ /tmp/cloned_repo/ + temp_repo="/tmp/temprepo" + mkdir -p $temp_repo + cd $temp_repo + git init . --bare + cd /tmp + git clone $temp_repo cloned_repo + cd cloned_repo + echo "hello world" > hello + git add hello + git commit -m "Temp commit" 2>&1 + git log --grep="Temp commit" 2>&1 + ret_val=$? + cd $workpath +else + t_Log "This test is skipped in CentOS5." + ret_val=0 +fi + +t_CheckExitStatus $ret_val diff --git a/tests/p_httpd/0-install_httpd.sh b/tests/p_httpd/0-install_httpd.sh index b5db22e..33e3d9a 100755 --- a/tests/p_httpd/0-install_httpd.sh +++ b/tests/p_httpd/0-install_httpd.sh @@ -1,5 +1,6 @@ #!/bin/bash # Author: Athmane Madjoudj +# Christoph Galuschka # Install tests deps t_Log "Running $0 - httpd: installing curl, http, php and mysql" @@ -8,4 +9,9 @@ t_InstallPackage curl # HTTPD / PHP t_InstallPackage httpd mod_ssl php php-mysql -t_ServiceControl httpd restart +t_ServiceControl httpd stop +sleep 3 +killall httpd +sleep 3 +t_ServiceControl httpd start + diff --git a/tests/p_httpd/httpd_basic_auth.sh b/tests/p_httpd/httpd_basic_auth.sh index f7c7ae1..5310b84 100755 --- a/tests/p_httpd/httpd_basic_auth.sh +++ b/tests/p_httpd/httpd_basic_auth.sh @@ -16,7 +16,12 @@ EOF htpasswd -c -b /etc/httpd/htpasswd test test mkdir -p /var/www/html/basic_auth_test echo "Basic authentication Test Page" > /var/www/html/basic_auth_test/index.html -t_ServiceControl httpd reload +t_ServiceControl httpd stop +sleep 3 +killall httpd +sleep 3 +t_ServiceControl httpd start + curl -s -u test:test http://localhost/basic_auth_test/ | grep 'Basic authentication Test Page' > /dev/null 2>&1 t_CheckExitStatus $? diff --git a/tests/p_httpd/httpd_vhost.sh b/tests/p_httpd/httpd_vhost.sh index 0582ed7..317cb14 100755 --- a/tests/p_httpd/httpd_vhost.sh +++ b/tests/p_httpd/httpd_vhost.sh @@ -16,13 +16,18 @@ EOF mkdir -p /var/www/vhosts/test/ echo "Virtual Host Test Page" > /var/www/vhosts/test/index.html -t_ServiceControl httpd reload +t_ServiceControl httpd stop +sleep 3 +killall httpd +sleep 3 +t_ServiceControl httpd start + curl -s http://test/ | grep 'Virtual Host Test Page' > /dev/null 2>&1 t_CheckExitStatus $? # SteveCB: remove vhost-test.conf to prevent later tests # that assume DocumentRoot is /var/www/html from failing -rm /etc/httpd/conf.d/vhost-test.conf +/bin/rm /etc/httpd/conf.d/vhost-test.conf t_ServiceControl httpd stop diff --git a/tests/p_lftp/10_lftp_http_test.sh b/tests/p_lftp/10_lftp_http_test.sh index 40d7b0e..b3d10aa 100755 --- a/tests/p_lftp/10_lftp_http_test.sh +++ b/tests/p_lftp/10_lftp_http_test.sh @@ -3,24 +3,27 @@ # Author: Munish Kumar # Author: Ayush Gupta # Author: Konark Modi +# Christoph Galuschka t_Log "Running $0 - lftp: HTTP test" if [ $SKIP_QA_HARNESS ]; then -CHECK_FOR="UTC" -URL="http://mirror.centos.org/centos//timestamp.txt" + CHECK_FOR="UTC" + URL="http://mirror.centos.org/" + FILE="timestamp.txt" else -CHECK_FOR="UTC" -URL="http://mirror.centos.org/centos//timestamp.txt" + CHECK_FOR="CentOS" + URL="http://repo.centos.qa/CentOS/6/os/x86_64/" + FILE="RELEASE-NOTES-en-US.html" fi -t_Log "Querying ${URL}" +t_Log "Querying ${URL}${FILE}" -lftp << EOF -pget -n 5 ${URL} +lftp < # Author: Ayush Gupta # Author: Konark Modi -FILE=/tmp/test_lftp_ftp.txt +# Christoph Galuschka -if [ $SKIP_QA_HARNESS ]; then -URL="ftp://ftp.freebsd.org/pub/FreeBSD/" -else -URL="ftp://ftp.freebsd.org/pub/FreeBSD/" -fi +t_Log "Running $0 - installing vsFTPd for local lftp test." +t_InstallPackage vsftpd +t_ServiceControl vsftpd restart + +# Destination File +TESTFILE=/tmp/t_functional-lftp-test.txt + +# Source File on FTP server +SOURCE=/var/ftp/ +FILE=lftp-test.txt +cat > $SOURCE$FILE << EOF +t_functional +EOF +URL="ftp://127.0.0.1/" +t_Log "Running $0 - lftp test with local FTP server." -lftp -e 'set net:timeout 10; get README.TXT -o $FILE; bye' $URL > /dev/null 2>&1 -t_Log "Running $0 - lftp test with FTP test." -if [ -f $FILE ] +lftp -e 'set net:timeout 10; get '${FILE}' -o '$TESTFILE' ; bye' $URL > /dev/null 2>&1 +if [ -f $TESTFILE ] then - grep -ci 'konark' $FILE + grep -q 't_functional' $TESTFILE ret_val=$? else t_Log "FTP test for lftp failed" ret_val=$? fi -rm -f $FILE + +# clean up +rm -f $TESTFILE +rm -f $SOURCE$FILE +t_ServiceControl vsftpd stop +t_RemovePackage vsftpd + t_CheckExitStatus $ret_val diff --git a/tests/p_lsof/0-install_lsof.sh b/tests/p_lsof/0-install_lsof.sh new file mode 100755 index 0000000..b49d3ab --- /dev/null +++ b/tests/p_lsof/0-install_lsof.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Author: Madhurranjan Mohaan + +t_Log "Running $0 - installing lsof" + +# Install lsof +t_InstallPackage lsof diff --git a/tests/p_lsof/10-test_lsof.sh b/tests/p_lsof/10-test_lsof.sh new file mode 100755 index 0000000..c881eb7 --- /dev/null +++ b/tests/p_lsof/10-test_lsof.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Author: Madhurranjan Mohaan + +t_Log "Running $0 - testing lsof against ssh port" + +sshd_status=`service sshd status | grep running` +if ! [ "$sshd_status" ] +then + service sshd start +fi +t_InstallPackage openssh-server openssh-clients +t_ServiceControl sshd start + +sshd_port_listening=`lsof -i:22 | grep LISTEN` +if [ "$sshd_port_listening" ] +then + t_Log "Ssh port 22 is in the listening mode" + ret_val=0 +else + ret_val=1 +fi +t_CheckExitStatus $ret_val diff --git a/tests/p_mod_wsgi/mod_wsgi_test.sh b/tests/p_mod_wsgi/mod_wsgi_test.sh index 7b1a9bc..31b99af 100755 --- a/tests/p_mod_wsgi/mod_wsgi_test.sh +++ b/tests/p_mod_wsgi/mod_wsgi_test.sh @@ -23,8 +23,11 @@ def application(environ, start_response): return [output] EOF -t_ServiceControl httpd restart +t_ServiceControl httpd stop sleep 2 +killall httpd +sleep 1 +t_ServiceControl httpd start curl -s http://localhost/tfapp | grep -q 't_functional_mod_wsgi_test' diff --git a/tests/p_perl/0-install_perl.sh b/tests/p_perl/0-install_perl.sh new file mode 100755 index 0000000..3ac8c7e --- /dev/null +++ b/tests/p_perl/0-install_perl.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Author: Madhurranjan Mohaan + +t_Log "Running $0 - installing perl" + +# Install perl +t_InstallPackage perl diff --git a/tests/p_perl/10-test_perl.sh b/tests/p_perl/10-test_perl.sh new file mode 100755 index 0000000..4523964 --- /dev/null +++ b/tests/p_perl/10-test_perl.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# Author: Madhurranjan Mohaan + +# Check perl installation + +t_Log "Running $0 - checking perl installation" + +perl --version &>/dev/null +t_CheckExitStatus $? diff --git a/tests/p_perl/20-run_perl_script.sh b/tests/p_perl/20-run_perl_script.sh new file mode 100755 index 0000000..c1ee3c6 --- /dev/null +++ b/tests/p_perl/20-run_perl_script.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Author: Madhurranjan Mohaan + +t_Log "Running $0 - Testing perl by running it against a basic file" + +echo 'print "helloworld perlpackage"' > testfile +perl testfile + +t_CheckExitStatus $? diff --git a/tests/p_postgresql/0-install_postgresql.sh b/tests/p_postgresql/0-install_postgresql.sh index 3fb42dc..ea5183d 100755 --- a/tests/p_postgresql/0-install_postgresql.sh +++ b/tests/p_postgresql/0-install_postgresql.sh @@ -1,4 +1,7 @@ #!/bin/bash # Author: Athmane Madjoudj +# Christoph Galuschka +t_Log "Running $0 - initializing and starting PostgreSQL" + if (t_GetPkgRel postgresql | grep -q el6) then t_Log "Initialize PostgreSQL DB " diff --git a/tests/p_subversion/0-install_subversion.sh b/tests/p_subversion/0-install_subversion.sh new file mode 100755 index 0000000..5a84e37 --- /dev/null +++ b/tests/p_subversion/0-install_subversion.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Author: Madhurranjan Mohaan + +t_Log "Running $0 - installing subversion" + +# Install subversion subversion +t_InstallPackage subversion diff --git a/tests/p_subversion/10-test_subversion.sh b/tests/p_subversion/10-test_subversion.sh new file mode 100755 index 0000000..be6b0ff --- /dev/null +++ b/tests/p_subversion/10-test_subversion.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# Author: Madhurranjan Mohaan + +# Check subversion installation + +t_Log "Running $0 - checking subversion installation" + +svn --version &>/dev/null +t_CheckExitStatus $? diff --git a/tests/p_subversion/15-test_subversion.sh b/tests/p_subversion/15-test_subversion.sh new file mode 100755 index 0000000..841c721 --- /dev/null +++ b/tests/p_subversion/15-test_subversion.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Author: Madhurranjan Mohaan + +t_Log "Running $0 - testing a local subversion repository creation operation" + +temp_dir="/tmp/svnrepo" +temp_repo="tmprepo" +rm -rf $temp_dir/$temp_repo +mkdir -p $temp_dir +cd $temp_dir +svnadmin create $temp_repo + +#verify repo using svnadmin +if [ "svnadmin verify $temp_dir/$temp_repo | grep 'Verified revision 0'" ] +then + ret_val=0 +else + ret_val=1 +fi +t_CheckExitStatus $ret_val diff --git a/tests/p_tcl/0-install_tcl.sh b/tests/p_tcl/0-install_tcl.sh new file mode 100755 index 0000000..4670ec7 --- /dev/null +++ b/tests/p_tcl/0-install_tcl.sh @@ -0,0 +1,6 @@ +#!/bin/bash +# Author: Madhurranjan Mohaan + +t_Log "$0 - installing Tcl" +t_InstallPackage tcl + diff --git a/tests/p_tcl/10-test_tclsh.sh b/tests/p_tcl/10-test_tclsh.sh new file mode 100755 index 0000000..46511ff --- /dev/null +++ b/tests/p_tcl/10-test_tclsh.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Author: Madhurranjan Mohaan + +t_Log "Running $0 - Testing tclsh by running it with a basic file" + +echo 'puts "helloworld tclpackage"' > testfile +tclsh testfile + +t_CheckExitStatus $? diff --git a/tests/p_tcpdump/tcpdump_eth0.sh b/tests/p_tcpdump/tcpdump_eth0.sh index a091231..c412651 100755 --- a/tests/p_tcpdump/tcpdump_eth0.sh +++ b/tests/p_tcpdump/tcpdump_eth0.sh @@ -22,14 +22,27 @@ if [[ $IP =~ $regex ]] sleep 1 # reading from file, for each ping we should see two pakets WORKING=$( tcpdump -r $FILE | grep -ci icmp ) - # The script will allways work, but if the log does not contain - # what we expect, we will log it - if [ $WORKING == $[COUNT*2] ] + if [ $SKIP_QA_HARNESS ] then + # treat qa-harness and non qa-harness differently, + # the script will always succeed outside qa, but will log results ret_val=0 + if [ $WORKING != $[COUNT*2] ] + then + t_Log "ping to Default-Gateway did not return the number of pakets we expect. "$WORKING" of "$[COUNT*2]" pakets were dumped to file" + else + t_Log "ping to Default-Gateway looks OK. "$WORKING" of "$[COUNT*2]" pakets were dumped to file" + fi else - t_Log "ping to Default-Gateway droped pakets!! Only "$WORKING" of "$[COUNT*2]" entries were found!!" - ret_val=1 + # in qa-harness, which is a controlled environment, the script will fail at odd results + if [ $WORKING == $[COUNT*2] ] + then + t_Log "QA-harness: ping to Default-Gateway looks OK. "$WORKING" of "$[COUNT*2]" pakets were dumped to file" + ret_val=0 + else + t_Log "QA-harness: ping to Default-Gateway droped pakets!! Only "$WORKING" of "$[COUNT*2]" entries were found!!" + ret_val=1 + fi fi else t_Log "No Default-GW found - skiping test" diff --git a/tests/p_telnet/0-install_telnet.sh b/tests/p_telnet/0-install_telnet.sh new file mode 100755 index 0000000..efc877d --- /dev/null +++ b/tests/p_telnet/0-install_telnet.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Author: Madhurranjan Mohaan + +t_Log "Running $0 - installing telnet" + +# Install Telnet +t_InstallPackage telnet diff --git a/tests/p_telnet/10-test_telnet.sh b/tests/p_telnet/10-test_telnet.sh new file mode 100755 index 0000000..5e42684 --- /dev/null +++ b/tests/p_telnet/10-test_telnet.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Author: Madhurranjan Mohaan + +t_Log "Running $0 - testing telnet against ssh port" +t_Log "Making sure port 22 is listening by calling ssh installer" + +t_InstallPackage openssh-server openssh-clients +t_ServiceControl sshd start + +telnet_port_22=`telnet 127.0.0.1 22 << EOH +EOH` +echo $telnet_port_22 | grep "Escape character is '^]'" +t_CheckExitStatus $? diff --git a/tests/z_repoclosure/repoclosure_test.sh b/tests/z_repoclosure/repoclosure_test.sh index d48868e..84ca4fd 100755 --- a/tests/z_repoclosure/repoclosure_test.sh +++ b/tests/z_repoclosure/repoclosure_test.sh @@ -3,19 +3,24 @@ t_Log "Running $0 - repoclosure test ." -t_InstallPackage yum-utils +if [ $SKIP_QA_HARNESS ]; then + t_Log "Skip this test in non QA harness environment" +else -t_Log "Running repoclosure test ..." + t_InstallPackage yum-utils -repoclosure > /tmp/repoclosure.log 2>&1 -grep -q 'unresolved deps' /tmp/repoclosure.log -if [ $? -eq 0 ] ; then - ret_val=1 -else - ret_val=0 -fi + t_Log "Running repoclosure test ..." -# print the output of repoclosure when it fails -[ $ret_val -eq 1 ] && cat /tmp/repoclosure.log + repoclosure > /tmp/repoclosure.log 2>&1 + grep -q 'unresolved deps' /tmp/repoclosure.log + if [ $? -eq 0 ] ; then + ret_val=1 + else + ret_val=0 + fi -t_CheckExitStatus $ret_val + # print the output of repoclosure when it fails + [ $ret_val -eq 1 ] && cat /tmp/repoclosure.log + + t_CheckExitStatus $ret_val +fi diff --git a/utils/cleanup_vm.sh b/utils/cleanup_vm.sh index 04eb748..850a428 100644 --- a/utils/cleanup_vm.sh +++ b/utils/cleanup_vm.sh @@ -49,8 +49,8 @@ for x in `find . -maxdepth 2 -type f -name \*.rpmnew`; do done # Package specific cleanup -# Clean pgsql data dir -/bin/rm -rf /var/lib/pgsql/ +# Clean pgsql data dir on c6 +(rpm -q postgresql | grep -q el6) && /bin/rm -rf /var/lib/pgsql/ # Clean tmp rm -rf /tmp/*