84 lines
2.4 KiB
Diff
84 lines
2.4 KiB
Diff
Subject: [PATCH] attr: add make test 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`
|
|
|
|
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/
|