Avoid hard-coded x86_64 arch in tests/basic/rpm.t

tests/basic/rpm.t hard-codes x86_64 to pick the build-root for mock, causing
errors when called from a different architecture. With this patch, we use
'uname -i' to select the right architecture.

v2: Fixed typo as suggested by Justin Clift.

Change-Id: I07bc2af9317dc315bca460149ea3430071537780
BUG: 962169
Signed-off-by: Jose Castillo <jcastillo@redhat.com>
Reviewed-on: http://review.gluster.org/8214
Reviewed-by: Vikhyat Umrao <vumrao@redhat.com>
Reviewed-by: Justin Clift <justin@gluster.org>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
This commit is contained in:
Jose Castillo 2014-07-01 15:51:07 +02:00 committed by Vijay Bellur
parent 5723645715
commit 3df72ddcdb

View File

@ -75,8 +75,8 @@ TEST make dist
# build the glusterfs src.rpm
TEST build_srpm_from_tgz ${PWD}/*.tar.gz
# build for the last two Fedora EPEL releases (x86_64 only)
for MOCK_CONF in $(ls -x1 /etc/mock/*.cfg | egrep -e 'epel-[0-9]+-x86_64.cfg$' | tail -n2)
# even though the last two Fedora EPEL releases are x86_64 only, we allow other arches to build
for MOCK_CONF in $(ls -x1 /etc/mock/*.cfg | egrep -e 'epel-[0-9]+-'`uname -i`'.cfg$' | tail -n2)
do
EPEL_RELEASE=$(basename ${MOCK_CONF} .cfg)
mkdir -p "${PWD}/mock.d/${EPEL_RELEASE}"