mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-22 06:41:26 +00:00
Fixed tests
This commit is contained in:
parent
6fc460ded6
commit
8b81909b5b
6
Makefile
6
Makefile
|
@ -1,12 +1,14 @@
|
||||||
|
|
||||||
all:
|
all:
|
||||||
(cd src; make all)
|
@(cd src; make all)
|
||||||
|
@(cd tests; make all)
|
||||||
|
|
||||||
stateos:
|
stateos:
|
||||||
@echo OS is $(OS)
|
@echo OS is $(OS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@echo "Cleaning..."
|
@echo "Cleaning..."
|
||||||
(cd src; make clean)
|
@(cd src; make clean)
|
||||||
|
@(cd tests; make clean)
|
||||||
@rm -rf bin
|
@rm -rf bin
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,6 @@ $(SERVER): $(SERVEROBJS)
|
||||||
@$(CC) $(CFLAGS) $< -o $@
|
@$(CC) $(CFLAGS) $< -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@echo "Cleaning..."
|
@echo "Cleaning src/"
|
||||||
@rm -f $(CLIENT) $(SERVER) $(TESTSUITE) *~ *.o *.core
|
@rm -f $(CLIENT) $(SERVER) *~ *.o *.core
|
||||||
|
|
||||||
|
|
28
tests/Makefile
Normal file
28
tests/Makefile
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
CC = gcc
|
||||||
|
TESTSUITE = tester
|
||||||
|
TESTOBJS = test.o ../src/dns.o ../src/read.o ../src/encoding.o
|
||||||
|
|
||||||
|
OS = `uname | tr "a-z" "A-Z"`
|
||||||
|
|
||||||
|
LDFLAGS = -lz
|
||||||
|
CFLAGS = -c -g -Wall -D$(OS)
|
||||||
|
|
||||||
|
all: $(TESTSUITE)
|
||||||
|
|
||||||
|
test: $(TESTSUITE)
|
||||||
|
@./$(TESTSUITE)
|
||||||
|
|
||||||
|
$(TESTSUITE): $(TESTOBJS)
|
||||||
|
@echo LD $@
|
||||||
|
@$(CC) $(TESTOBJS) -o $(TESTSUITE) $(LDFLAGS)
|
||||||
|
@echo Running tests...
|
||||||
|
@./$(TESTSUITE)
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
@echo CC $<
|
||||||
|
@$(CC) $(CFLAGS) $< -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@echo "Cleaning tests/"
|
||||||
|
@rm -f $(TESTSUITE) *~ *.o *.core
|
||||||
|
|
|
@ -28,10 +28,10 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include "structs.h"
|
#include "../src/structs.h"
|
||||||
#include "encoding.h"
|
#include "../src/encoding.h"
|
||||||
#include "dns.h"
|
#include "../src/dns.h"
|
||||||
#include "read.h"
|
#include "../src/read.h"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_readputshort()
|
test_readputshort()
|
||||||
|
|
Loading…
Reference in a new issue