From da7c39c16191d05aa4d0d21f8493c2725545b50f Mon Sep 17 00:00:00 2001 From: Ranjib Dey Date: Jul 22 2012 12:02:58 +0000 Subject: Ranjib| adding t_Assert function for common library --- diff --git a/tests/0_lib/functions.sh b/tests/0_lib/functions.sh index de4093c..8643624 100755 --- a/tests/0_lib/functions.sh +++ b/tests/0_lib/functions.sh @@ -115,6 +115,12 @@ function t_GetArch rpm -q --queryformat '%{arch}\n' centos-release } +function t_Assert +{ + $@ >/dev/null 2>&1 + t_CheckExitStatus $? +} + export -f t_Log export -f t_CheckExitStatus export -f t_InstallPackage @@ -126,3 +132,4 @@ export -f t_GetPkgRel export -f t_DistCheck export -f t_GetPkgVer export -f t_GetArch +export -f t_Assert diff --git a/tests/p_0-file/00_file_package.sh b/tests/p_0-file/00_file_package.sh index fecdcb0..402649c 100755 --- a/tests/p_0-file/00_file_package.sh +++ b/tests/p_0-file/00_file_package.sh @@ -2,6 +2,4 @@ t_Log "Running $0 - checking if file package is installed" -rpm -q file > /dev/null 2>&1 - -t_CheckExitStatus $? +t_Assert "rpm -q file"