Skip to content

Commit

Permalink
Changes to enable tests - added command.c and command.h from old osc …
Browse files Browse the repository at this point in the history
…osd-initiator code.
  • Loading branch information
joc02012 authored and Chandy committed Oct 18, 2011
1 parent 3b0aded commit 1b79cc6
Show file tree
Hide file tree
Showing 11 changed files with 1,722 additions and 40 deletions.
16 changes: 11 additions & 5 deletions osd-target/tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
#

DEP := .depend
TESTS := $(wildcard *.c)
OBJ := $(TESTS:.c=.o)
EXE := $(TESTS:.c=)

CMD := command.c
CMD_OBJ := $(CMD:.c=.o)
CMD_SRC := ../../osd-initiator/$(CMD)
CMD_SRC := $(CMD)
CMD_INC := $(CMD_SRC:.c=.h)

TESTS := $(filter-out command.c, $(wildcard *.c))
#TESTS := $(wildcard *.c)
OBJ := $(TESTS:.c=.o)
EXE := $(TESTS:.c=)

LIBOSD := ../libosdtgt.a ../../osd-util/libosdutil.a

-include ../../Makedefs
Expand All @@ -25,6 +27,10 @@ CWARN := -Wall -W -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual \
-Wmissing-declarations -Wnested-externs
CFLAGS := $(COPTS) $(CWARN) -I. -I.. -I../../

ifeq ($(FreeBSD_Make),1)
CFLAGS += -I../../tgt/usr/bsd -I../../tgt/usr
endif

.SUFFIXES: .c .o .i

# default target
Expand All @@ -47,6 +53,6 @@ endif
all :: $(DEP)
$(DEP) :
@$(CC) $(CPP_M) $(CFLAGS) $(TESTS) $(CMD_SRC) > $(DEP)

clean:
rm -f $(EXE) $(OBJ) $(CMD_OBJ) $(DEP)
2 changes: 1 addition & 1 deletion osd-target/tests/cdb-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "cdb.h"
#include "osd-util/osd-util.h"
#include "osd-util/osd-sense.h"
#include "osd-initiator/command.h"
#include "command.h"

void test_partition(struct osd_device *osd);
void test_create(struct osd_device *osd);
Expand Down
Loading

0 comments on commit 1b79cc6

Please sign in to comment.