mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-29 09:08:50 +08:00
mdbx-test: reduce number of test-iteration for MacOS.
Change-Id: Ic9df6a9ce66ee2cc165e2525953eee998e653932
This commit is contained in:
parent
32a5b9089b
commit
351939dd5d
20
Makefile
20
Makefile
@ -52,24 +52,34 @@ MANPAGES := mdbx_stat.1 mdbx_copy.1 mdbx_dump.1 mdbx_load.1
|
|||||||
SHELL := /bin/bash
|
SHELL := /bin/bash
|
||||||
|
|
||||||
ifdef MSVC
|
ifdef MSVC
|
||||||
|
UNAME := Windows
|
||||||
LCK_IMPL := windows
|
LCK_IMPL := windows
|
||||||
TEST_OSAL := windows
|
TEST_OSAL := windows
|
||||||
|
TEST_ITER := 42
|
||||||
else
|
else
|
||||||
|
UNAME := $(shell uname -s 2>/dev/null || echo Unknown)
|
||||||
define uname2lck
|
define uname2lck
|
||||||
case "`uname -s 2>/dev/null`" in
|
case "$(UNAME)" in
|
||||||
Linux) echo linux;;
|
Linux) echo linux;;
|
||||||
CYGWIN*|MINGW32*|MSYS*) echo windows;;
|
CYGWIN*|MINGW32*|MSYS*|Windows*) echo windows;;
|
||||||
*) echo posix;;
|
*) echo posix;;
|
||||||
esac
|
esac
|
||||||
endef
|
endef
|
||||||
define uname2osal
|
define uname2osal
|
||||||
case "`uname -s 2>/dev/null`" in
|
case "$(UNAME)" in
|
||||||
CYGWIN*|MINGW32*|MSYS*) echo windows;;
|
CYGWIN*|MINGW32*|MSYS*|Windows*) echo windows;;
|
||||||
*) echo unix;;
|
*) echo unix;;
|
||||||
esac
|
esac
|
||||||
endef
|
endef
|
||||||
|
define uname2titer
|
||||||
|
case "$(UNAME)" in
|
||||||
|
Darwin*|Mach*) echo 3;;
|
||||||
|
*) echo 42;;
|
||||||
|
esac
|
||||||
|
endef
|
||||||
LCK_IMPL := $(shell $(uname2lck))
|
LCK_IMPL := $(shell $(uname2lck))
|
||||||
TEST_OSAL := $(shell $(uname2osal))
|
TEST_OSAL := $(shell $(uname2osal))
|
||||||
|
TEST_ITER := $(shell $(uname2titer))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CORE_SRC := src/lck-$(LCK_IMPL).c $(filter-out $(wildcard src/lck-*.c), $(wildcard src/*.c))
|
CORE_SRC := src/lck-$(LCK_IMPL).c $(filter-out $(wildcard src/lck-*.c), $(wildcard src/*.c))
|
||||||
@ -104,7 +114,7 @@ clean:
|
|||||||
rm -rf $(TOOLS) mdbx_test @* *.[ao] *.[ls]o *~ tmp.db/* *.gcov *.log *.err src/*.o test/*.o
|
rm -rf $(TOOLS) mdbx_test @* *.[ao] *.[ls]o *~ tmp.db/* *.gcov *.log *.err src/*.o test/*.o
|
||||||
|
|
||||||
check: all
|
check: all
|
||||||
rm -f $(TESTDB) $(TESTLOG) && (set -o pipefail; ./mdbx_test --repeat=42 --pathname=$(TESTDB) --dont-cleanup-after basic | tee -a $(TESTLOG) | tail -n 42) \
|
rm -f $(TESTDB) $(TESTLOG) && (set -o pipefail; ./mdbx_test --repeat=$(TEST_ITER) --pathname=$(TESTDB) --dont-cleanup-after basic | tee -a $(TESTLOG) | tail -n 42) \
|
||||||
&& ./mdbx_chk -vvn $(TESTDB) && ./mdbx_chk -vvn $(TESTDB)-copy
|
&& ./mdbx_chk -vvn $(TESTDB) && ./mdbx_chk -vvn $(TESTDB)-copy
|
||||||
|
|
||||||
check-singleprocess: all
|
check-singleprocess: all
|
||||||
|
25
test/ttl.cc
25
test/ttl.cc
@ -53,11 +53,26 @@ bool testcase_ttl::run() {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* LY: для параметризации используем подходящие параметры, которые не имеют
|
/* LY: для параметризации используем подходящие параметры, которые не имеют
|
||||||
* здесь смысла в первоначальном значении */
|
* здесь смысла в первоначальном значении. */
|
||||||
const unsigned window_max =
|
const unsigned window_max_lower =
|
||||||
(config.params.batch_read > 999) ? config.params.batch_read : 1000;
|
#ifdef __APPLE__
|
||||||
const unsigned count_max =
|
333;
|
||||||
(config.params.batch_write > 999) ? config.params.batch_write : 1000;
|
#else
|
||||||
|
999;
|
||||||
|
#endif
|
||||||
|
const unsigned count_max_lower =
|
||||||
|
#ifdef __APPLE__
|
||||||
|
333;
|
||||||
|
#else
|
||||||
|
999;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const unsigned window_max = (config.params.batch_read > window_max_lower)
|
||||||
|
? config.params.batch_read
|
||||||
|
: window_max_lower;
|
||||||
|
const unsigned count_max = (config.params.batch_write > count_max_lower)
|
||||||
|
? config.params.batch_write
|
||||||
|
: count_max_lower;
|
||||||
log_info("ttl: using `batch_read` value %u for window_max", window_max);
|
log_info("ttl: using `batch_read` value %u for window_max", window_max);
|
||||||
log_info("ttl: using `batch_write` value %u for count_max", count_max);
|
log_info("ttl: using `batch_write` value %u for count_max", count_max);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user