All of lore.kernel.org
 help / color / mirror / Atom feed
From: brandon@ifup.org
To: xfs@oss.sgi.com
Cc: Brandon Philips <bphilips@suse.de>
Subject: [patch 3/4] [PATCH] attr: add make test target and use make to run tests
Date: Wed, 07 Jan 2009 18:19:50 -0800	[thread overview]
Message-ID: <20090108022109.147601019@ifup.org> (raw)
In-Reply-To: 20090108021947.404730068@ifup.org

[-- Attachment #1: attr-add-make-test-target-and-use-make-to-run-tests.patch --]
[-- Type: text/plain, Size: 2519 bytes --]

The tests are difficult to run. So, this patch adds a Make target that
sets up the path and runs *.test files in the test/ directory.

ext specific tests can be ran from the test directory by running 
`make ext`

Signed-off-by: Brandon Philips <bphilips@suse.de>

---
 Makefile      |    6 +++++-
 test/Makefile |   22 +++++++++++++---------
 test/README   |    4 ++++
 3 files changed, 22 insertions(+), 10 deletions(-)

Index: attr-2.4.43/test/README
===================================================================
--- attr-2.4.43.orig/test/README
+++ attr-2.4.43/test/README
@@ -1,3 +1,7 @@
+Run `make test` in the root source tree to build the tree and run
+FS-independent tests.
+
+Run `cd test; make ext` to run ext specific tests.
 
 Andreas Gruenbacher's tests for the ext2 filesystem extended attributes
 support.  Most of these tests should work for any filesystem type, and
Index: attr-2.4.43/test/Makefile
===================================================================
--- attr-2.4.43.orig/test/Makefile
+++ attr-2.4.43/test/Makefile
@@ -1,16 +1,20 @@
 #
-# Copyright (c) 2001-2002 Silicon Graphics, Inc.  All Rights Reserved.
+# Copyright (c) 2008 Novell, Inc.
 #
 
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
+TEST = $(wildcard *.test)
+EXT = $(wildcard ext/*.test)
 
-# ensure we pick these up in the source tarball
-LSRCFILES = attr.test run README
+PATH := $(abspath ../getfattr/):$(abspath ../setfattr):$(abspath ../chattr):$(PATH)
 
-default:
+all: $(TEST)
+ext: $(EXT)
 
-include $(BUILDRULES)
+$(TEST):
+	@echo "*** $@ ***"; perl run $@
 
-install:
-install-dev install-lib:
+$(EXT):
+	@echo "EXT specific tests"; @echo "*** $@ ***"; perl run $@
+
+.PHONY: $(TEST) $(EXT) default
+.NOTPARALLEL:
Index: attr-2.4.43/Makefile
===================================================================
--- attr-2.4.43.orig/Makefile
+++ attr-2.4.43/Makefile
@@ -17,7 +17,7 @@ LDIRT = config.log .dep config.status co
 	Logs/* built .census install.* install-dev.* install-lib.* *.gz
 
 SUBDIRS = include libmisc libattr attr getfattr setfattr \
-	  examples test m4 man doc po debian build
+	  examples m4 man doc po debian build
 
 default: $(CONFIGURE)
 ifeq ($(HAVE_BUILDDEFS), no)
@@ -62,3 +62,7 @@ install-dev install-lib: default
 realclean distclean: clean
 	rm -f $(LDIRT) $(CONFIGURE)
 	rm -rf autom4te.cache Logs
+
+.PHONY: test
+test: default
+	$(MAKE) -C test/

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  parent reply	other threads:[~2009-01-08  2:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-08  2:19 [patch 0/4] attr: test/ improvements and integrate with make brandon
2009-01-08  2:19 ` [patch 1/4] [PATCH] attr: move ext2/3 tests into seperate test file brandon
2009-01-08  2:19 ` [patch 2/4] [PATCH] attr: various improvements for test/run brandon
2009-01-08  2:19 ` brandon [this message]
2009-01-08  2:19 ` [patch 4/4] [PATCH] attr: Tests for path recursion with -L -P -R brandon
2009-01-08 15:44 ` [patch 0/4] attr: test/ improvements and integrate with make Christoph Hellwig
2009-01-08 16:58   ` Brandon Philips
2009-02-07  9:10     ` Brandon Philips
2009-02-08 22:59       ` Andreas Gruenbacher
2009-02-08 23:38         ` Brandon Philips
2009-02-09  0:31           ` Andreas Gruenbacher
2009-02-09 18:12         ` Christoph Hellwig
2009-02-09 19:06           ` Andreas Gruenbacher
2009-02-09 19:09           ` merging acl-dev and attr-dev [was: Re: [patch 0/4] attr: test/ improvements and integrate with make] Brandon Philips
2009-02-10  7:57             ` Christoph Hellwig

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=20090108022109.147601019@ifup.org \
    --to=brandon@ifup.org \
    --cc=bphilips@suse.de \
    --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.