From 518cc31bd2c7c828bde88d89cf015cc129d1f4e9 Mon Sep 17 00:00:00 2001 From: vivekd Date: Jul 22 2012 11:30:22 +0000 Subject: Merge branch 'master' of https://nazar.karan.org/git/deopsdaysindia --- diff --git a/runtests.sh b/runtests.sh index a5e8427..addf7d4 100755 --- a/runtests.sh +++ b/runtests.sh @@ -19,10 +19,14 @@ set -e set -u # process our test scripts -t_Process <(/usr/bin/find ./tests/0_*/ -type f|sort -t'/' ) -t_Process <(/usr/bin/find ./tests/p_*/ -type f|sort -t'/' ) -t_Process <(/usr/bin/find ./tests/r_*/ -type f|sort -t'/' ) -t_Process <(/usr/bin/find ./tests/z_*/ -type f|sort -t'/' ) +if [ $1 ]; then + t_Process tests/$1 +else + t_Process <(/usr/bin/find ./tests/0_*/ -type f|sort -t'/' ) + t_Process <(/usr/bin/find ./tests/p_*/ -type f|sort -t'/' ) + t_Process <(/usr/bin/find ./tests/r_*/ -type f|sort -t'/' ) + t_Process <(/usr/bin/find ./tests/z_*/ -type f|sort -t'/' ) +fi # and, we're done. t_Log "QA t_functional tests finished." diff --git a/tests/0_ruby/0-install-ruby.sh b/tests/0_ruby/0-install-ruby.sh new file mode 100755 index 0000000..42ecd58 --- /dev/null +++ b/tests/0_ruby/0-install-ruby.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# Author: White team + +t_Log "Running $0 - attempting to install openssl." +t_InstallPackage ruby +t_InstallPackage ruby-irb + + diff --git a/tests/0_ruby/10-ruby-installed-test.sh b/tests/0_ruby/10-ruby-installed-test.sh new file mode 100755 index 0000000..cf3783e --- /dev/null +++ b/tests/0_ruby/10-ruby-installed-test.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# Author: Nikhil Lanjewar +# Author: Sahil Muthoo +# Author: Sahil Aggarwal +# Author: Saager Mhatre + +t_Log "Running $0 - Check successful installation of ruby." +ruby -v +t_CheckExitStatus $? + diff --git a/tests/0_ruby/20-ruby-version-test.sh b/tests/0_ruby/20-ruby-version-test.sh new file mode 100755 index 0000000..94bef97 --- /dev/null +++ b/tests/0_ruby/20-ruby-version-test.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# Author: Nikhil Lanjewar +# Author: Sahil Muthoo +# Author: Sahil Aggarwal +# Author: Saager Mhatre + +t_Log "Running $0 - Check successful installation of ruby." +ruby -v | grep -q '1.8.7' +t_CheckExitStatus $? + diff --git a/tests/0_ruby/30-irb-test.sh b/tests/0_ruby/30-irb-test.sh new file mode 100755 index 0000000..53e09d8 --- /dev/null +++ b/tests/0_ruby/30-irb-test.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# Author: Nikhil Lanjewar +# Author: Sahil Muthoo +# Author: Sahil Aggarwal +# Author: Saager Mhatre + +t_Log "Running $0 - Check successful installation of irb." + +irb -v | grep '0.9.5' + +t_CheckExitStatus $? + diff --git a/tests/p_0-bc/0-install_bc.sh b/tests/p_0-bc/0-install_bc.sh new file mode 100755 index 0000000..2107276 --- /dev/null +++ b/tests/p_0-bc/0-install_bc.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# Author : Varadharajan M +# Manoj Mahalingam +t_InstallPackage bc +t_CheckExitStatus $? diff --git a/tests/p_0-bc/bc-test-basic-functionalities.sh b/tests/p_0-bc/bc-test-basic-functionalities.sh new file mode 100644 index 0000000..716b9a1 --- /dev/null +++ b/tests/p_0-bc/bc-test-basic-functionalities.sh @@ -0,0 +1,6 @@ +#!/bin/bash +# Author : Varadharajan M +# Manoj Mahalingam + +t_Log "Running $0 - Testing basic bc functionalities" +test `echo "5 + 6 * 5 / 10 - 1" | bc` -eq "7" ; t_CheckExitStatus $? diff --git a/tests/p_0-bc/bc-test-installation.sh b/tests/p_0-bc/bc-test-installation.sh new file mode 100644 index 0000000..a58d7a1 --- /dev/null +++ b/tests/p_0-bc/bc-test-installation.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# Author : Varadharajan M +# Manoj Mahalingam + + +t_Log "Running $0 - Test bc is installed" +bc --version +t_CheckExitStatus $? diff --git a/tests/p_0-file/00_file_package.sh b/tests/p_0-file/00_file_package.sh new file mode 100644 index 0000000..fecdcb0 --- /dev/null +++ b/tests/p_0-file/00_file_package.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +t_Log "Running $0 - checking if file package is installed" + +rpm -q file > /dev/null 2>&1 + +t_CheckExitStatus $? diff --git a/tests/p_0-file/01_file_mime_application.sh b/tests/p_0-file/01_file_mime_application.sh new file mode 100644 index 0000000..6645fa5 --- /dev/null +++ b/tests/p_0-file/01_file_mime_application.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +t_Log "Running $0 - checking if file can recognixe mime executable type " + +file /bin/bash --mime-type | grep "application/x-executable" + +t_CheckExitStatus $? diff --git a/tests/p_0-file/02_file_mime_image.sh b/tests/p_0-file/02_file_mime_image.sh new file mode 100644 index 0000000..bae423e --- /dev/null +++ b/tests/p_0-file/02_file_mime_image.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +t_Log "Running $0 - checking if file can recognize image mime file type " + +file /usr/lib/anaconda-runtime/boot/syslinux-splash.png --mime-type | grep 'image/png' + +t_CheckExitStatus $? + diff --git a/tests/p_0-file/03_file_mime_symlink.sh b/tests/p_0-file/03_file_mime_symlink.sh new file mode 100644 index 0000000..e8c3211 --- /dev/null +++ b/tests/p_0-file/03_file_mime_symlink.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +t_Log "Running $0 - checking if file can recognize symlink mime file type " + +file /etc/favicon.png --mime-type | grep 'application/x-symlink' + +t_CheckExitStatus $?