public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfstests: make install support common/ and tests/ dirs
@ 2013-04-11 13:27 Wang Sheng-Hui
  2013-04-11 15:29 ` Rich Johnston
  2013-04-12  0:41 ` Dave Chinner
  0 siblings, 2 replies; 4+ messages in thread
From: Wang Sheng-Hui @ 2013-04-11 13:27 UTC (permalink / raw)
  To: Dave Chinner, xfstests

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.

Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
---
  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

diff --git a/Makefile b/Makefile
index 6edd55c..95e3e5d 100644
--- a/Makefile
+++ b/Makefile
@@ -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:
diff --git a/common/Makefile b/common/Makefile
new file mode 100644
index 0000000..649f55f
--- /dev/null
+++ b/common/Makefile
@@ -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:
diff --git a/tests/Makefile b/tests/Makefile
new file mode 100644
index 0000000..50e6bb3
--- /dev/null
+++ b/tests/Makefile
@@ -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
diff --git a/tests/btrfs/Makefile b/tests/btrfs/Makefile
new file mode 100644
index 0000000..35ec6ec
--- /dev/null
+++ b/tests/btrfs/Makefile
@@ -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:
diff --git a/tests/ext4/Makefile b/tests/ext4/Makefile
new file mode 100644
index 0000000..94b683b
--- /dev/null
+++ b/tests/ext4/Makefile
@@ -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:
diff --git a/tests/generic/Makefile b/tests/generic/Makefile
new file mode 100644
index 0000000..4858b1d
--- /dev/null
+++ b/tests/generic/Makefile
@@ -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:
diff --git a/tests/shared/Makefile b/tests/shared/Makefile
new file mode 100644
index 0000000..d2d980e
--- /dev/null
+++ b/tests/shared/Makefile
@@ -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:
diff --git a/tests/udf/Makefile b/tests/udf/Makefile
new file mode 100644
index 0000000..bf01eef
--- /dev/null
+++ b/tests/udf/Makefile
@@ -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:
diff --git a/tests/xfs/Makefile b/tests/xfs/Makefile
new file mode 100644
index 0000000..e6d1b32
--- /dev/null
+++ b/tests/xfs/Makefile
@@ -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:
-- 
1.7.12.4

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfstests: make install support common/ and tests/ dirs
  2013-04-11 13:27 [PATCH] xfstests: make install support common/ and tests/ dirs Wang Sheng-Hui
@ 2013-04-11 15:29 ` Rich Johnston
  2013-04-11 23:49   ` Wang Sheng-Hui
  2013-04-12  0:41 ` Dave Chinner
  1 sibling, 1 reply; 4+ messages in thread
From: Rich Johnston @ 2013-04-11 15:29 UTC (permalink / raw)
  To: Wang Sheng-Hui; +Cc: xfstests, Dave Chinner

Wang Sheng-Hui,

The patch to Makefile would not apply.  This is what I used to review.

diff --git a/Makefile b/Makefile
index 6edd55c..73214ab 100644
--- a/Makefile
+++ b/Makefile
@@ -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:

> diff --git a/Makefile b/Makefile
> index 6edd55c..95e3e5d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -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)
oops somehow the above line was not deleted
>       $(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
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfstests: make install support common/ and tests/ dirs
  2013-04-11 15:29 ` Rich Johnston
@ 2013-04-11 23:49   ` Wang Sheng-Hui
  0 siblings, 0 replies; 4+ messages in thread
From: Wang Sheng-Hui @ 2013-04-11 23:49 UTC (permalink / raw)
  To: Rich Johnston; +Cc: xfstests, Dave Chinner

On 2013年04月11日 23:29, Rich Johnston wrote:
> Wang Sheng-Hui,
>
> The patch to Makefile would not apply.  This is what I used to review.
>
> diff --git a/Makefile b/Makefile
> index 6edd55c..73214ab 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -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)

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

>          $(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:
>
>> diff --git a/Makefile b/Makefile
>> index 6edd55c..95e3e5d 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -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)
> oops somehow the above line was not deleted
>>       $(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
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfstests: make install support common/ and tests/ dirs
  2013-04-11 13:27 [PATCH] xfstests: make install support common/ and tests/ dirs Wang Sheng-Hui
  2013-04-11 15:29 ` Rich Johnston
@ 2013-04-12  0:41 ` Dave Chinner
  1 sibling, 0 replies; 4+ messages in thread
From: Dave Chinner @ 2013-04-12  0:41 UTC (permalink / raw)
  To: Wang Sheng-Hui; +Cc: xfstests, Dave Chinner

On Thu, Apr 11, 2013 at 09:27:00PM +0800, Wang Sheng-Hui wrote:
> 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.

Thanks for doing this!

Comments below.

> Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
> ---
>  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
> 
> diff --git a/Makefile b/Makefile
> index 6edd55c..95e3e5d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -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

No need for the comment - it's redundant....

> +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:
> diff --git a/common/Makefile b/common/Makefile
> new file mode 100644
> index 0000000..649f55f
> --- /dev/null
> +++ b/common/Makefile
> @@ -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.

> +
> +include $(BUILDRULES)
> +
> +install:
> +	$(INSTALL) -m 755 -d $(PKG_LIB_DIR)/$(COMMON_SUBDIR)
> +	$(INSTALL) -m 644 * $(PKG_LIB_DIR)/$(COMMON_SUBDIR)
> +
> +install-dev install-lib:
> diff --git a/tests/Makefile b/tests/Makefile
> new file mode 100644
> index 0000000..50e6bb3
> --- /dev/null
> +++ b/tests/Makefile
> @@ -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_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.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-04-12  0:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-11 13:27 [PATCH] xfstests: make install support common/ and tests/ dirs Wang Sheng-Hui
2013-04-11 15:29 ` Rich Johnston
2013-04-11 23:49   ` Wang Sheng-Hui
2013-04-12  0:41 ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox