Skip to content
Snippets Groups Projects
Commit 460aa77c authored by Pavel Cherenkov's avatar Pavel Cherenkov
Browse files

Merge branch 'macosx2'

parents 9da85c78 90aaeb0a
No related branches found
No related tags found
No related merge requests found
......@@ -87,6 +87,12 @@ else()
message (FATAL_ERROR "Unsupported platform -- ${CMAKE_SYSTEM_NAME}")
endif()
if (TARGET_OS_DARWIN)
# Mac ports get installed into /opt/local, hence:
set (CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES} /opt/local/include")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/opt/local/include -L/opt/local/lib")
endif()
check_symbol_exists(MAP_ANON sys/mman.h HAVE_MAP_ANON)
check_symbol_exists(MAP_ANONYMOUS sys/mman.h HAVE_MAP_ANONYMOUS)
check_include_file(sys/time.h HAVE_SYS_TIME_H)
......
......@@ -36,14 +36,20 @@ CC=gcc-mp-4.6 make
5. Run tarantool test suite
-------------
NB: box/lua.test in not runnable on MacOS X at this point, in order to skip it add:
NB: the following tests are not runnable on MacOS X at this point:
disabled = lua.test
box/lua.test
box_big/lua.test
connector_c/xlog_rpl.test
to tarantool/test/suite.ini file;
To disable those add each of them to the 'disabled' clause in suite.ini file
in the appropriate directory; for instance, tarantool/test/box/suite.ini must
be edited to disable any test in the 'box' suite;
To run all tests then, execute:
cd ~/build/tarantool/test
PATH=~/build/bin:$PATH ./run
./run
-- EOF
......@@ -95,7 +95,7 @@ int main(int argc, char *argv[])
{
tc_init();
int rc;
int rc = 0;
enum tc_opt_mode mode = tc_opt_init(&tc.opt, argc, argv);
switch (mode) {
case TC_OPT_USAGE:
......
......@@ -50,7 +50,7 @@ set_target_properties(tntrpl PROPERTIES OUTPUT_NAME "tarantoolrpl")
project(tntrpl_shared)
add_library(tntrpl_shared SHARED ${tntrpl_sources})
target_link_libraries(tntrpl_shared tnt_shared)
target_link_libraries(tntrpl_shared tnt_shared tntnet_shared)
set_target_properties(tntrpl_shared PROPERTIES OUTPUT_NAME tntrpl)
set_target_properties(tntrpl_shared PROPERTIES COMPILE_FLAGS "${tntrpl_cflags}")
set_target_properties(tntrpl_shared PROPERTIES VERSION ${LIBTNT_VERSION} SOVERSION ${LIBTNT_SOVERSION})
......
......@@ -200,8 +200,8 @@ format_filename(struct log_dir *dir, i64 lsn, enum log_suffix suffix)
{
static __thread char filename[PATH_MAX + 1];
const char *suffix_str = suffix == INPROGRESS ? inprogress_suffix : "";
snprintf(filename, PATH_MAX, "%s/%020" PRIi64 "%s%s",
dir->dirname, lsn, dir->filename_ext, suffix_str);
snprintf(filename, PATH_MAX, "%s/%020lld%s%s",
dir->dirname, (long long)lsn, dir->filename_ext, suffix_str);
return filename;
}
......@@ -245,7 +245,7 @@ row_reader_v11(FILE *f, struct palloc_pool *pool)
return NULL;
}
say_debug("read row v11 success lsn:%" PRIi64, header_v11(m)->lsn);
say_debug("read row v11 success lsn:%lld", (long long)header_v11(m)->lsn);
return m;
}
......@@ -289,7 +289,7 @@ log_io_cursor_next(struct log_io_cursor *i)
assert(i->eof_read == false);
say_debug("log_io_cursor_next: marker:0x%016" PRIX32 "/%" PRI_SZ,
say_debug("log_io_cursor_next: marker:0x%016X/%zu",
row_marker_v11, sizeof(row_marker_v11));
/*
......@@ -317,9 +317,10 @@ restart:
}
marker_offset = ftello(l->f) - sizeof(row_marker_v11);
if (i->good_offset != marker_offset)
say_warn("skipped %" PRI_OFFT " bytes after 0x%08" PRI_XFFT " offset",
marker_offset - i->good_offset, i->good_offset);
say_debug("magic found at 0x%08" PRI_XFFT, marker_offset);
say_warn("skipped %jd bytes after 0x%08jx offset",
(intmax_t)(marker_offset - i->good_offset),
(uintmax_t)i->good_offset);
say_debug("magic found at 0x%08jx", (uintmax_t)marker_offset);
struct tbuf *row = row_reader_v11(l->f, fiber->gc_pool);
if (row == ROW_EOF)
......
......@@ -54,7 +54,9 @@ nfilename(int fd)
filename_path[sz] = '\0';
return filename_path;
}
#endif /* TARGET_OS_LINUX */
#else /* TARGET_OS_LINUX */
(void) fd;
#endif
return ""; /* Not implemented. */
}
......@@ -133,14 +135,14 @@ nlseek(int fd, off_t offset, int whence)
off_t effective_offset = lseek(fd, offset, whence);
if (effective_offset == -1) {
say_syserror("lseek, offset=%"PRI_OFFT", whence=%d, [%s]",
(u64) offset, whence,
say_syserror("lseek, offset=%jd, whence=%d, [%s]",
(intmax_t) offset, whence,
nfilename(fd));
} else if (whence == SEEK_SET && effective_offset != offset) {
say_error("lseek, offset set to unexpected value: "
"requested %"PRI_OFFT", effective %"PRI_OFFT", "
"requested %jd effective %jd, "
"[%s]",
offset, effective_offset, nfilename(fd));
(intmax_t)offset, (intmax_t)effective_offset, nfilename(fd));
}
return effective_offset;
}
......
import sys
import os
# mask BFD warnings: https://bugs.launchpad.net/tarantool/+bug/1018356
sys.stdout.push_filter("unable to read unknown load command 0x2\d+", "")
server.test_option("--help")
server.test_option("-h")
sys.stdout.push_filter("(/\S+)+/tarantool", "tarantool")
......
......@@ -5,8 +5,12 @@
import os
import time
import yaml
import sys
from signal import SIGUSR1
# mask BFD warnings: https://bugs.launchpad.net/tarantool/+bug/1018356
sys.stdout.push_filter("unable to read unknown load command 0x2\d+", "")
print """
# Verify that the server starts from a pre-recorded snapshot.
# This way we check that the server can read old snapshots (v11)
......@@ -18,6 +22,7 @@ server.test_option("--cat=00000000000000000500.snap")
# print "# Restore the default server..."
os.unlink(snapshot)
sys.stdout.pop_filter()
# __EOF__
......@@ -5,6 +5,9 @@ import os
import sys
import shutil
# mask BFD warnings: https://bugs.launchpad.net/tarantool/+bug/1018356
sys.stdout.push_filter("unable to read unknown load command 0x2\d+", "")
print """
# Bug #708685:
# Addition of required configuration file options broke backward
......@@ -78,4 +81,6 @@ server.stop()
shutil.rmtree(script_dir_path, True)
server.deploy(self.suite_ini["config"])
sys.stdout.pop_filter()
# vim: syntax=python
......@@ -3,6 +3,7 @@ description = tarantool/box, minimal configuration
config = tarantool.cfg
# put disabled tests here
#disabled = xlog.test
# disabled = lua.test
# put disabled in valgrind test here
valgrind_disabled = admin_coredump.test
release_disabled = errinj.test
......@@ -2,6 +2,6 @@
description = tarantool/box, various namespace configurations and properties
config = tarantool.cfg
# put disabled tests here
#disabled = sql.test
# disabled = lua.test
# put disabled in valgrind test here
#valgrind_disabled = ...
......@@ -4,6 +4,9 @@
import os
import sys
# mask BFD warnings: https://bugs.launchpad.net/tarantool/+bug/1018356
sys.stdout.push_filter("unable to read unknown load command 0x2\d+", "")
print """
# Bug #855616:
# memcached_space must not be configured
......@@ -27,4 +30,6 @@ sys.stdout.pop_filter()
server.stop()
server.deploy(self.suite_ini["config"])
sys.stdout.pop_filter()
# vim: syntax=python
......@@ -2,6 +2,6 @@
description = tarantool/box connector C
config = cfg/tarantool.cfg
# put disabled tests here
#disabled =
# disabled = xlog_rpl.test
# put disabled in valgrind test here
#valgrind_disabled =
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment