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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs





[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux