Skip to content

Commit

Permalink
Move getopt test to gtest
Browse files Browse the repository at this point in the history
Change-Id: I7a34ab2906568d6e7951f2024a6b4b83b3b1c485
Reviewed-on: http://review.couchbase.org/20575
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
  • Loading branch information
trondn committed Sep 6, 2012
1 parent 1f20969 commit a6f505f
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 214 deletions.
10 changes: 2 additions & 8 deletions Makefile.am
Expand Up @@ -243,19 +243,13 @@ noinst_LTLIBRARIES += libmockserver.la
tests_unit_tests_SOURCES += tests/loopfactory.c tests/server.h \
tests/mock-unit-test.h tests/testutil.h \
tests/testutil.cc tests/http-tests.cc \
tests/mock-unit-test.cc tests/server.c
tests/mock-unit-test.cc tests/server.c \
tests/getopt-unit-tests.cc
endif
check_PROGRAMS += \
tests/config-test \
tests/smoke-test

if BUILD_TOOLS
# and therefore have C++ compiler to build this test
check_PROGRAMS += tests/getopt-test
endif

tests_getopt_test_SOURCES = tests/getopt-test.cc

tests_config_test_SOURCES = tests/test.h tests/config-test.c
tests_config_test_DEPENDENCIES = libcouchbase.la libmockserver.la libvbucket.la
tests_config_test_LDADD = $(tests_config_test_DEPENDENCIES)
Expand Down
11 changes: 1 addition & 10 deletions NMakefile
Expand Up @@ -24,7 +24,7 @@ LD = link.exe
RM = del

lib_LTLIBRARIES = libcouchbase.dll libcouchbase_debug.dll
check_PROGRAMS = tests\getopt-test.exe
check_PROGRAMS =
bin_PROGRAMS = tools\cbc.exe
example_PROGRAMS = example\pillowfight.exe

Expand All @@ -46,11 +46,6 @@ libcouchbase_SOURCES = src\arithmetic.c src\base64.c src\behavior.c \
libcouchbase_la_OBJECTS=$(libcouchbase_SOURCES:.c=.obj)
libcouchbase_la_debug_OBJECTS=$(libcouchbase_SOURCES:.c=.dobj)

tests_getopt_test_CXX_SOURCES = tests\getopt-test.cc
tests_getopt_test_C_SOURCES = win32\getopt.c
tests_getopt_test_OBJECTS = $(tests_getopt_test_C_SOURCES:.c=.dobj) \
$(tests_getopt_test_CXX_SOURCES:.cc=.dobj)

tools_cbc_CXX_SOURCES = tools\cbc.cc \
tools\cbc-util.cc tools\commandlineparser.cc tools\configuration.cc
tools_cbc_C_SOURCES = win32\getopt.c
Expand All @@ -63,7 +58,6 @@ example_pillowfight_OBJECTS = $(example_pillowfight_CXX_SOURCES:.cc=.obj) \
$(example_pillowfight_C_SOURCES:.c=.obj)

all_OBJS=$(libcouchbase_la_OBJECTS) $(libcouchbase_la_debug_OBJECTS) \
$(tests_getopt_test_OBJECTS) \
$(tools_cbc_OBJECTS) $(example_pillowfight_OBJECTS)

all: $(lib_LTLIBRARIES) \
Expand All @@ -86,9 +80,6 @@ libcouchbase_debug.dll: $(libcouchbase_la_debug_OBJECTS)
$(libcouchbase_la_debug_OBJECTS) \
ws2_32.lib

tests\getopt-test.exe: $(tests_getopt_test_OBJECTS)
$(LD) $(LDFLAGS) -out:tests\getopt-test.exe $(tests_getopt_test_OBJECTS)

tools\cbc.exe: $(tools_cbc_OBJECTS) libcouchbase.dll
$(LD) $(LDFLAGS) -out:tools\cbc.exe $(tools_cbc_OBJECTS) \
libcouchbase.lib ws2_32.lib
Expand Down

0 comments on commit a6f505f

Please sign in to comment.