xfstests: make install support common/ and tests/ dirs
PATCH 1/1 xfstests: make install support common/ and tests/ dirs
xfstests have some change on the organization of the testcases and common* files:
* The common* scripts have been reorganized into the common/ dir.
* The testcases have been reorganized into sub test dirs under tests/.
* The run.* scripts have been removed.
This patch uses the simple way to make install support above changes:
Make up one Makefile for each newly created subdirs, which can control 'make install' separately.
--- Makefile | 11 +++++------ common/Makefile | 17 +++++++++++++++++ tests/Makefile | 23 +++++++++++++++++++++++ tests/btrfs/Makefile | 21 +++++++++++++++++++++ tests/ext4/Makefile | 21 +++++++++++++++++++++ tests/generic/Makefile | 21 +++++++++++++++++++++ tests/shared/Makefile | 21 +++++++++++++++++++++ tests/udf/Makefile | 21 +++++++++++++++++++++ tests/xfs/Makefile | 21 +++++++++++++++++++++ 9 files changed, 171 insertions(+), 6 deletions(-) create mode 100644 common/Makefile 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
Makefile +5 -6
@@ -52,12 +52,15 @@ LDIRT += $(SRCTAR) endif LIB_SUBDIRS = include lib -TOOL_SUBDIRS = ltp src m4 +TOOL_SUBDIRS = ltp src m4 common ifeq ($(HAVE_DMAPI), true) TOOL_SUBDIRS += dmapi endif -SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) +# all the tests have been put into tests/ +TESTS_SUBDIR = tests + +SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) $(TESTS_SUBDIR) default: include/builddefs $(DMAPI_MAKEFILE) $(TESTS) ifeq ($(HAVE_BUILDDEFS), no)
@@ -91,12 +94,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. install-dev install-lib:
common/Makefile new file +17 -0
@@ -0,0 +1,17 @@ +# +# Copyright (c) 2003-2006 Silicon Graphics, Inc. All Rights Reserved. +# + +TOPDIR = .. +include $(TOPDIR)/include/builddefs + +# current ../common dir +COMMON_SUBDIR = common + +include $(BUILDRULES) + +install: + $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/$(COMMON_SUBDIR) + $(INSTALL) -m 644 * $(PKG_LIB_DIR)/$(COMMON_SUBDIR) + +install-dev install-lib:
tests/Makefile new file +23 -0
@@ -0,0 +1,23 @@ +# +# Copyright (c) 2003-2005 Silicon Graphics, Inc. All Rights Reserved. +# + +TOPDIR = .. +include $(TOPDIR)/include/builddefs + +# current ../tests dir +TESTS_SUBDIR = tests +export TESTS_SUBDIR + +TESTS_SUBDIRS = btrfs ext4 generic shared udf xfs + +include $(BUILDRULES) + +install: $(addsuffix -install,$(TESTS_SUBDIRS)) + $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/$(TESTS_SUBDIR) + +# Nothing. +install-dev install-lib: + +%-install: + $(MAKE) $(MAKEOPTS) -C $* install
tests/btrfs/Makefile new file +21 -0
@@ -0,0 +1,21 @@ +# +# Copyright (c) 2003-2005 Silicon Graphics, Inc. All Rights Reserved. +# + +TOPDIR = ../.. +include $(TOPDIR)/include/builddefs + +# ../tests/btrfs dir +BTRFS_SUBDIR = btrfs +TARGET_SUBDIR = $(PKG_LIB_DIR)/$(TESTS_SUBDIR)/$(BTRFS_SUBDIR) + +include $(BUILDRULES) + +install: + $(INSTALL) -m 755 -d $(TARGET_SUBDIR) + $(INSTALL) -m 755 [0-9]?? $(TARGET_SUBDIR) + $(INSTALL) -m 644 group $(TARGET_SUBDIR) + $(INSTALL) -m 644 [0-9]??.* $(TARGET_SUBDIR) + +# Nothing. +install-dev install-lib:
tests/ext4/Makefile new file +21 -0
@@ -0,0 +1,21 @@ +# +# Copyright (c) 2003-2005 Silicon Graphics, Inc. All Rights Reserved. +# + +TOPDIR = ../.. +include $(TOPDIR)/include/builddefs + +# ../tests/ext4 dir +EXT4_SUBDIR = ext4 +TARGET_SUBDIR = $(PKG_LIB_DIR)/$(TESTS_SUBDIR)/$(EXT4_SUBDIR) + +include $(BUILDRULES) + +install: + $(INSTALL) -m 755 -d $(TARGET_SUBDIR) + $(INSTALL) -m 755 [0-9]?? $(TARGET_SUBDIR) + $(INSTALL) -m 644 group $(TARGET_SUBDIR) + $(INSTALL) -m 644 [0-9]??.* $(TARGET_SUBDIR) + +# Nothing. +install-dev install-lib:
tests/generic/Makefile new file +21 -0
@@ -0,0 +1,21 @@ +# +# Copyright (c) 2003-2005 Silicon Graphics, Inc. All Rights Reserved. +# + +TOPDIR = ../.. +include $(TOPDIR)/include/builddefs + +# ../tests/generic dir +GENERIC_SUBDIR = generic +TARGET_SUBDIR = $(PKG_LIB_DIR)/$(TESTS_SUBDIR)/$(GENERIC_SUBDIR) + +include $(BUILDRULES) + +install: + $(INSTALL) -m 755 -d $(TARGET_SUBDIR) + $(INSTALL) -m 755 [0-9]?? $(TARGET_SUBDIR) + $(INSTALL) -m 644 group $(TARGET_SUBDIR) + $(INSTALL) -m 644 [0-9]??.* $(TARGET_SUBDIR) + +# Nothing. +install-dev install-lib:
tests/shared/Makefile new file +21 -0
@@ -0,0 +1,21 @@ +# +# Copyright (c) 2003-2005 Silicon Graphics, Inc. All Rights Reserved. +# + +TOPDIR = ../.. +include $(TOPDIR)/include/builddefs + +# ../tests/shared dir +SHARED_SUBDIR = shared +TARGET_SUBDIR = $(PKG_LIB_DIR)/$(TESTS_SUBDIR)/$(SHARED_SUBDIR) + +include $(BUILDRULES) + +install: + $(INSTALL) -m 755 -d $(TARGET_SUBDIR) + $(INSTALL) -m 755 [0-9]?? $(TARGET_SUBDIR) + $(INSTALL) -m 644 group $(TARGET_SUBDIR) + $(INSTALL) -m 644 [0-9]??.* $(TARGET_SUBDIR) + +# Nothing. +install-dev install-lib:
tests/udf/Makefile new file +21 -0
@@ -0,0 +1,21 @@ +# +# Copyright (c) 2003-2005 Silicon Graphics, Inc. All Rights Reserved. +# + +TOPDIR = ../.. +include $(TOPDIR)/include/builddefs + +# ../tests/udf dir +UDF_SUBDIR = udf +TARGET_SUBDIR = $(PKG_LIB_DIR)/$(TESTS_SUBDIR)/$(UDF_SUBDIR) + +include $(BUILDRULES) + +install: + $(INSTALL) -m 755 -d $(TARGET_SUBDIR) + $(INSTALL) -m 755 [0-9]?? $(TARGET_SUBDIR) + $(INSTALL) -m 644 group $(TARGET_SUBDIR) + $(INSTALL) -m 644 [0-9]??.* $(TARGET_SUBDIR) + +# Nothing. +install-dev install-lib:
tests/xfs/Makefile new file +21 -0
@@ -0,0 +1,21 @@ +# +# Copyright (c) 2003-2005 Silicon Graphics, Inc. All Rights Reserved. +# + +TOPDIR = ../.. +include $(TOPDIR)/include/builddefs + +# ../tests/xfs dir +XFS_SUBDIR = xfs +TARGET_SUBDIR = $(PKG_LIB_DIR)/$(TESTS_SUBDIR)/$(XFS_SUBDIR) + +include $(BUILDRULES) + +install: + $(INSTALL) -m 755 -d $(TARGET_SUBDIR) + $(INSTALL) -m 755 [0-9]?? $(TARGET_SUBDIR) + $(INSTALL) -m 644 group $(TARGET_SUBDIR) + $(INSTALL) -m 644 [0-9]??.* $(TARGET_SUBDIR) + +# Nothing. +install-dev install-lib:
Signature · 6 lines
1.7.12.4 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Wang Sheng-Hui,
The patch to Makefile would not apply. This is what I used to review.
Makefile +5 -7
@@ -52,12 +52,15 @@ LDIRT += $(SRCTAR) endif LIB_SUBDIRS = include lib -TOOL_SUBDIRS = ltp src m4 +TOOL_SUBDIRS = ltp src m4 common ifeq ($(HAVE_DMAPI), true) TOOL_SUBDIRS += dmapi endif -SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) +# all the tests have been put into tests/ +TESTS_SUBDIR = tests + +SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) $(TESTS_SUBDIR) default: include/builddefs $(DMAPI_MAKEFILE) $(TESTS) ifeq ($(HAVE_BUILDDEFS), no)
@@ -91,12 +94,7 @@ 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. install-dev install-lib:
Here is your original:
Quoted 23 lines
Makefile +5
-2@@ -52,12 +52,15 @@ LDIRT += $(SRCTAR) endif LIB_SUBDIRS = include lib -TOOL_SUBDIRS = ltp src m4 +TOOL_SUBDIRS = ltp src m4 common ifeq ($(HAVE_DMAPI), true) TOOL_SUBDIRS += dmapi endif -SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) +# all the tests have been put into tests/ +TESTS_SUBDIR = tests + +SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) $(TESTS_SUBDIR) default: include/builddefs $(DMAPI_MAKEFILE) $(TESTS) ifeq ($(HAVE_BUILDDEFS), no)
Makefile depend: include/builddefs $(addsuffix · line 97
Quoted 7 lines
Makefile +0
-3@@ -91,12 +94,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)
oops somehow the above line was not deleted
Makefile depend: include/builddefs $(addsuffix
Quoted 6 lines
Makefile +0
-2$(INSTALL) -m 644 randomize.awk $(PKG_LIB_DIR) - $(INSTALL) -m 644 [0-9]??.* $(PKG_LIB_DIR) - $(INSTALL) -m 644 common* $(PKG_LIB_DIR) # Nothing. install-dev install-lib:
The rest of the patch looked good. If you agree with my slight mod then I will put my Reviewed-by and commit it.
Thanks
--Rich
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 27 lines · Rich Johnston
Wang Sheng-Hui,
The patch to
Makefilewould not apply. This is what I used to review.Makefile +5
-2@@ -52,12 +52,15 @@ LDIRT += $(SRCTAR) endif LIB_SUBDIRS = include lib -TOOL_SUBDIRS = ltp src m4 +TOOL_SUBDIRS = ltp src m4 common ifeq ($(HAVE_DMAPI), true) TOOL_SUBDIRS += dmapi endif -SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) +# all the tests have been put into tests/ +TESTS_SUBDIR = tests + +SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) $(TESTS_SUBDIR) default: include/builddefs $(DMAPI_MAKEFILE) $(TESTS) ifeq ($(HAVE_BUILDDEFS), no)
Makefile depend: include/builddefs $(addsuffix -depend,$(SUBDIRS)) · line 96
Quoted 6 lines
Makefile +0
-3@@ -91,12 +94,7 @@ 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)
Hi Rich,
This is the different point.
When I scratched the patch against the xfstests( pulled from the git tree, should be the latest, I think), there is one file "group" under the topdir.
.../xfstests$ pwd
.../xfstests
.../xfstests$ ls | grep group
group
.../xfstests$ cat group
# QA groups control file
# Defines test groups and nominal group owners # - do not start group names with a digit
# - comment line before each group is "new" description #
The top "group" file is useless, I think.
Will you please help fixup the patch?
Thanks for your support!
Regards,
Sheng-Hui
Quoted 44 lines
Makefile +0
-2$(INSTALL) -m 644 randomize.awk $(PKG_LIB_DIR) - $(INSTALL) -m 644 [0-9]??.* $(PKG_LIB_DIR) - $(INSTALL) -m 644 common* $(PKG_LIB_DIR) # Nothing. install-dev install-lib:Here is your original:
Quoted 23 lines
Makefile +5
-2@@ -52,12 +52,15 @@ LDIRT += $(SRCTAR) endif LIB_SUBDIRS = include lib -TOOL_SUBDIRS = ltp src m4 +TOOL_SUBDIRS = ltp src m4 common ifeq ($(HAVE_DMAPI), true) TOOL_SUBDIRS += dmapi endif -SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) +# all the tests have been put into tests/ +TESTS_SUBDIR = tests + +SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) $(TESTS_SUBDIR) default: include/builddefs $(DMAPI_MAKEFILE) $(TESTS) ifeq ($(HAVE_BUILDDEFS), no)Makefile depend: include/builddefs $(addsuffix · line 97
Quoted 7 lines
Makefile +0
-3@@ -91,12 +94,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)oops somehow the above line was not deleted
Quoted 4 lines
Makefile +0
-2$(INSTALL) -m 644 randomize.awk $(PKG_LIB_DIR) - $(INSTALL) -m 644 [0-9]??.* $(PKG_LIB_DIR) - $(INSTALL) -m 644 common* $(PKG_LIB_DIR)
Quoted 7 lines
Makefile depend: include/builddefs $(addsuffix -depend,$(SUBDIRS)) · line 100
Quoted 2 lines
Makefile +0
-0# Nothing. install-dev install-lib:The rest of the patch looked good. If you agree with my slight mod then I will put my Reviewed-by and commit it.
Thanks
--Rich
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 9 lines · Wang Sheng-Hui
xfstests have some change on the organization of the testcases and common* files:
* The common* scripts have been reorganized into the common/ dir.
* The testcases have been reorganized into sub test dirs under tests/.
* The run.* scripts have been removed.This patch uses the simple way to make install support above changes:
Make up oneMakefilefor each newly created subdirs, which can control 'make install' separately.
Thanks for doing this!
Comments below.
Quoted 28 lines
Signed-off-by Wang Sheng-Hui <[email protected]>--- Makefile | 11 +++++------ common/Makefile | 17 +++++++++++++++++ tests/Makefile | 23 +++++++++++++++++++++++ tests/btrfs/Makefile | 21 +++++++++++++++++++++ tests/ext4/Makefile | 21 +++++++++++++++++++++ tests/generic/Makefile | 21 +++++++++++++++++++++ tests/shared/Makefile | 21 +++++++++++++++++++++ tests/udf/Makefile | 21 +++++++++++++++++++++ tests/xfs/Makefile | 21 +++++++++++++++++++++ 9 files changed, 171 insertions(+), 6 deletions(-) create mode 100644 common/Makefile 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/MakefileMakefile +0
-0@@ -52,12 +52,15 @@ LDIRT += $(SRCTAR) endif
Makefile LDIRT += $(SRCTAR) · line 61
Quoted 10 lines
Makefile +3
-2LIB_SUBDIRS = include lib -TOOL_SUBDIRS = ltp src m4 +TOOL_SUBDIRS = ltp src m4 common ifeq ($(HAVE_DMAPI), true) TOOL_SUBDIRS += dmapi endif -SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) +# all the tests have been put into tests/ +TESTS_SUBDIR = tests
No need for the comment - it's redundant....
Quoted 23 lines
Makefile +1
-4+SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) $(TESTS_SUBDIR) default: include/builddefs $(DMAPI_MAKEFILE) $(TESTS) ifeq ($(HAVE_BUILDDEFS), no)@@ -91,12 +94,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. install-dev install-lib:common/Makefile new file +0
-0
common/Makefile line 9
Quoted 9 lines
common/Makefile new file +9
-0@@ -0,0 +1,17 @@ +# +# Copyright (c) 2003-2006 Silicon Graphics, Inc. All Rights Reserved. +# + +TOPDIR = .. +include $(TOPDIR)/include/builddefs + +# current ../common dir +COMMON_SUBDIR = common
Same, the comment is redundant. Also, it's not a subdir, so:
COMMON_DIR = common
The same changes for all the other makefiles, too.
Quoted 14 lines
common/Makefile new file +8
-0+ +include $(BUILDRULES) + +install: + $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/$(COMMON_SUBDIR) + $(INSTALL) -m 644 * $(PKG_LIB_DIR)/$(COMMON_SUBDIR) + +install-dev install-lib:tests/Makefile new file +0
-0
tests/Makefile line 10
Quoted 10 lines
tests/Makefile new file +10
-0@@ -0,0 +1,23 @@ +# +# Copyright (c) 2003-2005 Silicon Graphics, Inc. All Rights Reserved. +# + +TOPDIR = .. +include $(TOPDIR)/include/builddefs + +# current ../tests dir +TESTS_SUBDIR = tests +export TESTS_SUBDIR
Why export that here? why not in the top level makefile?
tests/Makefile line 12
Quoted 2 lines
tests/Makefile new file +2
-0+ +TESTS_SUBDIRS = btrfs ext4 generic shared udf xfs
TESTS_SUBDIR/TESTS_SUBDIRS are way too similar. TESTS_DIR and TESTS_SUBDIRS are fine, this I don't think you need to specify
Indeed, because this is just iterating sub directories, something like:
TESTS_SUBDIRS = $(dir $(wildcard $(PKG_LIB_DIR)/$(TESTS_DIR)))
means that we don't need to modify the makefile if we add more directories at a later date. Or if people want to add their own custom test directories...
Otherwise it looks ok.
Cheers,
Dave.
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs