From: Wang Sheng-Hui <shhuiw@gmail.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfstests <xfs@oss.sgi.com>, Rich Johnston <rjohnston@sgi.com>,
Dave Chinner <dchinner@redhat.com>
Subject: Re: [PATCH v2] xfstests: make install support common/ and tests/ dirs
Date: Sat, 13 Apr 2013 18:37:29 +0800 [thread overview]
Message-ID: <51693569.4030301@gmail.com> (raw)
In-Reply-To: <51693104.2020707@gmail.com>
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
prev parent reply other threads:[~2013-04-13 10:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51693569.4030301@gmail.com \
--to=shhuiw@gmail.com \
--cc=david@fromorbit.com \
--cc=dchinner@redhat.com \
--cc=rjohnston@sgi.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.