mdbx-test: смена расширения у C++ исходников.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2022-11-08 16:17:14 +03:00
parent 652ca2b5cb
commit d315a9255a
28 changed files with 69 additions and 69 deletions

View File

@ -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_LOG ?= $(shell [ -d /dev/shm ] && echo /dev/shm || echo /tmp)/mdbx-test.log
TEST_OSAL := $(shell $(uname2osal)) TEST_OSAL := $(shell $(uname2osal))
TEST_ITER := $(shell $(uname2titer)) TEST_ITER := $(shell $(uname2titer))
TEST_SRC := test/osal-$(TEST_OSAL).cc $(filter-out $(wildcard test/osal-*.cc), $(wildcard test/*.cc)) TEST_SRC := test/osal-$(TEST_OSAL).c++ $(filter-out $(wildcard test/osal-*.c++), $(wildcard test/*.c++))
TEST_INC := $(wildcard test/*.h) TEST_INC := $(wildcard test/*.h++)
TEST_OBJ := $(patsubst %.cc,%.o,$(TEST_SRC)) TEST_OBJ := $(patsubst %.c++,%.o,$(TEST_SRC))
TAR ?= $(shell which gnu-tar || echo tar) TAR ?= $(shell which gnu-tar || echo tar)
ZIP ?= $(shell which zip || echo "echo 'Please install zip'") 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) 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: reformat:
@echo ' RUNNING clang-format...' @echo ' RUNNING clang-format...'
$(QUIET)if [ -n "$(CLANG_FORMAT)" ]; then \ $(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 \ else \
echo "clang-format version 13..14 not found for 'reformat'"; \ echo "clang-format version 13..14 not found for 'reformat'"; \
fi fi
@ -469,7 +469,7 @@ mdbx_example: mdbx.h example/example-mdbx.c libmdbx.$(SO_SUFFIX)
build-test: all mdbx_example mdbx_test build-test: all mdbx_example mdbx_test
define test-rule 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 $$@' @echo ' CC $$@'
$(QUIET)$$(CXX) $$(CXXFLAGS) $$(MDBX_BUILD_OPTIONS) -c $(1) -o $$@ $(QUIET)$$(CXX) $$(CXXFLAGS) $$(MDBX_BUILD_OPTIONS) -c $(1) -o $$@

View File

@ -2,32 +2,32 @@ enable_language(CXX)
include(../cmake/compiler.cmake) include(../cmake/compiler.cmake)
set(LIBMDBX_TEST_SOURCES set(LIBMDBX_TEST_SOURCES
base.h base.h++
cases.cc cases.c++
chrono.cc chrono.c++
chrono.h chrono.h++
config.cc config.c++
config.h config.h++
copy.cc copy.c++
dead.cc dead.c++
hill.cc hill.c++
jitter.cc jitter.c++
keygen.cc keygen.c++
keygen.h keygen.h++
log.cc log.c++
log.h log.h++
main.cc main.c++
osal.h osal.h++
osal-unix.cc osal-unix.c++
osal-windows.cc osal-windows.c++
test.cc test.c++
test.h test.h++
try.cc try.c++
utils.cc utils.c++
utils.h utils.h++
append.cc append.c++
ttl.cc ttl.c++
nested.cc nested.c++
) )
if(NOT MDBX_BUILD_CXX) if(NOT MDBX_BUILD_CXX)

View File

@ -12,7 +12,7 @@
* <http://www.OpenLDAP.org/license.html>. * <http://www.OpenLDAP.org/license.html>.
*/ */
#include "test.h" #include "test.h++"
class testcase_append : public testcase { class testcase_append : public testcase {
public: public:

View File

@ -12,7 +12,7 @@
* <http://www.OpenLDAP.org/license.html>. * <http://www.OpenLDAP.org/license.html>.
*/ */
#include "test.h" #include "test.h++"
registry *registry::instance() { registry *registry::instance() {
static registry *singleton; static registry *singleton;

View File

@ -12,7 +12,7 @@
* <http://www.OpenLDAP.org/license.html>. * <http://www.OpenLDAP.org/license.html>.
*/ */
#include "test.h" #include "test.h++"
namespace chrono { namespace chrono {

View File

@ -14,8 +14,8 @@
#pragma once #pragma once
#include "base.h" #include "base.h++"
#include "utils.h" #include "utils.h++"
namespace chrono { namespace chrono {

View File

@ -12,7 +12,7 @@
* <http://www.OpenLDAP.org/license.html>. * <http://www.OpenLDAP.org/license.html>.
*/ */
#include "test.h" #include "test.h++"
#if defined(_MSC_VER) && !defined(strcasecmp) #if defined(_MSC_VER) && !defined(strcasecmp)
#define strcasecmp(str, len) _stricmp(str, len) #define strcasecmp(str, len) _stricmp(str, len)

View File

@ -14,9 +14,9 @@
#pragma once #pragma once
#include "base.h" #include "base.h++"
#include "log.h" #include "log.h++"
#include "utils.h" #include "utils.h++"
#define ACTOR_ID_MAX INT16_MAX #define ACTOR_ID_MAX INT16_MAX

View File

@ -1,4 +1,4 @@
#include "test.h" #include "test.h++"
class testcase_copy : public testcase { class testcase_copy : public testcase {
const std::string copy_pathname; const std::string copy_pathname;

View File

@ -12,7 +12,7 @@
* <http://www.OpenLDAP.org/license.html>. * <http://www.OpenLDAP.org/license.html>.
*/ */
#include "test.h" #include "test.h++"
class testcase_deadread : public testcase { class testcase_deadread : public testcase {
public: public:

View File

@ -12,7 +12,7 @@
* <http://www.OpenLDAP.org/license.html>. * <http://www.OpenLDAP.org/license.html>.
*/ */
#include "test.h" #include "test.h++"
/* LY: тест "холмиком": /* LY: тест "холмиком":
* - сначала наполняем таблицу циклическими CRUD-манипуляциями, * - сначала наполняем таблицу циклическими CRUD-манипуляциями,

View File

@ -12,7 +12,7 @@
* <http://www.OpenLDAP.org/license.html>. * <http://www.OpenLDAP.org/license.html>.
*/ */
#include "test.h" #include "test.h++"
class testcase_jitter : public testcase { class testcase_jitter : public testcase {
protected: protected:

View File

@ -12,7 +12,7 @@
* <http://www.OpenLDAP.org/license.html>. * <http://www.OpenLDAP.org/license.html>.
*/ */
#include "test.h" #include "test.h++"
namespace keygen { namespace keygen {

View File

@ -14,10 +14,10 @@
#pragma once #pragma once
#include "base.h" #include "base.h++"
#include "config.h" #include "config.h++"
#include "log.h" #include "log.h++"
#include "utils.h" #include "utils.h++"
namespace keygen { namespace keygen {

View File

@ -12,7 +12,7 @@
* <http://www.OpenLDAP.org/license.html>. * <http://www.OpenLDAP.org/license.html>.
*/ */
#include "test.h" #include "test.h++"
static void fflushall() { fflush(nullptr); } static void fflushall() { fflush(nullptr); }

View File

@ -14,8 +14,8 @@
#pragma once #pragma once
#include "base.h" #include "base.h++"
#include "chrono.h" #include "chrono.h++"
MDBX_NORETURN void usage(void); MDBX_NORETURN void usage(void);
MDBX_NORETURN void MDBX_PRINTF_ARGS(1, 2) failure(const char *fmt, ...); MDBX_NORETURN void MDBX_PRINTF_ARGS(1, 2) failure(const char *fmt, ...);

View File

@ -12,7 +12,7 @@
* <http://www.OpenLDAP.org/license.html>. * <http://www.OpenLDAP.org/license.html>.
*/ */
#include "test.h" #include "test.h++"
#if !(defined(_WIN32) || defined(_WIN64)) #if !(defined(_WIN32) || defined(_WIN64))
#include <sys/resource.h> #include <sys/resource.h>

View File

@ -12,7 +12,7 @@
* <http://www.OpenLDAP.org/license.html>. * <http://www.OpenLDAP.org/license.html>.
*/ */
#include "test.h" #include "test.h++"
#include <cmath> #include <cmath>
/* LY: тест "эмуляцией time-to-live" с вложенными транзакциями: /* LY: тест "эмуляцией time-to-live" с вложенными транзакциями:

View File

@ -12,7 +12,7 @@
* <http://www.OpenLDAP.org/license.html>. * <http://www.OpenLDAP.org/license.html>.
*/ */
#include "test.h" #include "test.h++"
#if !(defined(_WIN32) || defined(_WIN64)) #if !(defined(_WIN32) || defined(_WIN64))

View File

@ -12,7 +12,7 @@
* <http://www.OpenLDAP.org/license.html>. * <http://www.OpenLDAP.org/license.html>.
*/ */
#include "test.h" #include "test.h++"
#if defined(_WIN32) || defined(_WIN64) #if defined(_WIN32) || defined(_WIN64)

View File

@ -14,7 +14,7 @@
#pragma once #pragma once
#include "base.h" #include "base.h++"
void osal_setup(const std::vector<actor_config> &actors); void osal_setup(const std::vector<actor_config> &actors);
void osal_broadcast(unsigned id); void osal_broadcast(unsigned id);

View File

@ -12,7 +12,7 @@
* <http://www.OpenLDAP.org/license.html>. * <http://www.OpenLDAP.org/license.html>.
*/ */
#include "test.h" #include "test.h++"
const char *testcase2str(const actor_testcase testcase) { const char *testcase2str(const actor_testcase testcase) {
switch (testcase) { switch (testcase) {

View File

@ -14,13 +14,13 @@
#pragma once #pragma once
#include "base.h" #include "base.h++"
#include "chrono.h" #include "chrono.h++"
#include "config.h" #include "config.h++"
#include "keygen.h" #include "keygen.h++"
#include "log.h" #include "log.h++"
#include "osal.h" #include "osal.h++"
#include "utils.h" #include "utils.h++"
#include <deque> #include <deque>
#include <set> #include <set>

View File

@ -1,4 +1,4 @@
#include "test.h" #include "test.h++"
class testcase_try : public testcase { class testcase_try : public testcase {
public: public:

View File

@ -12,7 +12,7 @@
* <http://www.OpenLDAP.org/license.html>. * <http://www.OpenLDAP.org/license.html>.
*/ */
#include "test.h" #include "test.h++"
#include <cmath> #include <cmath>
#include <deque> #include <deque>

View File

@ -12,7 +12,7 @@
* <http://www.OpenLDAP.org/license.html>. * <http://www.OpenLDAP.org/license.html>.
*/ */
#include "test.h" #include "test.h++"
#include <float.h> #include <float.h>
#if defined(HAVE_IEEE754_H) || __has_include(<ieee754.h>) #if defined(HAVE_IEEE754_H) || __has_include(<ieee754.h>)
#include <ieee754.h> #include <ieee754.h>

View File

@ -13,7 +13,7 @@
*/ */
#pragma once #pragma once
#include "base.h" #include "base.h++"
#if !defined(__BYTE_ORDER__) || !defined(__ORDER_LITTLE_ENDIAN__) || \ #if !defined(__BYTE_ORDER__) || !defined(__ORDER_LITTLE_ENDIAN__) || \
!defined(__ORDER_BIG_ENDIAN__) !defined(__ORDER_BIG_ENDIAN__)