* [PATCH v2] xfstests: make install support common/ and tests/ dirs
@ 2013-04-12 4:26 Wang Sheng-Hui
2013-04-12 7:40 ` Dave Chinner
0 siblings, 1 reply; 10+ messages in thread
From: Wang Sheng-Hui @ 2013-04-12 4:26 UTC (permalink / raw)
To: Dave Chinner, Rich Johnston, 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.
v2 introduces the following changes compared with v1:
* Ignore the file 'group' under the top dir, for it's useless in the new
structures.
* Remove the redundant comments in the Makefiles.
* Use XXX_DIR instead of XXX_SUBDIR in the Makefiles under common/ and tests/.
* Export TESTS_DIR in teh top level Makefile instead of tests/Makefile.
* Obtain the names of dirs for testcases by iterating sub dirs under /tests,
not by enumeration in tests/Makefile.
Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
---
Makefile | 12 +++++-------
common/Makefile | 16 ++++++++++++++++
tests/Makefile | 19 +++++++++++++++++++
tests/btrfs/Makefile | 20 ++++++++++++++++++++
tests/ext4/Makefile | 20 ++++++++++++++++++++
tests/generic/Makefile | 20 ++++++++++++++++++++
tests/shared/Makefile | 20 ++++++++++++++++++++
tests/udf/Makefile | 20 ++++++++++++++++++++
tests/xfs/Makefile | 20 ++++++++++++++++++++
9 files changed, 160 insertions(+), 7 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..611b36d 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)
+TESTS_DIR = tests
+export TESTS_DIR
+
+SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) $(TESTS_DIR)
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:
diff --git a/common/Makefile b/common/Makefile
new file mode 100644
index 0000000..5f91e8c
--- /dev/null
+++ b/common/Makefile
@@ -0,0 +1,16 @@
+#
+# Copyright (c) 2003-2006 Silicon Graphics, Inc. All Rights Reserved.
+#
+
+TOPDIR = ..
+include $(TOPDIR)/include/builddefs
+
+COMMON_DIR = common
+
+include $(BUILDRULES)
+
+install:
+ $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/$(COMMON_DIR)
+ $(INSTALL) -m 644 * $(PKG_LIB_DIR)/$(COMMON_DIR)
+
+install-dev install-lib:
diff --git a/tests/Makefile b/tests/Makefile
new file mode 100644
index 0000000..254dd48
--- /dev/null
+++ b/tests/Makefile
@@ -0,0 +1,19 @@
+#
+# Copyright (c) 2003-2005 Silicon Graphics, Inc. All Rights Reserved.
+#
+
+TOPDIR = ..
+include $(TOPDIR)/include/builddefs
+
+TESTS_SUBDIRS = $(shell find . -maxdepth 1 -type d | sed -n -e 's/\.\///gp')
+
+include $(BUILDRULES)
+
+install: $(addsuffix -install,$(TESTS_SUBDIRS))
+ $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/$(TESTS_DIR)
+
+# 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..e1a5be1
--- /dev/null
+++ b/tests/btrfs/Makefile
@@ -0,0 +1,20 @@
+#
+# Copyright (c) 2003-2005 Silicon Graphics, Inc. All Rights Reserved.
+#
+
+TOPDIR = ../..
+include $(TOPDIR)/include/builddefs
+
+BTRFS_DIR = btrfs
+TARGET_DIR = $(PKG_LIB_DIR)/$(TESTS_DIR)/$(BTRFS_DIR)
+
+include $(BUILDRULES)
+
+install:
+ $(INSTALL) -m 755 -d $(TARGET_DIR)
+ $(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+ $(INSTALL) -m 644 group $(TARGET_DIR)
+ $(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+
+# Nothing.
+install-dev install-lib:
diff --git a/tests/ext4/Makefile b/tests/ext4/Makefile
new file mode 100644
index 0000000..7a3c8e1
--- /dev/null
+++ b/tests/ext4/Makefile
@@ -0,0 +1,20 @@
+#
+# Copyright (c) 2003-2005 Silicon Graphics, Inc. All Rights Reserved.
+#
+
+TOPDIR = ../..
+include $(TOPDIR)/include/builddefs
+
+EXT4_DIR = ext4
+TARGET_DIR = $(PKG_LIB_DIR)/$(TESTS_DIR)/$(EXT4_DIR)
+
+include $(BUILDRULES)
+
+install:
+ $(INSTALL) -m 755 -d $(TARGET_DIR)
+ $(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+ $(INSTALL) -m 644 group $(TARGET_DIR)
+ $(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+
+# Nothing.
+install-dev install-lib:
diff --git a/tests/generic/Makefile b/tests/generic/Makefile
new file mode 100644
index 0000000..9529fb8
--- /dev/null
+++ b/tests/generic/Makefile
@@ -0,0 +1,20 @@
+#
+# Copyright (c) 2003-2005 Silicon Graphics, Inc. All Rights Reserved.
+#
+
+TOPDIR = ../..
+include $(TOPDIR)/include/builddefs
+
+GENERIC_DIR = generic
+TARGET_DIR = $(PKG_LIB_DIR)/$(TESTS_DIR)/$(GENERIC_DIR)
+
+include $(BUILDRULES)
+
+install:
+ $(INSTALL) -m 755 -d $(TARGET_DIR)
+ $(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+ $(INSTALL) -m 644 group $(TARGET_DIR)
+ $(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+
+# Nothing.
+install-dev install-lib:
diff --git a/tests/shared/Makefile b/tests/shared/Makefile
new file mode 100644
index 0000000..cbd87f9
--- /dev/null
+++ b/tests/shared/Makefile
@@ -0,0 +1,20 @@
+#
+# Copyright (c) 2003-2005 Silicon Graphics, Inc. All Rights Reserved.
+#
+
+TOPDIR = ../..
+include $(TOPDIR)/include/builddefs
+
+SHARED_DIR = shared
+TARGET_DIR = $(PKG_LIB_DIR)/$(TESTS_DIR)/$(SHARED_DIR)
+
+include $(BUILDRULES)
+
+install:
+ $(INSTALL) -m 755 -d $(TARGET_DIR)
+ $(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+ $(INSTALL) -m 644 group $(TARGET_DIR)
+ $(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+
+# Nothing.
+install-dev install-lib:
diff --git a/tests/udf/Makefile b/tests/udf/Makefile
new file mode 100644
index 0000000..1d96658
--- /dev/null
+++ b/tests/udf/Makefile
@@ -0,0 +1,20 @@
+#
+# Copyright (c) 2003-2005 Silicon Graphics, Inc. All Rights Reserved.
+#
+
+TOPDIR = ../..
+include $(TOPDIR)/include/builddefs
+
+UDF_DIR = udf
+TARGET_DIR = $(PKG_LIB_DIR)/$(TESTS_DIR)/$(UDF_DIR)
+
+include $(BUILDRULES)
+
+install:
+ $(INSTALL) -m 755 -d $(TARGET_DIR)
+ $(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+ $(INSTALL) -m 644 group $(TARGET_DIR)
+ $(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+
+# Nothing.
+install-dev install-lib:
diff --git a/tests/xfs/Makefile b/tests/xfs/Makefile
new file mode 100644
index 0000000..db94be0
--- /dev/null
+++ b/tests/xfs/Makefile
@@ -0,0 +1,20 @@
+#
+# Copyright (c) 2003-2005 Silicon Graphics, Inc. All Rights Reserved.
+#
+
+TOPDIR = ../..
+include $(TOPDIR)/include/builddefs
+
+XFS_DIR = xfs
+TARGET_DIR = $(PKG_LIB_DIR)/$(TESTS_DIR)/$(XFS_DIR)
+
+include $(BUILDRULES)
+
+install:
+ $(INSTALL) -m 755 -d $(TARGET_DIR)
+ $(INSTALL) -m 755 [0-9]?? $(TARGET_DIR)
+ $(INSTALL) -m 644 group $(TARGET_DIR)
+ $(INSTALL) -m 644 [0-9]??.* $(TARGET_DIR)
+
+# 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] 10+ messages in thread* Re: [PATCH v2] xfstests: make install support common/ and tests/ dirs
2013-04-12 4:26 [PATCH v2] xfstests: make install support common/ and tests/ dirs Wang Sheng-Hui
@ 2013-04-12 7:40 ` Dave Chinner
2013-04-12 16:42 ` Wang Sheng-Hui
0 siblings, 1 reply; 10+ messages in thread
From: Dave Chinner @ 2013-04-12 7:40 UTC (permalink / raw)
To: Wang Sheng-Hui; +Cc: xfstests, Rich Johnston, Dave Chinner
On Fri, Apr 12, 2013 at 12:26:53PM +0800, Wang Sheng-Hui wrote:
> +#
> +
> +TOPDIR = ..
> +include $(TOPDIR)/include/builddefs
> +
> +TESTS_SUBDIRS = $(shell find . -maxdepth 1 -type d | sed -n -e 's/\.\///gp')
This is much neater:
TESTS_SUBDIRS = $(sort $(dir $(wildcard $(PWD)/*/)))
-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] 10+ messages in thread
* Re: [PATCH v2] xfstests: make install support common/ and tests/ dirs
2013-04-12 7:40 ` Dave Chinner
@ 2013-04-12 16:42 ` Wang Sheng-Hui
2013-04-12 18:41 ` Rich Johnston
2013-04-13 0:32 ` Dave Chinner
0 siblings, 2 replies; 10+ messages in thread
From: Wang Sheng-Hui @ 2013-04-12 16:42 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfstests, Rich Johnston, Dave Chinner
On 2013年04月12日 15:40, Dave Chinner wrote:
> On Fri, Apr 12, 2013 at 12:26:53PM +0800, Wang Sheng-Hui wrote:
>> +#
>> +
>> +TOPDIR = ..
>> +include $(TOPDIR)/include/builddefs
>> +
>> +TESTS_SUBDIRS = $(shell find . -maxdepth 1 -type d | sed -n -e 's/\.\///gp')
>
> This is much neater:
>
> TESTS_SUBDIRS = $(sort $(dir $(wildcard $(PWD)/*/)))
Hi Dave,
I introduces Makefile under tests/, which would return to TESTS_SUBDIRS with the
$(dir function. By running find in $(shell, TEST_SUBDIRS will only get the dir names,
and no Makefile.
Regards,
Sheng-Hui
>
> -Dave.
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] xfstests: make install support common/ and tests/ dirs
2013-04-12 16:42 ` Wang Sheng-Hui
@ 2013-04-12 18:41 ` Rich Johnston
2013-04-13 0:38 ` Dave Chinner
2013-04-13 0:32 ` Dave Chinner
1 sibling, 1 reply; 10+ messages in thread
From: Rich Johnston @ 2013-04-12 18:41 UTC (permalink / raw)
To: Wang Sheng-Hui; +Cc: xfstests, Dave Chinner
On 04/12/2013 11:42 AM, Wang Sheng-Hui wrote:
>
> Hi Dave,
>
> I introduces Makefile under tests/, which would return to TESTS_SUBDIRS
> with the
> $(dir function. By running find in $(shell, TEST_SUBDIRS will only get
> the dir names,
> and no Makefile.
>
> Regards,
> Sheng-Hui
Thanks addressing comments and for v2 of this patch.
I still had issues with Makefile which I corrected at commit time.
Thanks again for the patch, it has been committed,
--Rich
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
commit 2519a97d1083efca79006ba5bd4ddb9f4af65a5e
Author: Wang Sheng-Hui <shhuiw@gmail.com>
Date: Fri Apr 12 04:26:53 2013 +0000
xfstests: make install support common/ and tests/ dirs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH v2] xfstests: make install support common/ and tests/ dirs
2013-04-12 18:41 ` Rich Johnston
@ 2013-04-13 0:38 ` Dave Chinner
2013-04-15 12:42 ` Rich Johnston
2013-04-15 12:45 ` Rich Johnston
0 siblings, 2 replies; 10+ messages in thread
From: Dave Chinner @ 2013-04-13 0:38 UTC (permalink / raw)
To: Rich Johnston; +Cc: xfstests, Dave Chinner, Wang Sheng-Hui
On Fri, Apr 12, 2013 at 01:41:22PM -0500, Rich Johnston wrote:
> On 04/12/2013 11:42 AM, Wang Sheng-Hui wrote:
> >
> >Hi Dave,
> >
> >I introduces Makefile under tests/, which would return to TESTS_SUBDIRS
> >with the
> >$(dir function. By running find in $(shell, TEST_SUBDIRS will only get
> >the dir names,
> >and no Makefile.
> >
> >Regards,
> >Sheng-Hui
>
> Thanks addressing comments and for v2 of this patch.
>
> I still had issues with Makefile which I corrected at commit time.
>
> Thanks again for the patch, it has been committed,
Rich, it's great that you are picking this stuff up quickly, but as
I asked recently, please don't commit patches while there is still
an active review conversation going on....
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] 10+ messages in thread
* Re: [PATCH v2] xfstests: make install support common/ and tests/ dirs
2013-04-13 0:38 ` Dave Chinner
@ 2013-04-15 12:42 ` Rich Johnston
2013-04-15 12:45 ` Rich Johnston
1 sibling, 0 replies; 10+ messages in thread
From: Rich Johnston @ 2013-04-15 12:42 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfstests, Dave Chinner, Wang Sheng-Hui
On 04/12/2013 07:38 PM, Dave Chinner wrote:
> On Fri, Apr 12, 2013 at 01:41:22PM -0500, Rich Johnston wrote:
>> On 04/12/2013 11:42 AM, Wang Sheng-Hui wrote:
>>>
>>> Hi Dave,
>>>
>>> I introduces Makefile under tests/, which would return to TESTS_SUBDIRS
>>> with the
>>> $(dir function. By running find in $(shell, TEST_SUBDIRS will only get
>>> the dir names,
>>> and no Makefile.
>>>
>>> Regards,
>>> Sheng-Hui
>>
>> Thanks addressing comments and for v2 of this patch.
>>
>> I still had issues with Makefile which I corrected at commit time.
>>
>> Thanks again for the patch, it has been committed,
>
> Rich, it's great that you are picking this stuff up quickly, but as
> I asked recently, please don't commit patches while there is still
> an active review conversation going on....
>
> Cheers,
>
> Dave.
>
Dave,
I was a little quick on the draw, I will wait till all parties have
concluded discussions.
--Rich
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] xfstests: make install support common/ and tests/ dirs
2013-04-13 0:38 ` Dave Chinner
2013-04-15 12:42 ` Rich Johnston
@ 2013-04-15 12:45 ` Rich Johnston
1 sibling, 0 replies; 10+ messages in thread
From: Rich Johnston @ 2013-04-15 12:45 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfstests, Dave Chinner, Wang Sheng-Hui
On 04/12/2013 07:38 PM, Dave Chinner wrote:
> On Fri, Apr 12, 2013 at 01:41:22PM -0500, Rich Johnston wrote:
>> On 04/12/2013 11:42 AM, Wang Sheng-Hui wrote:
>>>
>>> Hi Dave,
>>>
>>> I introduces Makefile under tests/, which would return to TESTS_SUBDIRS
>>> with the
>>> $(dir function. By running find in $(shell, TEST_SUBDIRS will only get
>>> the dir names,
>>> and no Makefile.
>>>
>>> Regards,
>>> Sheng-Hui
>>
>> Thanks addressing comments and for v2 of this patch.
>>
>> I still had issues with Makefile which I corrected at commit time.
>>
>> Thanks again for the patch, it has been committed,
>
> Rich, it's great that you are picking this stuff up quickly, but as
> I asked recently, please don't commit patches while there is still
> an active review conversation going on....
>
> Cheers,
>
> Dave.
>
Dave,
I was a little quick on the draw, I will wait till all parties have
concluded discussions.
--Rich
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] xfstests: make install support common/ and tests/ dirs
2013-04-12 16:42 ` Wang Sheng-Hui
2013-04-12 18:41 ` Rich Johnston
@ 2013-04-13 0:32 ` Dave Chinner
2013-04-13 10:18 ` Wang Sheng-Hui
1 sibling, 1 reply; 10+ messages in thread
From: Dave Chinner @ 2013-04-13 0:32 UTC (permalink / raw)
To: Wang Sheng-Hui; +Cc: xfstests, Rich Johnston, Dave Chinner
On Sat, Apr 13, 2013 at 12:42:20AM +0800, Wang Sheng-Hui wrote:
> On 2013年04月12日 15:40, Dave Chinner wrote:
> >On Fri, Apr 12, 2013 at 12:26:53PM +0800, Wang Sheng-Hui wrote:
> >>+#
> >>+
> >>+TOPDIR = ..
> >>+include $(TOPDIR)/include/builddefs
> >>+
> >>+TESTS_SUBDIRS = $(shell find . -maxdepth 1 -type d | sed -n -e 's/\.\///gp')
> >
> >This is much neater:
> >
> >TESTS_SUBDIRS = $(sort $(dir $(wildcard $(PWD)/*/)))
>
> Hi Dave,
>
> I introduces Makefile under tests/, which would return to TESTS_SUBDIRS with the
> $(dir function. By running find in $(shell, TEST_SUBDIRS will only get the dir names,
> and no Makefile.
I think you misunderstand. The wildcard above only returns
directories:
$ pwd
0 ~/src/xfstests-dev/tests
$ cat ~/tmp/Makefile
foo=$(sort $(dir $(wildcard $(PWD)/*/)))
default:
@echo $(foo)
$ make -f ~/tmp/Makefile
/home/dave/src/xfstests-dev/tests/btrfs/ /home/dave/src/xfstests-dev/tests/ext4/ /home/dave/src/xfstests-dev/tests/generic/ /home/dave/src/xfstests-dev/tests/shared/ /home/dave/src/xfstests-dev/tests/udf/ /home/dave/src/xfstests-dev/tests/xfs/
$
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] 10+ messages in thread* Re: [PATCH v2] xfstests: make install support common/ and tests/ dirs
2013-04-13 0:32 ` Dave Chinner
@ 2013-04-13 10:18 ` Wang Sheng-Hui
2013-04-13 10:37 ` Wang Sheng-Hui
0 siblings, 1 reply; 10+ messages in thread
From: Wang Sheng-Hui @ 2013-04-13 10:18 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfstests, Rich Johnston, Dave Chinner
On 2013年04月13日 08:32, Dave Chinner wrote:
> On Sat, Apr 13, 2013 at 12:42:20AM +0800, Wang Sheng-Hui wrote:
>> On 2013年04月12日 15:40, Dave Chinner wrote:
>>> On Fri, Apr 12, 2013 at 12:26:53PM +0800, Wang Sheng-Hui wrote:
>>>> +#
>>>> +
>>>> +TOPDIR = ..
>>>> +include $(TOPDIR)/include/builddefs
>>>> +
>>>> +TESTS_SUBDIRS = $(shell find . -maxdepth 1 -type d | sed -n -e 's/\.\///gp')
>>>
>>> This is much neater:
>>>
>>> TESTS_SUBDIRS = $(sort $(dir $(wildcard $(PWD)/*/)))
>>
>> Hi Dave,
>>
>> I introduces Makefile under tests/, which would return to TESTS_SUBDIRS with the
>> $(dir function. By running find in $(shell, TEST_SUBDIRS will only get the dir names,
>> and no Makefile.
>
> I think you misunderstand. The wildcard above only returns
> directories:
>
> $ pwd
> 0 ~/src/xfstests-dev/tests
> $ cat ~/tmp/Makefile
> foo=$(sort $(dir $(wildcard $(PWD)/*/)))
>
> default:
> @echo $(foo)
> $ make -f ~/tmp/Makefile
> /home/dave/src/xfstests-dev/tests/btrfs/ /home/dave/src/xfstests-dev/tests/ext4/ /home/dave/src/xfstests-dev/tests/generic/ /home/dave/src/xfstests-dev/tests/shared/ /home/dave/src/xfstests-dev/tests/udf/ /home/dave/src/xfstests-dev/tests/xfs/
> $
>
Dave,
The output on my box is different with yours.
# pwd
/root/workspace/xfstests/tests
# cat /tmp/Makefile
foo=$(sort $(dir $(wildcard $(PWD)/*/)))
foo:
@echo $(foo)
# make -f /tmp/Makefile foo
/root/workspace/xfstests/tests/ /root/workspace/xfstests/tests/btrfs/ /root/workspace/xfstests/tests/ext4/ /root/workspace/xfstests/tests/generic/ /root/workspace/xfstests/tests/shared/ /root/workspace/xfstests/tests/udf/ /root/workspace/xfstests/tests/xfs/
It always output the tests/ dir itself. If I used this for xfstests
'make install', it will fall into endless loop, for it will rerun
Makefile under /tests.
> Cheers,
>
> Dave.
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] xfstests: make install support common/ and tests/ dirs
2013-04-13 10:18 ` Wang Sheng-Hui
@ 2013-04-13 10:37 ` Wang Sheng-Hui
0 siblings, 0 replies; 10+ messages in thread
From: Wang Sheng-Hui @ 2013-04-13 10:37 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfstests, Rich Johnston, Dave Chinner
On 2013年04月13日 18:18, Wang Sheng-Hui wrote:
> On 2013年04月13日 08:32, Dave Chinner wrote:
>> On Sat, Apr 13, 2013 at 12:42:20AM +0800, Wang Sheng-Hui wrote:
>>> On 2013年04月12日 15:40, Dave Chinner wrote:
>>>> On Fri, Apr 12, 2013 at 12:26:53PM +0800, Wang Sheng-Hui wrote:
>>>>> +#
>>>>> +
>>>>> +TOPDIR = ..
>>>>> +include $(TOPDIR)/include/builddefs
>>>>> +
>>>>> +TESTS_SUBDIRS = $(shell find . -maxdepth 1 -type d | sed -n -e 's/\.\///gp')
>>>>
>>>> This is much neater:
>>>>
>>>> TESTS_SUBDIRS = $(sort $(dir $(wildcard $(PWD)/*/)))
>>>
>>> Hi Dave,
>>>
>>> I introduces Makefile under tests/, which would return to TESTS_SUBDIRS with the
>>> $(dir function. By running find in $(shell, TEST_SUBDIRS will only get the dir names,
>>> and no Makefile.
>>
>> I think you misunderstand. The wildcard above only returns
>> directories:
>>
>> $ pwd
>> 0 ~/src/xfstests-dev/tests
>> $ cat ~/tmp/Makefile
>> foo=$(sort $(dir $(wildcard $(PWD)/*/)))
>>
>> default:
>> @echo $(foo)
>> $ make -f ~/tmp/Makefile
>> /home/dave/src/xfstests-dev/tests/btrfs/ /home/dave/src/xfstests-dev/tests/ext4/ /home/dave/src/xfstests-dev/tests/generic/ /home/dave/src/xfstests-dev/tests/shared/ /home/dave/src/xfstests-dev/tests/udf/ /home/dave/src/xfstests-dev/tests/xfs/
>> $
>>
>
> Dave,
>
> The output on my box is different with yours.
>
> # pwd
> /root/workspace/xfstests/tests
> # cat /tmp/Makefile
> foo=$(sort $(dir $(wildcard $(PWD)/*/)))
> foo:
> @echo $(foo)
> # make -f /tmp/Makefile foo
> /root/workspace/xfstests/tests/ /root/workspace/xfstests/tests/btrfs/ /root/workspace/xfstests/tests/ext4/ /root/workspace/xfstests/tests/generic/ /root/workspace/xfstests/tests/shared/ /root/workspace/xfstests/tests/udf/ /root/workspace/xfstests/tests/xfs/
>
> It always output the tests/ dir itself. If I used this for xfstests
> 'make install', it will fall into endless loop, for it will rerun
> Makefile under /tests.
>
>> Cheers,
>>
>> Dave.
>>
>
Seems it's the $(PWD) introduces the loop.
When make install under xfstests, $(PWD) will refer to the path to xfstests instead
of xfstests/tests, even if is defined in xfstests/tests/Makefile.
Will send out the v3 patch later.
Regards,
Sheng-Hui
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-04-15 12:44 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-12 4:26 [PATCH v2] xfstests: make install support common/ and tests/ dirs Wang Sheng-Hui
2013-04-12 7:40 ` Dave Chinner
2013-04-12 16:42 ` Wang Sheng-Hui
2013-04-12 18:41 ` Rich Johnston
2013-04-13 0:38 ` Dave Chinner
2013-04-15 12:42 ` Rich Johnston
2013-04-15 12:45 ` Rich Johnston
2013-04-13 0:32 ` Dave Chinner
2013-04-13 10:18 ` Wang Sheng-Hui
2013-04-13 10:37 ` Wang Sheng-Hui
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox