mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-28 18:18:49 +08:00
mdbx-test: смена расширения у C++ исходников.
This commit is contained in:
parent
652ca2b5cb
commit
d315a9255a
10
GNUmakefile
10
GNUmakefile
@ -353,9 +353,9 @@ TEST_DB ?= $(shell [ -d /dev/shm ] && echo /dev/shm || echo /tmp)/mdbx-test.d
|
||||
TEST_LOG ?= $(shell [ -d /dev/shm ] && echo /dev/shm || echo /tmp)/mdbx-test.log
|
||||
TEST_OSAL := $(shell $(uname2osal))
|
||||
TEST_ITER := $(shell $(uname2titer))
|
||||
TEST_SRC := test/osal-$(TEST_OSAL).cc $(filter-out $(wildcard test/osal-*.cc), $(wildcard test/*.cc))
|
||||
TEST_INC := $(wildcard test/*.h)
|
||||
TEST_OBJ := $(patsubst %.cc,%.o,$(TEST_SRC))
|
||||
TEST_SRC := test/osal-$(TEST_OSAL).c++ $(filter-out $(wildcard test/osal-*.c++), $(wildcard test/*.c++))
|
||||
TEST_INC := $(wildcard test/*.h++)
|
||||
TEST_OBJ := $(patsubst %.c++,%.o,$(TEST_SRC))
|
||||
TAR ?= $(shell which gnu-tar || echo tar)
|
||||
ZIP ?= $(shell which zip || echo "echo 'Please install zip'")
|
||||
CLANG_FORMAT ?= $(shell (which clang-format-14 || which clang-format-13 || which clang-format) 2>/dev/null)
|
||||
@ -363,7 +363,7 @@ CLANG_FORMAT ?= $(shell (which clang-format-14 || which clang-format-13 || which
|
||||
reformat:
|
||||
@echo ' RUNNING clang-format...'
|
||||
$(QUIET)if [ -n "$(CLANG_FORMAT)" ]; then \
|
||||
git ls-files | grep -E '\.(c|cxx|cc|cpp|h|hxx|hpp)(\.in)?$$' | xargs -r $(CLANG_FORMAT) -i --style=file; \
|
||||
git ls-files | grep -E '\.(c|c++|h|h++)(\.in)?$$' | xargs -r $(CLANG_FORMAT) -i --style=file; \
|
||||
else \
|
||||
echo "clang-format version 13..14 not found for 'reformat'"; \
|
||||
fi
|
||||
@ -469,7 +469,7 @@ mdbx_example: mdbx.h example/example-mdbx.c libmdbx.$(SO_SUFFIX)
|
||||
build-test: all mdbx_example mdbx_test
|
||||
|
||||
define test-rule
|
||||
$(patsubst %.cc,%.o,$(1)): $(1) $(TEST_INC) $(HEADERS) $(lastword $(MAKEFILE_LIST))
|
||||
$(patsubst %.c++,%.o,$(1)): $(1) $(TEST_INC) $(HEADERS) $(lastword $(MAKEFILE_LIST))
|
||||
@echo ' CC $$@'
|
||||
$(QUIET)$$(CXX) $$(CXXFLAGS) $$(MDBX_BUILD_OPTIONS) -c $(1) -o $$@
|
||||
|
||||
|
@ -2,32 +2,32 @@ enable_language(CXX)
|
||||
include(../cmake/compiler.cmake)
|
||||
|
||||
set(LIBMDBX_TEST_SOURCES
|
||||
base.h
|
||||
cases.cc
|
||||
chrono.cc
|
||||
chrono.h
|
||||
config.cc
|
||||
config.h
|
||||
copy.cc
|
||||
dead.cc
|
||||
hill.cc
|
||||
jitter.cc
|
||||
keygen.cc
|
||||
keygen.h
|
||||
log.cc
|
||||
log.h
|
||||
main.cc
|
||||
osal.h
|
||||
osal-unix.cc
|
||||
osal-windows.cc
|
||||
test.cc
|
||||
test.h
|
||||
try.cc
|
||||
utils.cc
|
||||
utils.h
|
||||
append.cc
|
||||
ttl.cc
|
||||
nested.cc
|
||||
base.h++
|
||||
cases.c++
|
||||
chrono.c++
|
||||
chrono.h++
|
||||
config.c++
|
||||
config.h++
|
||||
copy.c++
|
||||
dead.c++
|
||||
hill.c++
|
||||
jitter.c++
|
||||
keygen.c++
|
||||
keygen.h++
|
||||
log.c++
|
||||
log.h++
|
||||
main.c++
|
||||
osal.h++
|
||||
osal-unix.c++
|
||||
osal-windows.c++
|
||||
test.c++
|
||||
test.h++
|
||||
try.c++
|
||||
utils.c++
|
||||
utils.h++
|
||||
append.c++
|
||||
ttl.c++
|
||||
nested.c++
|
||||
)
|
||||
|
||||
if(NOT MDBX_BUILD_CXX)
|
||||
|
@ -12,7 +12,7 @@
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
|
||||
#include "test.h"
|
||||
#include "test.h++"
|
||||
|
||||
class testcase_append : public testcase {
|
||||
public:
|
@ -12,7 +12,7 @@
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
|
||||
#include "test.h"
|
||||
#include "test.h++"
|
||||
|
||||
registry *registry::instance() {
|
||||
static registry *singleton;
|
@ -12,7 +12,7 @@
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
|
||||
#include "test.h"
|
||||
#include "test.h++"
|
||||
|
||||
namespace chrono {
|
||||
|
@ -14,8 +14,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "base.h"
|
||||
#include "utils.h"
|
||||
#include "base.h++"
|
||||
#include "utils.h++"
|
||||
|
||||
namespace chrono {
|
||||
|
@ -12,7 +12,7 @@
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
|
||||
#include "test.h"
|
||||
#include "test.h++"
|
||||
|
||||
#if defined(_MSC_VER) && !defined(strcasecmp)
|
||||
#define strcasecmp(str, len) _stricmp(str, len)
|
@ -14,9 +14,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "base.h"
|
||||
#include "log.h"
|
||||
#include "utils.h"
|
||||
#include "base.h++"
|
||||
#include "log.h++"
|
||||
#include "utils.h++"
|
||||
|
||||
#define ACTOR_ID_MAX INT16_MAX
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "test.h"
|
||||
#include "test.h++"
|
||||
|
||||
class testcase_copy : public testcase {
|
||||
const std::string copy_pathname;
|
@ -12,7 +12,7 @@
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
|
||||
#include "test.h"
|
||||
#include "test.h++"
|
||||
|
||||
class testcase_deadread : public testcase {
|
||||
public:
|
@ -12,7 +12,7 @@
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
|
||||
#include "test.h"
|
||||
#include "test.h++"
|
||||
|
||||
/* LY: тест "холмиком":
|
||||
* - сначала наполняем таблицу циклическими CRUD-манипуляциями,
|
@ -12,7 +12,7 @@
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
|
||||
#include "test.h"
|
||||
#include "test.h++"
|
||||
|
||||
class testcase_jitter : public testcase {
|
||||
protected:
|
@ -12,7 +12,7 @@
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
|
||||
#include "test.h"
|
||||
#include "test.h++"
|
||||
|
||||
namespace keygen {
|
||||
|
@ -14,10 +14,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "base.h"
|
||||
#include "config.h"
|
||||
#include "log.h"
|
||||
#include "utils.h"
|
||||
#include "base.h++"
|
||||
#include "config.h++"
|
||||
#include "log.h++"
|
||||
#include "utils.h++"
|
||||
|
||||
namespace keygen {
|
||||
|
@ -12,7 +12,7 @@
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
|
||||
#include "test.h"
|
||||
#include "test.h++"
|
||||
|
||||
static void fflushall() { fflush(nullptr); }
|
||||
|
@ -14,8 +14,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "base.h"
|
||||
#include "chrono.h"
|
||||
#include "base.h++"
|
||||
#include "chrono.h++"
|
||||
|
||||
MDBX_NORETURN void usage(void);
|
||||
MDBX_NORETURN void MDBX_PRINTF_ARGS(1, 2) failure(const char *fmt, ...);
|
@ -12,7 +12,7 @@
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
|
||||
#include "test.h"
|
||||
#include "test.h++"
|
||||
|
||||
#if !(defined(_WIN32) || defined(_WIN64))
|
||||
#include <sys/resource.h>
|
@ -12,7 +12,7 @@
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
|
||||
#include "test.h"
|
||||
#include "test.h++"
|
||||
#include <cmath>
|
||||
|
||||
/* LY: тест "эмуляцией time-to-live" с вложенными транзакциями:
|
@ -12,7 +12,7 @@
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
|
||||
#include "test.h"
|
||||
#include "test.h++"
|
||||
|
||||
#if !(defined(_WIN32) || defined(_WIN64))
|
||||
|
@ -12,7 +12,7 @@
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
|
||||
#include "test.h"
|
||||
#include "test.h++"
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "base.h"
|
||||
#include "base.h++"
|
||||
|
||||
void osal_setup(const std::vector<actor_config> &actors);
|
||||
void osal_broadcast(unsigned id);
|
@ -12,7 +12,7 @@
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
|
||||
#include "test.h"
|
||||
#include "test.h++"
|
||||
|
||||
const char *testcase2str(const actor_testcase testcase) {
|
||||
switch (testcase) {
|
@ -14,13 +14,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "base.h"
|
||||
#include "chrono.h"
|
||||
#include "config.h"
|
||||
#include "keygen.h"
|
||||
#include "log.h"
|
||||
#include "osal.h"
|
||||
#include "utils.h"
|
||||
#include "base.h++"
|
||||
#include "chrono.h++"
|
||||
#include "config.h++"
|
||||
#include "keygen.h++"
|
||||
#include "log.h++"
|
||||
#include "osal.h++"
|
||||
#include "utils.h++"
|
||||
|
||||
#include <deque>
|
||||
#include <set>
|
@ -1,4 +1,4 @@
|
||||
#include "test.h"
|
||||
#include "test.h++"
|
||||
|
||||
class testcase_try : public testcase {
|
||||
public:
|
@ -12,7 +12,7 @@
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
|
||||
#include "test.h"
|
||||
#include "test.h++"
|
||||
#include <cmath>
|
||||
#include <deque>
|
||||
|
@ -12,7 +12,7 @@
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
|
||||
#include "test.h"
|
||||
#include "test.h++"
|
||||
#include <float.h>
|
||||
#if defined(HAVE_IEEE754_H) || __has_include(<ieee754.h>)
|
||||
#include <ieee754.h>
|
@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "base.h"
|
||||
#include "base.h++"
|
||||
|
||||
#if !defined(__BYTE_ORDER__) || !defined(__ORDER_LITTLE_ENDIAN__) || \
|
||||
!defined(__ORDER_BIG_ENDIAN__)
|
Loading…
x
Reference in New Issue
Block a user