diff options
author | Brandon Philips <bphilips@suse.de> | 2009-02-13 18:24:52 -0800 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2009-02-23 00:44:52 +0100 |
commit | 42b71a193b25378d99bbcdef046863249897c342 (patch) | |
tree | d42b0ba3497c225d443e8b4b226b79e6b009c1cb | |
parent | 8ef43df04176449e6aacdaadd35fb585e27ba1e8 (diff) | |
download | attr-42b71a193b25378d99bbcdef046863249897c342.tar.gz |
attr: add make tests target and use make to run tests
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-tests`
Signed-off-by: Brandon Philips <bphilips@suse.de>
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | test/Makefile | 22 | ||||
-rw-r--r-- | test/README | 4 |
3 files changed, 26 insertions, 4 deletions
@@ -85,3 +85,7 @@ install-lib: install $(addsuffix -install-lib,$(SUBDIRS)) realclean distclean: clean rm -f $(LDIRT) $(CONFIGURE) rm -rf autom4te.cache Logs + +.PHONY: tests +tests: default + $(MAKE) -C test/ tests diff --git a/test/Makefile b/test/Makefile index b37a55f..e185336 100644 --- a/test/Makefile +++ b/test/Makefile @@ -5,12 +5,26 @@ 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 +LSRCFILES = $(TEST) $(EXT) run README -default: +default install install-dev install-lib: include $(BUILDRULES) -install: -install-dev install-lib: +PATH := $(abspath ../getfattr/):$(abspath ../setfattr):$(abspath ../chattr):$(PATH) + +tests: $(TEST) +ext-tests: $(EXT) + +$(TEST): + @echo "*** $@ ***"; perl run $@ + +$(EXT): + @echo "EXT specific tests"; @echo "*** $@ ***"; perl run $@ + +.PHONY: $(TEST) $(EXT) +.NOTPARALLEL: diff --git a/test/README b/test/README index ab8f232..fbc630a 100644 --- a/test/README +++ b/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 |