Added a test for Windows binaries (currently fails)

This commit is contained in:
Pierre Pronchery 2014-11-12 00:00:02 +01:00
parent 81117f00d6
commit a0d55812f3
5 changed files with 48 additions and 4 deletions

View File

@ -63,6 +63,7 @@ dist:
$(PACKAGE)-$(VERSION)/tests/binary/project.conf \ $(PACKAGE)-$(VERSION)/tests/binary/project.conf \
$(PACKAGE)-$(VERSION)/tests/binary/Makefile.Darwin \ $(PACKAGE)-$(VERSION)/tests/binary/Makefile.Darwin \
$(PACKAGE)-$(VERSION)/tests/binary/Makefile.NetBSD \ $(PACKAGE)-$(VERSION)/tests/binary/Makefile.NetBSD \
$(PACKAGE)-$(VERSION)/tests/binary/Makefile.Windows \
$(PACKAGE)-$(VERSION)/tests/library/project.conf \ $(PACKAGE)-$(VERSION)/tests/library/project.conf \
$(PACKAGE)-$(VERSION)/tests/library/Makefile.Darwin \ $(PACKAGE)-$(VERSION)/tests/library/Makefile.Darwin \
$(PACKAGE)-$(VERSION)/tests/library/Makefile.NetBSD \ $(PACKAGE)-$(VERSION)/tests/library/Makefile.NetBSD \

View File

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

View File

@ -0,0 +1,42 @@
TARGETS = $(OBJDIR)test$(EXEEXT)
OBJDIR =
PREFIX = /usr/local
DESTDIR =
BINDIR = $(PREFIX)/bin
SBINDIR = $(PREFIX)/sbin
EXEEXT = .exe
RM = rm -f
LN = ln -f
MKDIR = mkdir -m 0755 -p
INSTALL = install
all: $(TARGETS)
test_OBJS = $(OBJDIR)test.o $(OBJDIR)main.o
test_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
test_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
$(OBJDIR)test$(EXEEXT): $(test_OBJS)
$(CC) -o $(OBJDIR)test$(EXEEXT) $(test_OBJS) $(test_LDFLAGS)
$(OBJDIR)test.o: test.c
$(CC) $(test_CFLAGS) -o $(OBJDIR)test.o -c test.c
$(OBJDIR)main.o: main.c
$(CC) $(test_CFLAGS) -o $(OBJDIR)main.o -c main.c
clean:
$(RM) -- $(test_OBJS)
distclean: clean
$(RM) -- $(TARGETS)
install: $(TARGETS)
$(MKDIR) $(DESTDIR)$(BINDIR)
$(INSTALL) -m 0755 $(OBJDIR)test$(EXEEXT) $(DESTDIR)$(BINDIR)/test$(EXEEXT)
uninstall:
$(RM) -- $(DESTDIR)$(BINDIR)/test$(EXEEXT)
.PHONY: all clean distclean install uninstall

View File

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

View File

@ -101,4 +101,5 @@ _test "Darwin" "library"
_test "Darwin" "plugin" _test "Darwin" "plugin"
_test "NetBSD" "binary" _test "NetBSD" "binary"
_test "NetBSD" "library" _test "NetBSD" "library"
_test "NetBSD" "plugin") > "$target" _test "NetBSD" "plugin"
_fail "Windows" "binary") > "$target"