Added a test for Windows binaries (currently fails)
This commit is contained in:
parent
81117f00d6
commit
a0d55812f3
1
Makefile
1
Makefile
@ -63,6 +63,7 @@ dist:
|
||||
$(PACKAGE)-$(VERSION)/tests/binary/project.conf \
|
||||
$(PACKAGE)-$(VERSION)/tests/binary/Makefile.Darwin \
|
||||
$(PACKAGE)-$(VERSION)/tests/binary/Makefile.NetBSD \
|
||||
$(PACKAGE)-$(VERSION)/tests/binary/Makefile.Windows \
|
||||
$(PACKAGE)-$(VERSION)/tests/library/project.conf \
|
||||
$(PACKAGE)-$(VERSION)/tests/library/Makefile.Darwin \
|
||||
$(PACKAGE)-$(VERSION)/tests/library/Makefile.NetBSD \
|
||||
|
@ -10,7 +10,7 @@ INSTALL = install
|
||||
|
||||
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"
|
||||
|
||||
clean:
|
||||
|
42
tests/binary/Makefile.Windows
Normal file
42
tests/binary/Makefile.Windows
Normal 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
|
@ -1,7 +1,7 @@
|
||||
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]
|
||||
type=script
|
||||
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
|
||||
|
@ -101,4 +101,5 @@ _test "Darwin" "library"
|
||||
_test "Darwin" "plugin"
|
||||
_test "NetBSD" "binary"
|
||||
_test "NetBSD" "library"
|
||||
_test "NetBSD" "plugin") > "$target"
|
||||
_test "NetBSD" "plugin"
|
||||
_fail "Windows" "binary") > "$target"
|
||||
|
Loading…
Reference in New Issue
Block a user