[Top] [All Lists]

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

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH v2] xfstests: make install support common/ and tests/ dirs
From: Wang Sheng-Hui <shhuiw@xxxxxxxxx>
Date: Sat, 13 Apr 2013 18:18:44 +0800
Cc: Dave Chinner <dchinner@xxxxxxxxxx>, Rich Johnston <rjohnston@xxxxxxx>, xfstests <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=Fkjsl+Hx9ngdYwcfXYUf5PIFn8akhfTg51enNFHdPis=; b=iGrau4RdOSiEh4zmDDKRfNCU7bWy7ZcMcCkHqt/E6yLXNyuu/2mmep6ngPoV2FWG+w uDn4RayhcuFV7AHaHnpg/cBXD2H1mwHB9if5dFg8iZwmu2NC+9o+FA6xrsAjhsvWsIzp PGAI2USYbettTlk7VUE/dKmVgDhN+hUDhSw96dFh0Damn67iw7brDZIgY5fXOpGdyzpw yOdA3pLzFnpgFvEFA0Rs7KdZsn4njzcchJRz0xe5GFVAe3O9EmiUwgrKjHSloP/+segd D2btaeqLY96+a70g4KUvmzOQjbePtQkB+jc1FDrC35TzA1JX2RFacUPxga4OLi5vQ8Wr kmsg==
In-reply-to: <20130413003222.GG30622@dastard>
References: <51678D0D.1070002@xxxxxxxxx> <20130412074034.GC30622@dastard> <5168396C.6020801@xxxxxxxxx> <20130413003222.GG30622@dastard>
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0
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 
and no Makefile.

I think you misunderstand. The wildcard above only returns

$ pwd
  0  ~/src/xfstests-dev/tests
$ cat ~/tmp/Makefile
foo=$(sort $(dir $(wildcard  $(PWD)/*/)))

         @echo $(foo)
$ make -f ~/tmp/Makefile
/home/dave/src/xfstests-dev/tests/udf/ /home/dave/src/xfstests-dev/tests/xfs/


The output on my box is different with yours.

# pwd
# cat /tmp/Makefile
foo=$(sort $(dir $(wildcard  $(PWD)/*/)))
        @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/ 

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.



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