mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
405001be72
Currently, a few tests use the code in tests/common/ by linking individual object files in there in addition to the test code (e.g. linking ../common/config.o along with superuser-t.o). This convention makes it very obnoxious to move code around in tests/common/, since any users need to update their link lines. It also makes it difficult for code in tests/common/ to make use of functions in other tests/common/ files. To fix this, just build all of the objects in tests/common/ into a convenience library, called libafstest_common, and link the relevant tests against that. Link a few requisite libraries (roken, rfc3961) in libafstest_common, so each individual test doesn't need to link against them. Also link the TAP library itself in libafstest_common, so tests don't have to explicitly link against it separately. To do this, convert it into a libtool library, libafstest_tap.la. Change-Id: I9c031c164efee20201336edcbfaff429e1d231b7 Reviewed-on: https://gerrit.openafs.org/14318 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
51 lines
1.2 KiB
Makefile
51 lines
1.2 KiB
Makefile
|
|
srcdir=@srcdir@
|
|
abs_top_builddir=@abs_top_builddir@
|
|
include @TOP_OBJDIR@/src/config/Makefile.config
|
|
include @TOP_OBJDIR@/src/config/Makefile.pthread
|
|
|
|
BINS = authcon-t superuser-t keys-t realms-t writekeyfile
|
|
|
|
MODULE_CFLAGS=-I$(TOP_OBJDIR) -I$(srcdir)/../common/
|
|
|
|
all check test tests: $(BINS)
|
|
|
|
MODULE_LIBS = $(abs_top_builddir)/tests/common/libafstest_common.la \
|
|
$(abs_top_builddir)/src/auth/liboafs_auth.la \
|
|
$(XLIBS)
|
|
|
|
authcon-t: authcon-t.o
|
|
$(LT_LDRULE_static) authcon-t.o $(MODULE_LIBS)
|
|
|
|
superuser-t: superuser-t.o test.cs.o test.ss.o test.xdr.o
|
|
$(LT_LDRULE_static) superuser-t.o test.cs.o test.ss.o test.xdr.o \
|
|
$(MODULE_LIBS)
|
|
|
|
keys-t: keys-t.o
|
|
$(LT_LDRULE_static) keys-t.o $(MODULE_LIBS)
|
|
|
|
realms-t: realms-t.o
|
|
$(LT_LDRULE_static) realms-t.o $(MODULE_LIBS)
|
|
|
|
writekeyfile: writekeyfile.o
|
|
$(LT_LDRULE_static) writekeyfile.o $(MODULE_LIBS)
|
|
|
|
test.cs.c: test.xg
|
|
$(RXGEN) -A -x -C -o $@ $(srcdir)/test.xg
|
|
|
|
test.ss.c: test.xg
|
|
$(RXGEN) -A -x -S -o $@ $(srcdir)/test.xg
|
|
|
|
test.xdr.c: test.xg
|
|
$(RXGEN) -A -x -c -o $@ $(srcdir)/test.xg
|
|
|
|
test.h: test.xg
|
|
$(RXGEN) -A -x -h -o $@ $(srcdir)/test.xg
|
|
|
|
superuser-t.o: test.h
|
|
|
|
clean:
|
|
$(LT_CLEAN)
|
|
rm -f *.o *.cs.c *.ss.c *.xdr.c test.h \
|
|
$(BINS)
|