From fbf04186c329fbcb5aff38962b7154ba54f2c304 Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Oct 12 2011 12:21:53 +0000 Subject: Added the CR repo, disabled by default. TODO : work on the provision script to launch or not the t_functional tests against CR --- diff --git a/tests/0_common/00_qa_repo_config.sh b/tests/0_common/00_qa_repo_config.sh index 4b51a31..3d28368 100755 --- a/tests/0_common/00_qa_repo_config.sh +++ b/tests/0_common/00_qa_repo_config.sh @@ -6,6 +6,8 @@ t_Log "Running $0 - modifying yum repositories for QA purposes." #mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.disabled sed -i s#gpgcheck=1#gpgcheck=1\\nenabled=0#g /etc/yum.repos.d/CentOS-Base.repo + + cat << EOF > /etc/yum.repos.d/CentOS-QA.repo [QA-base] @@ -13,28 +15,36 @@ name=CentOS-\$releasever - OS baseurl=http://repo.centos.qa/srv/CentOS/\$releasever/os/\$basearch/ gpgcheck=0 enabled=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 +igpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-\$releasever [QA-updates] name=CentOS-\$releasever - Updates baseurl=http://repo.centos.qa/srv/CentOS/\$releasever/updates/\$basearch/ gpgcheck=0 enabled=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-\$releasever [QA-extras] name=CentOS-\$releasever - Extras baseurl=http://repo.centos.qa/srv/CentOS/\$releasever/extras/\$basearch/ gpgcheck=0 enabled=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-\$releasever [qa-centosplus] -name=CentOS-$releasever - CentOSPlus +name=CentOS-\$releasever - CentOSPlus baseurl=http://repo.centos.qa/srv/CentOS/\$releasever/centosplus/\$basearch/ gpgcheck=0 enabled=0 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-\$releasever + +[qa-cr] +name=CentOS-\$releasever - CR +baseurl=http://repo.centos.qa/srv/CentOS/\$releasever/centosplus/\$basearch/ +gpgcheck=1 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-\$releasever + EOF diff --git a/tests/0_lib/functions.sh b/tests/0_lib/functions.sh index ffbbbf9..0c12a0b 100755 --- a/tests/0_lib/functions.sh +++ b/tests/0_lib/functions.sh @@ -99,6 +99,11 @@ function t_GetPkgVer rpm -q --queryformat '%{version}' $1 } +# Description: get the arch +function t_GetArch{ + rpm -q --queryformat '%{arch}\n' centos-release +} + export -f t_Log export -f t_CheckExitStatus export -f t_InstallPackage @@ -109,3 +114,4 @@ export -f t_ServiceControl export -f t_GetPkgRel export -f t_DistCheck export -f t_GetPkgVer +export -f t_GetArch