From 756949556b3ceb2279f09962ab5789960de86bd3 Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Fri, 31 Oct 2014 09:26:28 +0100 Subject: Regression test portability: mock After some attempts at using mock on NetBSD which pulled a lot of dependencies, it seems that software really assumes the OS is Linux: chrooted build will fail because of missing Linux files. As a result, make tests/basic/rpm.t Linux-only, and remove mock and rpmbuild checks for non Linux systems. BUG: 1129939 Change-Id: Ica2eb74dd23fbec379a26051a8f61b0dfc07a115 Signed-off-by: Emmanuel Dreyfus Reviewed-on: http://review.gluster.org/8949 Tested-by: Gluster Build System Reviewed-by: Niels de Vos --- run-tests.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'run-tests.sh') diff --git a/run-tests.sh b/run-tests.sh index f95c8f978cb..aabf1da159a 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -20,15 +20,18 @@ function check_dependencies() MISSING="$MISSING git" fi - # Check for mock - if [ ! -e /usr/bin/mock ]; then - MISSING="$MISSING mock" - fi + # basic/rpm.t uses mock, which assumes Linux as the OS + if [ "x`uname -s`" = "xLinux" ] ; then + # Check for mock + if [ ! -e /usr/bin/mock ]; then + MISSING="$MISSING mock" + fi - # Check for rpmbuild - env rpmbuild --version > /dev/null 2>&1 - if [ $? -ne 0 ]; then - MISSING="$MISSING rpmbuild" + # Check for rpmbuild + env rpmbuild --version > /dev/null 2>&1 + if [ $? -ne 0 ]; then + MISSING="$MISSING rpmbuild" + fi fi # Check for nfs-utils (Linux-only: built-in NetBSD with different name) -- cgit