File obs-server-2.9-0017-dist-Make-tests-respect-INITDDIR-and-SBINDIR-configu.patch of Package obs-server
From c1ce740e29fa4cdbab9fc514ccaa3a07d38fefed Mon Sep 17 00:00:00 2001
From: Oleg Girko <ol@infoserver.lv>
Date: Thu, 14 Jul 2016 13:11:17 +0100
Subject: [PATCH] [dist] Make tests respect INITDDIR and SBINDIR configuration
parameters.
Signed-off-by: Oleg Girko <ol@infoserver.lv>
---
dist/Makefile | 6 +++---
dist/t/0030-installed-files.t | 12 ++++++------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/dist/Makefile b/dist/Makefile
index 4a760266eb..897106f47f 100644
--- a/dist/Makefile
+++ b/dist/Makefile
@@ -112,12 +112,12 @@ install_tests_appliance:
xargs sed -i -e 's|/srv/obs|$(OBS_BACKEND_DATA_DIR)|g'
test_unit:
- prove -v t/*.t
+ INITDDIR=$(INITDDIR) SBINDIR=$(SBINDIR) prove -v t/*.t
test_system:
- prove -v t/*.ts
+ INITDDIR=$(INITDDIR) SBINDIR=$(SBINDIR) prove -v t/*.ts
test_appliance:
- prove -v t/*.ta
+ INITDDIR=$(INITDDIR) SBINDIR=$(SBINDIR) prove -v t/*.ta
.PHONY: test_unit test_system
diff --git a/dist/t/0030-installed-files.t b/dist/t/0030-installed-files.t
index 94974a4325..d1bca663ad 100644
--- a/dist/t/0030-installed-files.t
+++ b/dist/t/0030-installed-files.t
@@ -9,10 +9,10 @@ export BASH_TAP_ROOT=$(dirname $0)
plan tests 7
for i in \
$DESTDIR/etc/logrotate.d/obs-server\
- $DESTDIR/etc/init.d/obssrcserver\
- $DESTDIR/etc/init.d/obsdodup\
- $DESTDIR/usr/sbin/obs_admin\
- $DESTDIR/usr/sbin/obs_serverstatus
+ $DESTDIR$INITDDIR/obssrcserver\
+ $DESTDIR$INITDDIR/obsdodup\
+ $DESTDIR$SBINDIR/obs_admin\
+ $DESTDIR$SBINDIR/obs_serverstatus
do
[[ -e $i ]]
is $? 0 "Checking $i"
@@ -20,8 +20,8 @@ do
done
for i in \
- $DESTDIR/usr/sbin/rcobssrcserver\
- $DESTDIR/usr/sbin/rcobsdodup
+ $DESTDIR$SBINDIR/rcobssrcserver\
+ $DESTDIR$SBINDIR/rcobsdodup
do
[[ -L $i ]]
is $? 0 "Checking $i"
--
2.20.1