From eefa9e3c756bc39e0cdca6081f2051cbbc01e588 Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Jul 11 2011 20:31:43 +0000 Subject: Added a t_DistCheck test to determine the distro and decide what to do (skip/continue for some tests) --- diff --git a/tests/0_lib/functions.sh b/tests/0_lib/functions.sh index 093f176..1be1064 100755 --- a/tests/0_lib/functions.sh +++ b/tests/0_lib/functions.sh @@ -87,6 +87,12 @@ function t_GetPkgRel rpm -q --queryformat '%{RELEASE}' $1 } +# Description: return the distro release (returns 5 or 6 now) +function t_DistCheck +{ + rpm -q --queryformat '%{version}\n' centos-release +} + export -f t_Log export -f t_CheckExitStatus export -f t_InstallPackage @@ -95,3 +101,4 @@ export -f t_Process export -f t_CheckDeps export -f t_ServiceControl export -f t_GetPkgRel +export -f t_DistCheck