From 866e1ffd3d36590bfb54e284ae1400bf626c547d Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Fri, 13 Feb 2009 17:58:51 -0800 Subject: acl: 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. nfs specific tests can be ran from the test directory by running `make nfs-tests` tests requiring root can be ran from the test directory by running `make root-tests` Signed-off-by: Brandon Philips --- test/Makefile | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/Makefile b/test/Makefile index 0275b08..f698ac7 100644 --- a/test/Makefile +++ b/test/Makefile @@ -5,10 +5,31 @@ TOPDIR = .. include $(TOPDIR)/include/builddefs -LSRCFILES = run make-tree \ - cp.test getfacl-noacl.test misc.test nfs-dir.test \ - nfsacl.test permissions.test setfacl.test +TESTS = $(wildcard *.test) +ROOT = $(wildcard root/*.test) +NFS = $(wildcard nfs/*.test) +LSRCFILES = run make-tree $(TESTS) $(ROOT) $(NFS) include $(BUILDRULES) default install install-dev install-lib: + +PATH := $(abspath ../getfacl/):$(abspath ../setfacl/):$(abspath ../chacl/):$(PATH) + +tests: $(TESTS) +root-tests: $(ROOT) +nfs-tests: $(NFS) + +$(TESTS): + @echo "*** $@ ***"; perl run $@ + +$(NFS): + @echo "NFS specific tests"; @echo "*** $@ ***"; perl run $@ + +$(ROOT): + @echo "Note: Tests must run as root"; @echo "*** $@ ***"; perl run $@ + +.PHONY: $(TESTS) $(NFS) $(ROOT) +.NOTPARALLEL: + + -- cgit v1.2.1