Skip to contentSkip to conversation

master - tests: add profiles-thin and prepare_profiles helper fn

PATCH Peter Rajnoha 1 participant 1 message Apr 1, 2014

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=504c328e3d2c0a8b6b946fe7d323e1f28887e285
Commit:        504c328e3d2c0a8b6b946fe7d323e1f28887e285
Parent:        af73a0a5189c7d6abf6798952224dfe1b93d00d1
Author:        Peter Rajnoha <[email protected]>
AuthorDate:    Tue Apr 1 15:51:46 2014 +0200
Committer:     Peter Rajnoha <[email protected]>
CommitterDate: Tue Apr 1 15:52:54 2014 +0200

tests: add profiles-thin and prepare_profiles helper fn

---
 test/Makefile.in            |    2 +
 test/lib/aux.sh             |    8 ++++++
 test/shell/profiles-thin.sh |   56 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 66 insertions(+), 0 deletions(-)
test/Makefile.in +2 -0
index fe33949..7253bb4 100644
@@ -177,6 +177,8 @@ CMDS = lvm $(shell cat $(top_builddir)/tools/.commands)
 	ln -fs $(abs_top_builddir)/daemons/lvmetad/lvmetad lib/lvmetad
 	ln -fs $(abs_top_srcdir)/scripts/vgimportclone.sh lib/vgimportclone
 	ln -fs $(abs_top_srcdir)/scripts/fsadm.sh lib/fsadm
+	ln -fs $(abs_top_srcdir)/conf/default.profile lib/default.profile
+	ln -fs $(abs_top_srcdir)/conf/thin-performance.profile lib/thin-performance.profile
 	touch $@
 
 clean:
test/lib/aux.sh +8 -0
index aa4c7a6..76cfd82 100644
@@ -632,6 +632,14 @@ profileconf() {
 	mv -f PROFILE_$profile_name etc/profile/$profile_name.profile
 }
 
+prepare_profiles() {
+	test -d etc/profile || mkdir etc/profile
+	for profile_name in $@; do
+		test -L "$abs_top_builddir/test/lib/$profile_name.profile" || skip
+		cp "$abs_top_builddir/test/lib/$profile_name.profile" "etc/profile/$profile_name.profile"
+	done
+}
+
 apitest() {
 	local t=$1
 	shift
test/shell/profiles-thin.sh new file +56 -0

56 lines not on this page · raw message