summaryrefslogtreecommitdiff
path: root/code/test
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2017-05-23 17:28:12 +0200
committerUros Majstorovic <majstor@majstor.org>2017-05-23 17:28:12 +0200
commitab0325ae7906230f1ea82f08b27c72b075e9a13d (patch)
tree5a292826fdea4db2c86b2d82b80fa489c6c131c7 /code/test
parent3ef6719f47b734b12c0b11c725b7f12e3fb3c08a (diff)
build fixed; added lib util
Diffstat (limited to 'code/test')
-rw-r--r--code/test/Makefile15
-rw-r--r--code/test/basic.c (renamed from code/test/server.c)2
-rw-r--r--code/test/stress.c2
3 files changed, 10 insertions, 9 deletions
diff --git a/code/test/Makefile b/code/test/Makefile
index 5c25b5e..ddfc095 100644
--- a/code/test/Makefile
+++ b/code/test/Makefile
@@ -1,18 +1,19 @@
CFLAGS=-I../core -O3 -Wno-int-to-void-pointer-cast
LDFLAGS=-lm -pthread
-dep=../core/libecpcore.a ../core/crypto/libecpcr.a ../core/htable/libecpht.a ../core/posix/libecptr.a ../core/posix/libecptm.a init.o
+
+dep=../core/libecpcore.a ../core/crypto/libecpcr.a ../core/htable/libecpht.a ../core/posix/libecptr.a ../core/posix/libecptm.a
%.o: %.c
$(CC) $(CFLAGS) -c $<
-all: server stress
+all: basic stress
-server: server.o $(dep)
- $(CC) $< $(dep) $(LDFLAGS) -o $@
+basic: basic.o init.o $(dep)
+ $(CC) -o $@ $(LDFLAGS) $< init.o $(dep)
-stress: stress.o $(dep)
- $(CC) $< $(dep) $(LDFLAGS) -o $@
+stress: stress.o init.o $(dep)
+ $(CC) -o $@ $(LDFLAGS) $< init.o $(dep)
clean:
rm -f *.o
- rm -f server stress
+ rm -f basic stress
diff --git a/code/test/server.c b/code/test/basic.c
index 5bb36ef..bcd65bc 100644
--- a/code/test/server.c
+++ b/code/test/basic.c
@@ -100,7 +100,7 @@ int main(int argc, char *argv[]) {
rv = ecp_start_receiver(&sock_c);
printf("ecp_start_receiver RV:%d\n", rv);
- rv = ecp_node_init(&ctx_c, &node, "127.0.0.1:3000", &key_perma_s.public);
+ rv = ecp_node_init(&ctx_c, &node, &key_perma_s.public, "127.0.0.1:3000");
printf("ecp_node_init RV:%d\n", rv);
rv = ecp_conn_create(&conn, &sock_c, CTYPE_TEST);
diff --git a/code/test/stress.c b/code/test/stress.c
index 808611e..41883c2 100644
--- a/code/test/stress.c
+++ b/code/test/stress.c
@@ -209,7 +209,7 @@ int main(int argc, char *argv[]) {
strcpy(addr, "127.0.0.1:");
sprintf(addr+strlen(addr), "%d", 3000 + (i % num_s));
- if (!rv) rv = ecp_node_init(&ctx_c[i], &node[i], addr, &key_perma_s.public);
+ if (!rv) rv = ecp_node_init(&ctx_c[i], &node[i], &key_perma_s.public, addr);
if (!rv) rv = ecp_conn_create(&conn[i], &sock_c[i], CTYPE_TEST);
conn[i].conn_data = (void *)i;