Skip to content

Commit

Permalink
Fixed regression in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniele Lacamera committed Feb 20, 2015
1 parent de73846 commit edb264e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ units: mod core lib $(UNITS_OBJ) $(MOD_OBJ)
@echo -e "\t[CC] units.o"
@$(CC) -c -o $(PREFIX)/test/units.o test/units.c $(CFLAGS) -I stack -I modules -I includes -I test/unit -DUNIT_TEST
@echo -e "\t[LD] $(PREFIX)/test/units"
@$(CC) -o $(PREFIX)/test/units $(CFLAGS) $(PREFIX)/test/units.o -lcheck -lm -pthread -lrt $(UNITS_OBJ)
@$(CC) -o $(PREFIX)/test/units $(CFLAGS) $(PREFIX)/test/units.o -lcheck -lm -pthread -lrt $(UNITS_OBJ) $(PREFIX)/modules/pico_aodv.o
@$(CC) -o $(PREFIX)/test/modunit_pico_protocol.elf $(CFLAGS) -I. test/unit/modunit_pico_protocol.c stack/pico_tree.c -lcheck -lm -pthread -lrt $(UNITS_OBJ)
@$(CC) -o $(PREFIX)/test/modunit_pico_frame.elf $(CFLAGS) -I. test/unit/modunit_pico_frame.c stack/pico_tree.c -lcheck -lm -pthread -lrt $(UNITS_OBJ)
@$(CC) -o $(PREFIX)/test/modunit_seq.elf $(CFLAGS) -I. test/unit/modunit_seq.c -lcheck -lm -pthread -lrt $(UNITS_OBJ) $(PREFIX)/lib/libpicotcp.a
Expand Down
2 changes: 1 addition & 1 deletion modules/pico_aodv.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ static void pico_aodv_collector(pico_time now, void *arg)
pico_timer_add(AODV_HELLO_INTERVAL, pico_aodv_collector, NULL);
}

int pico_aodv_init(void)
MOCKABLE int pico_aodv_init(void)
{
struct pico_ip4 any = { .addr = 0u};
uint16_t port = short_be(PICO_AODV_PORT);
Expand Down
4 changes: 4 additions & 0 deletions test/unit/unit_socket.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

int pico_aodv_init(void)
{
return 0;
}
START_TEST (test_socket)
{
int ret = 0;
Expand Down
1 change: 1 addition & 0 deletions test/unit/unit_timer.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#define EXISTING_TIMERS 4


START_TEST (test_timers)
{
struct pico_timer *T[128];
Expand Down

0 comments on commit edb264e

Please sign in to comment.