Added a test for plug-ins as well

This commit is contained in:
Pierre Pronchery 2014-11-11 20:12:26 +01:00
parent 61c0351965
commit 53e20b5667
7 changed files with 94 additions and 4 deletions

View File

@ -62,6 +62,9 @@ dist:
$(PACKAGE)-$(VERSION)/tests/library/project.conf \
$(PACKAGE)-$(VERSION)/tests/library/Makefile.Darwin \
$(PACKAGE)-$(VERSION)/tests/library/Makefile.NetBSD \
$(PACKAGE)-$(VERSION)/tests/plugin/project.conf \
$(PACKAGE)-$(VERSION)/tests/plugin/Makefile.Darwin \
$(PACKAGE)-$(VERSION)/tests/plugin/Makefile.NetBSD \
$(PACKAGE)-$(VERSION)/tests/project.conf \
$(PACKAGE)-$(VERSION)/tools/pkg-config.c \
$(PACKAGE)-$(VERSION)/tools/Makefile \

View File

@ -9,7 +9,7 @@ INSTALL = install
all: $(TARGETS)
tests.log: ../src/configure library/project.conf library/Makefile.Darwin library/Makefile.NetBSD tests.sh
tests.log: ../src/configure library/project.conf library/Makefile.Darwin library/Makefile.NetBSD plugin/Makefile.Darwin plugin/Makefile.NetBSD tests.sh
./tests.sh -P "$(PREFIX)" -- "tests.log"
clean:

View File

@ -0,0 +1,39 @@
TARGETS = test.dylib
PREFIX = /usr/local
DESTDIR =
LIBDIR = $(PREFIX)/lib
AR = ar
RANLIB = ranlib
CCSHARED= $(CC) -dynamiclib
RM = rm -f
LN = ln -f
MKDIR = mkdir -m 0755 -p
INSTALL = install
all: $(TARGETS)
test_OBJS = test.o
test_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
test_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
test.dylib: $(test_OBJS)
$(CCSHARED) -o test.dylib $(test_OBJS) $(test_LDFLAGS)
test.o: test.c
$(CC) $(test_CFLAGS) -c test.c
clean:
$(RM) -- $(test_OBJS)
distclean: clean
$(RM) -- $(TARGETS)
install: $(TARGETS)
$(MKDIR) $(DESTDIR)$(LIBDIR)/configure
$(INSTALL) -m 0755 test.dylib $(DESTDIR)$(LIBDIR)/configure/test.dylib
uninstall:
$(RM) -- $(DESTDIR)$(LIBDIR)/configure/test.dylib
.PHONY: all clean distclean install uninstall

View File

@ -0,0 +1,39 @@
TARGETS = test.so
PREFIX = /usr/local
DESTDIR =
LIBDIR = $(PREFIX)/lib
AR = ar
RANLIB = ranlib
CCSHARED= $(CC) -shared
RM = rm -f
LN = ln -f
MKDIR = mkdir -m 0755 -p
INSTALL = install
all: $(TARGETS)
test_OBJS = test.o
test_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
test_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
test.so: $(test_OBJS)
$(CCSHARED) -o test.so $(test_OBJS) $(test_LDFLAGS)
test.o: test.c
$(CC) $(test_CFLAGS) -c test.c
clean:
$(RM) -- $(test_OBJS)
distclean: clean
$(RM) -- $(TARGETS)
install: $(TARGETS)
$(MKDIR) $(DESTDIR)$(LIBDIR)/configure
$(INSTALL) -m 0755 test.so $(DESTDIR)$(LIBDIR)/configure/test.so
uninstall:
$(RM) -- $(DESTDIR)$(LIBDIR)/configure/test.so
.PHONY: all clean distclean install uninstall

View File

@ -0,0 +1,7 @@
targets=test
dist=Makefile
[test]
type=plugin
sources=test.c
install=$(LIBDIR)/configure

View File

@ -1,7 +1,7 @@
targets=tests.log
dist=Makefile,tests.sh,library/project.conf,library/Makefile.Darwin,library/Makefile.NetBSD
dist=Makefile,tests.sh,library/project.conf,library/Makefile.Darwin,library/Makefile.NetBSD,plugin/project.conf,plugin/Makefile.Darwin,plugin/Makefile.NetBSD
[tests.log]
type=script
script=./tests.sh
depends=../src/configure,library/project.conf,library/Makefile.Darwin,library/Makefile.NetBSD,tests.sh
depends=../src/configure,library/project.conf,library/Makefile.Darwin,library/Makefile.NetBSD,plugin/Makefile.Darwin,plugin/Makefile.NetBSD,tests.sh

View File

@ -96,4 +96,6 @@ fi
target="$1"
($DATE
_fail "Darwin" "library"
_test "NetBSD" "library") > "$target"
_test "NetBSD" "library"
_test "Darwin" "plugin"
_test "NetBSD" "plugin") > "$target"