xfs
[Top] [All Lists]

Re: [PATCH v2] xfstests: make install support common/ and tests/ dirs

To: Wang Sheng-Hui <shhuiw@xxxxxxxxx>
Subject: Re: [PATCH v2] xfstests: make install support common/ and tests/ dirs
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Sat, 13 Apr 2013 10:32:22 +1000
Cc: Dave Chinner <dchinner@xxxxxxxxxx>, Rich Johnston <rjohnston@xxxxxxx>, xfstests <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <5168396C.6020801@xxxxxxxxx>
References: <51678D0D.1070002@xxxxxxxxx> <20130412074034.GC30622@dastard> <5168396C.6020801@xxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
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@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>