diff --git a/.gitignore b/.gitignore index ae58619911f5baefe9b4e440a377354d369303b3..8df04fc7b7c40ae1eef2c85f163a6c01d53afb19 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ lcov *.a *.so *.d +*.dylib test/var test/lib/*.pyc test/lib/*/*.pyc diff --git a/CMakeLists.txt b/CMakeLists.txt index 9917aac27479456576c0073cf7859b9cbee66839..7605085bc920a61ff1011a9d6edf1705df9f0005 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,6 +74,8 @@ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FILE_OFFSET_BITS=64") elseif (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") set(TARGET_OS_FREEBSD 1) +elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + set(TARGET_OS_DARWIN 1) else() message (FATAL_ERROR "Unsupported platform -- ${CMAKE_SYSTEM_NAME}") endif() @@ -268,6 +270,11 @@ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS}") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions -fobjc-exceptions") +# Use GNU Objective C runtime on Mac OS X +if (TARGET_OS_DARWIN) + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fgnu-runtime") +endif() + add_subdirectory(third_party) add_subdirectory(cfg) add_subdirectory(connector) diff --git a/client/tarantool/CMakeLists.txt b/client/tarantool/CMakeLists.txt index cdaf531fd4304ddcc02e994d060ef04f66b53392..9ce8bad9dc151e75d130a7c4079c7dee572a9004 100644 --- a/client/tarantool/CMakeLists.txt +++ b/client/tarantool/CMakeLists.txt @@ -3,25 +3,25 @@ project(tnt_cli) # checking for readline library # -find_library(WITH_READLINE_LIB NAMES "readline") -find_library(WITH_READLINE_HISTORY_LIB NAMES "history") +find_library(READLINE_LIB NAMES "readline") +find_library(READLINE_HISTORY_LIB NAMES "history") -if (NOT WITH_READLINE_LIB OR NOT WITH_READLINE_HISTORY_LIB) +if (NOT READLINE_LIB OR NOT READLINE_HISTORY_LIB) message(FATAL_ERROR "readline library not found.") endif() -set (cli_deps readline history) +set (cli_deps ${READLINE_LIB} ${READLINE_HISTORY_LIB}) # trying to resolve readline dependencies # -find_library(WITH_NCURSES_LIB NAMES "ncurses") -if (WITH_NCURSES_LIB) - set(cli_deps ${cli_deps} ncurses) -endif() - -find_library(WITH_TERMCAP_LIB NAMES "termcap") -if (WITH_TERMCAP_LIB) - set(cli_deps ${cli_deps} termcap) +find_library(NCURSES_LIB NAMES "ncurses") +if (NCURSES_LIB) + set(cli_deps ${cli_deps} ${NCURSES_LIB}) +else() + find_library(TERMCAP_LIB NAMES "termcap") + if (TERMCAP_LIB) + set(cli_deps ${cli_deps} ${TERMCAP_LIB}) + endif() endif() set (cli "tarantool") diff --git a/include/config.h.cmake b/include/config.h.cmake index 961fdf11cefb36b88c6b3c103eb935cb0820099b..ce481e85af67a530f1635bac52dea119c593faf0 100644 --- a/include/config.h.cmake +++ b/include/config.h.cmake @@ -13,6 +13,8 @@ #cmakedefine TARGET_OS_LINUX 1 /* Defined if building for FreeBSD */ #cmakedefine TARGET_OS_FREEBSD 1 +/* Defined if building for Darwin */ +#cmakedefine TARGET_OS_DARWIN 1 /* * Defined if gcov instrumentation should be enabled. */ diff --git a/test/box/errinj.result b/test/box/errinj.result index a722fb149cf62c39700167428939b1c89d3d5c40..47d2295c6e2f0c71ec6110bf4d50502b90d01276 100644 --- a/test/box/errinj.result +++ b/test/box/errinj.result @@ -51,3 +51,6 @@ set injection ERRINJ_WAL_IO off --- ok ... +lua box.space[0]:truncate() +--- +... diff --git a/test/box/errinj.test b/test/box/errinj.test index 5cc918c24d1766a4fceba698e6af0743ec1ba0a3..b6887ad81999a6ebda420bd5fe69dc91dd31f99a 100644 --- a/test/box/errinj.test +++ b/test/box/errinj.test @@ -23,4 +23,5 @@ exec sql "update t0 set k0=2 where k0=1" exec sql "select * from t0 where k0=1" exec sql "select * from t0 where k0=2" exec admin "set injection ERRINJ_WAL_IO off" +exec admin "lua box.space[0]:truncate()" # vim: syntax=python diff --git a/test/box/reconfigure.result b/test/box/reconfigure.result index f8eb5944174b8f765ebb450aff92f7cbd778c62b..bc139180fca652c77cfb9e946a7e31ecc382de49 100644 --- a/test/box/reconfigure.result +++ b/test/box/reconfigure.result @@ -111,9 +111,6 @@ reload configuration --- ok ... -delete from t0 where k0 = 1 -Delete OK, 1 row affected -delete from t0 where k0 = 2 -Delete OK, 1 row affected -delete from t0 where k0 = 3 -Delete OK, 1 row affected +lua box.space[0]:truncate() +--- +... diff --git a/test/box/reconfigure.test b/test/box/reconfigure.test index 4ca587434bcac01be095d0b14f9a936b2592ea3a..319d045f126b9005cec1d7e2cd13b9e76638b075 100644 --- a/test/box/reconfigure.test +++ b/test/box/reconfigure.test @@ -42,8 +42,6 @@ exec sql "insert into t0 values (3, 'tuple 3')" exec admin "save snapshot" # Cleanup server.reconfigure(self.suite_ini["config"]) -exec sql "delete from t0 where k0 = 1" -exec sql "delete from t0 where k0 = 2" -exec sql "delete from t0 where k0 = 3" +exec admin "lua box.space[0]:truncate()" # vim: syntax=python