@ -974,12 +974,19 @@ if(NOT WIN32 OR ROCKSDB_INSTALL_ON_WINDOWS)
)
)
endif ( )
endif ( )
option ( WITH_ALL_TESTS "Build all test, rather than a small subset" ON )
if ( WITH_TESTS )
if ( WITH_TESTS )
add_subdirectory ( third-party/gtest-1.8.1/fused-src/gtest )
add_subdirectory ( third-party/gtest-1.8.1/fused-src/gtest )
add_library ( testharness STATIC
add_library ( testharness STATIC
t e s t _ u t i l / t e s t h a r n e s s . c c )
t e s t _ u t i l / t e s t h a r n e s s . c c )
target_link_libraries ( testharness gtest )
target_link_libraries ( testharness gtest )
set ( TESTS
set ( TESTS
d b / d b _ b a s i c _ t e s t . c c
e n v / e n v _ b a s i c _ t e s t . c c
)
if ( WITH_ALL_TESTS )
list ( APPEND TESTS
c a c h e / c a c h e _ t e s t . c c
c a c h e / c a c h e _ t e s t . c c
c a c h e / l r u _ c a c h e _ t e s t . c c
c a c h e / l r u _ c a c h e _ t e s t . c c
d b / b l o b / b l o b _ f i l e _ a d d i t i o n _ t e s t . c c
d b / b l o b / b l o b _ f i l e _ a d d i t i o n _ t e s t . c c
@ -994,7 +1001,6 @@ if(WITH_TESTS)
d b / c o m p a r a t o r _ d b _ t e s t . c c
d b / c o m p a r a t o r _ d b _ t e s t . c c
d b / c o r r u p t i o n _ t e s t . c c
d b / c o r r u p t i o n _ t e s t . c c
d b / c u c k o o _ t a b l e _ d b _ t e s t . c c
d b / c u c k o o _ t a b l e _ d b _ t e s t . c c
d b / d b _ b a s i c _ t e s t . c c
d b / d b _ w i t h _ t i m e s t a m p _ b a s i c _ t e s t . c c
d b / d b _ w i t h _ t i m e s t a m p _ b a s i c _ t e s t . c c
d b / d b _ b l o c k _ c a c h e _ t e s t . c c
d b / d b _ b l o c k _ c a c h e _ t e s t . c c
d b / d b _ b l o o m _ f i l t e r _ t e s t . c c
d b / d b _ b l o o m _ f i l t e r _ t e s t . c c
@ -1057,7 +1063,6 @@ if(WITH_TESTS)
d b / w r i t e _ b a t c h _ t e s t . c c
d b / w r i t e _ b a t c h _ t e s t . c c
d b / w r i t e _ c a l l b a c k _ t e s t . c c
d b / w r i t e _ c a l l b a c k _ t e s t . c c
d b / w r i t e _ c o n t r o l l e r _ t e s t . c c
d b / w r i t e _ c o n t r o l l e r _ t e s t . c c
e n v / e n v _ b a s i c _ t e s t . c c
e n v / e n v _ t e s t . c c
e n v / e n v _ t e s t . c c
e n v / i o _ p o s i x _ t e s t . c c
e n v / i o _ p o s i x _ t e s t . c c
e n v / m o c k _ e n v _ t e s t . c c
e n v / m o c k _ e n v _ t e s t . c c
@ -1140,7 +1145,8 @@ if(WITH_TESTS)
u t i l i t i e s / t r a n s a c t i o n s / w r i t e _ u n p r e p a r e d _ t r a n s a c t i o n _ t e s t . c c
u t i l i t i e s / t r a n s a c t i o n s / w r i t e _ u n p r e p a r e d _ t r a n s a c t i o n _ t e s t . c c
u t i l i t i e s / t t l / t t l _ t e s t . c c
u t i l i t i e s / t t l / t t l _ t e s t . c c
u t i l i t i e s / w r i t e _ b a t c h _ w i t h _ i n d e x / w r i t e _ b a t c h _ w i t h _ i n d e x _ t e s t . c c
u t i l i t i e s / w r i t e _ b a t c h _ w i t h _ i n d e x / w r i t e _ b a t c h _ w i t h _ i n d e x _ t e s t . c c
)
)
endif ( )
if ( WITH_LIBRADOS )
if ( WITH_LIBRADOS )
list ( APPEND TESTS utilities/env_librados_test.cc )
list ( APPEND TESTS utilities/env_librados_test.cc )
endif ( )
endif ( )