From b7ff319edc704d528703f535c2c51a354ceab713 Mon Sep 17 00:00:00 2001 From: Boris Ranto Date: Fri, 7 Sep 2012 14:25:42 +0200 Subject: [PATCH] Fix the installation script This patch will recursively call Makefiles of tests subdirectories. All the [0-9]??{,.*} files are installed and all the group files are installed --- Makefile | 9 ++----- tests/Makefile | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/btrfs/Makefile | 27 +++++++++++++++++++++++++ tests/ext4/Makefile | 27 +++++++++++++++++++++++++ tests/generic/Makefile | 27 +++++++++++++++++++++++++ tests/shared/Makefile | 27 +++++++++++++++++++++++++ tests/udf/Makefile | 27 +++++++++++++++++++++++++ tests/xfs/Makefile | 27 +++++++++++++++++++++++++ 8 files changed, 215 insertions(+), 6 deletions(-) create mode 100644 tests/Makefile create mode 100644 tests/btrfs/Makefile create mode 100644 tests/ext4/Makefile create mode 100644 tests/generic/Makefile create mode 100644 tests/shared/Makefile create mode 100644 tests/udf/Makefile create mode 100644 tests/xfs/Makefile diff --git a/Makefile b/Makefile index 1490e21..235e8ec 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,6 @@ ifeq ($(HAVE_BUILDDEFS), yes) include $(TOPDIR)/include/builddefs endif -TESTS = $(shell sed -n -e '/^[0-9][0-9][0-9]*/s/ .*//p' group) CONFIGURE = configure include/builddefs include/config.h LSRCFILES = configure configure.in aclocal.m4 README VERSION LDIRT = config.log .ltdep .dep config.status config.cache confdefs.h \ @@ -48,13 +47,14 @@ LDIRT = config.log .ltdep .dep config.status config.cache confdefs.h \ LIB_SUBDIRS = include lib TOOL_SUBDIRS = ltp src m4 +TESTS_SUBDIRS = tests ifeq ($(HAVE_DMAPI), true) TOOL_SUBDIRS += dmapi endif -SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) +SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) $(TESTS_SUBDIRS) -default: include/builddefs $(DMAPI_MAKEFILE) $(TESTS) +default: include/builddefs $(DMAPI_MAKEFILE) ifeq ($(HAVE_BUILDDEFS), no) $(Q)$(MAKE) $(MAKEOPTS) $@ else @@ -87,11 +87,8 @@ depend: include/builddefs $(addsuffix -depend,$(SUBDIRS)) install: default $(addsuffix -install,$(SUBDIRS)) $(INSTALL) -m 755 -d $(PKG_LIB_DIR) $(INSTALL) -m 755 check $(PKG_LIB_DIR) - $(INSTALL) -m 755 [0-9]?? $(PKG_LIB_DIR) - $(INSTALL) -m 755 run.* $(PKG_LIB_DIR) $(INSTALL) -m 644 group $(PKG_LIB_DIR) $(INSTALL) -m 644 randomize.awk $(PKG_LIB_DIR) - $(INSTALL) -m 644 [0-9]??.* $(PKG_LIB_DIR) $(INSTALL) -m 644 common* $(PKG_LIB_DIR) # Nothing. diff --git a/tests/Makefile b/tests/Makefile new file mode 100644 index 0000000..0d374f4 --- /dev/null +++ b/tests/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. +# + +TOPDIR = .. +include $(TOPDIR)/include/builddefs + +ifeq ("$(origin V)", "command line") + BUILD_VERBOSE = $(V) +endif +ifndef BUILD_VERBOSE + BUILD_VERBOSE = 0 +endif + +ifeq ($(BUILD_VERBOSE),1) + Q = +else + Q = @ +endif + +MAKEOPTS = --no-print-directory Q=$(Q) + +SUBDIRS = btrfs ext4 generic shared udf xfs + +# Nothing +all: + +# Just call everything important +install: dir $(addsuffix -install,$(SUBDIRS)) + +dir: + $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/tests + +%-install: + $(MAKE) $(MAKEOPTS) -C $* install diff --git a/tests/btrfs/Makefile b/tests/btrfs/Makefile new file mode 100644 index 0000000..8d1f9f2 --- /dev/null +++ b/tests/btrfs/Makefile @@ -0,0 +1,27 @@ +# +# Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. +# + +TOPDIR=../.. +include $(TOPDIR)/include/builddefs + +install: + $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/tests/btrfs + $(INSTALL) -m 755 [0-9]?? $(PKG_LIB_DIR)/tests/btrfs + $(INSTALL) -m 755 [0-9]??.* $(PKG_LIB_DIR)/tests/btrfs + $(INSTALL) -m 755 group $(PKG_LIB_DIR)/tests/btrfs diff --git a/tests/ext4/Makefile b/tests/ext4/Makefile new file mode 100644 index 0000000..3a27425 --- /dev/null +++ b/tests/ext4/Makefile @@ -0,0 +1,27 @@ +# +# Copyright (C) Red Hat, Inc. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. +# + +TOPDIR=../../ +include $(TOPDIR)/include/builddefs + +install: + $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/tests/ext4 + $(INSTALL) -m 755 [0-9]?? $(PKG_LIB_DIR)/tests/ext4 + $(INSTALL) -m 755 [0-9]??.* $(PKG_LIB_DIR)/tests/ext4 + $(INSTALL) -m 755 group $(PKG_LIB_DIR)/tests/ext4 diff --git a/tests/generic/Makefile b/tests/generic/Makefile new file mode 100644 index 0000000..6529393 --- /dev/null +++ b/tests/generic/Makefile @@ -0,0 +1,27 @@ +# +# Copyright (C) Red Hat, Inc. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. +# + +TOPDIR=../../ +include $(TOPDIR)/include/builddefs + +install: + $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/tests/generic + $(INSTALL) -m 755 [0-9]?? $(PKG_LIB_DIR)/tests/generic + $(INSTALL) -m 755 [0-9]??.* $(PKG_LIB_DIR)/tests/generic + $(INSTALL) -m 755 group $(PKG_LIB_DIR)/tests/generic diff --git a/tests/shared/Makefile b/tests/shared/Makefile new file mode 100644 index 0000000..432ba7c --- /dev/null +++ b/tests/shared/Makefile @@ -0,0 +1,27 @@ +# +# Copyright (C) Red Hat, Inc. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. +# + +TOPDIR=../../ +include $(TOPDIR)/include/builddefs + +install: + $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/tests/shared + $(INSTALL) -m 755 [0-9]?? $(PKG_LIB_DIR)/tests/shared + $(INSTALL) -m 755 [0-9]??.* $(PKG_LIB_DIR)/tests/shared + $(INSTALL) -m 755 group $(PKG_LIB_DIR)/tests/shared diff --git a/tests/udf/Makefile b/tests/udf/Makefile new file mode 100644 index 0000000..b34a144 --- /dev/null +++ b/tests/udf/Makefile @@ -0,0 +1,27 @@ +# +# Copyright (C) Red Hat, Inc. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. +# + +TOPDIR=../../ +include $(TOPDIR)/include/builddefs + +install: + $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/tests/udf + $(INSTALL) -m 755 [0-9]?? $(PKG_LIB_DIR)/tests/udf + $(INSTALL) -m 755 [0-9]??.* $(PKG_LIB_DIR)/tests/udf + $(INSTALL) -m 755 group $(PKG_LIB_DIR)/tests/udf diff --git a/tests/xfs/Makefile b/tests/xfs/Makefile new file mode 100644 index 0000000..dc4778f --- /dev/null +++ b/tests/xfs/Makefile @@ -0,0 +1,27 @@ +# +# Copyright (C) Red Hat, Inc. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. +# + +TOPDIR=../../ +include $(TOPDIR)/include/builddefs + +install: + $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/tests/xfs + $(INSTALL) -m 755 [0-9]?? $(PKG_LIB_DIR)/tests/xfs + $(INSTALL) -m 755 [0-9]??.* $(PKG_LIB_DIR)/tests/xfs + $(INSTALL) -m 755 group $(PKG_LIB_DIR)/tests/xfs -- 1.7.1