From 549b58d56125706ed90879ae9cfa19b6e93a00b9 Mon Sep 17 00:00:00 2001 From: Athmane Madjoudj Date: Jul 11 2011 20:43:56 +0000 Subject: Add t_GetPkgVer helper function --- diff --git a/tests/0_lib/functions.sh b/tests/0_lib/functions.sh index 1be1064..ffbbbf9 100755 --- a/tests/0_lib/functions.sh +++ b/tests/0_lib/functions.sh @@ -93,6 +93,12 @@ function t_DistCheck rpm -q --queryformat '%{version}\n' centos-release } +# Description: Get a package (rpm) version number +function t_GetPkgVer +{ + rpm -q --queryformat '%{version}' $1 +} + export -f t_Log export -f t_CheckExitStatus export -f t_InstallPackage @@ -102,3 +108,4 @@ export -f t_CheckDeps export -f t_ServiceControl export -f t_GetPkgRel export -f t_DistCheck +export -f t_GetPkgVer