mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-12-28 07:15:33 +03:00
fix execution of tests to actually fail if there's an error
This commit is contained in:
parent
055a5f2449
commit
87b754de45
@ -35,7 +35,7 @@ ifneq ($(OS), windows)
|
||||
CFLAGS += -fPIC
|
||||
endif
|
||||
|
||||
DYLIBTARGET = $(LIBNAME)$(SHLIB_SUFFIX)
|
||||
DYLIBTARGET = lib$(LIBNAME)$(SHLIB_SUFFIX)
|
||||
LIBTARGET = $(LIBNAME).a
|
||||
TARGET=${HOME}/.idris2
|
||||
|
||||
@ -48,7 +48,7 @@ $(DYLIBTARGET) : $(OBJS)
|
||||
$(CC) -o $(DYLIBTARGET) $(LIBFLAGS) -shared $(OBJS)
|
||||
|
||||
install:
|
||||
install $(DYLIBTARGET) $(HDRS) $(TARGET)
|
||||
install $(DYLIBTARGET) $(HDRS) $(TARGET)/idris2/network
|
||||
${IDRIS2} --install network.ipkg
|
||||
|
||||
clean :
|
||||
@ -57,8 +57,7 @@ clean :
|
||||
test: build test.c
|
||||
$(CC) -o network-tests -L. -I. -l$(LIBNAME) test.c
|
||||
./network-tests
|
||||
${IDRIS2} --exec main Echo.idr > build/output
|
||||
@if ! [ -z "$(diff build/output expected)" ]; then echo "TEST FAILURE: unexpected build/output"; exit 2; else echo "TEST SUCCESS"; fi
|
||||
./lib-tests
|
||||
|
||||
$(OBJS): $(HDRS)
|
||||
|
||||
|
10
libs/network/lib-tests
Executable file
10
libs/network/lib-tests
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
${IDRIS2} --exec main Echo.idr > build/output
|
||||
|
||||
if ! [ -z "$(diff build/output expected)" ]; then
|
||||
echo "TEST FAILURE: unexpected build/output"
|
||||
exit 2
|
||||
else
|
||||
echo "TEST SUCCESS"
|
||||
fi
|
Loading…
Reference in New Issue
Block a user