diff options
author | Luke Chen <luke.chen@mongodb.com> | 2022-02-02 15:00:17 +1100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-02-02 04:51:20 +0000 |
commit | 5fea92ae32c7265a957ed760946f75b7c75c0e2e (patch) | |
tree | d6fbf3ea747337e0148dca2c1e64f13654a39e5e /src/third_party/wiredtiger | |
parent | 5f19771466dff7642eacbc2dfe4d4bfb1074b8a4 (diff) | |
download | mongo-5fea92ae32c7265a957ed760946f75b7c75c0e2e.tar.gz |
Import wiredtiger: 0d65fabfca1e3435e8f8298a98d4fc91c56e331c from branch mongodb-master
ref: 9e92b73891..0d65fabfca
for: 5.3.0
WT-7598 Remove autoconf & scons build systems
Diffstat (limited to 'src/third_party/wiredtiger')
98 files changed, 354 insertions, 3210 deletions
diff --git a/src/third_party/wiredtiger/SConstruct b/src/third_party/wiredtiger/SConstruct deleted file mode 100644 index 35968868be5..00000000000 --- a/src/third_party/wiredtiger/SConstruct +++ /dev/null @@ -1,506 +0,0 @@ -# -*- mode: python; -*- -import re -import os -import shutil -import subprocess -import sys -import tempfile -import textwrap -import distutils.sysconfig - -EnsureSConsVersion( 2, 0, 0 ) -EnsurePythonVersion(3, 0) - -if not os.sys.platform == "win32": - print ("SConstruct is only supported for Windows, use build_posix for other platforms") - Exit(1) - -# Command line options -# -AddOption("--dynamic-crt", dest="dynamic-crt", action="store_true", default=False, - help="Link with the MSVCRT DLL version") - -AddOption("--enable-attach", dest="attach", action="store_true", default=False, - help="Configure for debugger attach on failure.") - -AddOption("--disable-standalone-build", dest="standalone-build", action="store_true", default=False, - help="Disable WT Standalone build.") - -AddOption("--enable-diagnostic", dest="diagnostic", action="store_true", default=False, - help="Configure WiredTiger to perform various run-time diagnostic tests. DO NOT configure this option in production environments.") - -AddOption("--enable-lz4", dest="lz4", type="string", nargs=1, action="store", - help="Use LZ4 compression") - -AddOption("--enable-memkind", dest="memkind", type="string", nargs=1, action="store", - help="Enable support for Intel memkind library, needed for NVRAM block cache.") - -AddOption("--enable-python", dest="lang-python", type="string", nargs=1, action="store", - help="Build Python extension, specify location of swig.exe binary") - -AddOption("--enable-snappy", dest="snappy", type="string", nargs=1, action="store", - help="Use snappy compression") - -AddOption("--enable-tcmalloc", dest="tcmalloc", type="string", nargs=1, action="store", - help="Use TCMalloc for memory allocation") - -AddOption("--enable-zlib", dest="zlib", type="string", nargs=1, action="store", - help="Use zlib compression") - -AddOption("--prefix", dest="prefix", type="string", nargs=1, action="store", default="package", - help="Install directory") - -# Get the swig binary from the command line option since SCONS cannot find it automatically -# -swig_binary = GetOption("lang-python") - -# Initialize environment -# -var = Variables() - -var.Add('MSVC_USE_SCRIPT', 'Path to vcvars.bat to override SCons default VS tool search'); - -var.Add('CPPPATH', 'C Preprocessor include path', [ - "#/src/include/", - "#/build_win", - "#/test/windows", - "#/.", -]) - -var.Add('LIBPATH', 'Adds paths to the linker search path', []) - -var.Add('CFLAGS', 'C Compiler Flags', [ - "/W3", # Warning level 3 - "/WX", # Warnings are fatal - "/wd4090", # Ignore warning about mismatched const qualifiers - "/wd4996", # Ignore deprecated functions - "/we4100", # Complain about unreferenced format parameter - "/Z7", # Generate debugging symbols - "/TC", # Compile as C code - #"/Od", # Disable optimization - "/Ob1", # inline expansion - "/O2", # optimize for speed - "/GF", # enable string pooling - "/EHsc", # extern "C" does not throw - #"/RTC1", # enable stack checks - "/GS", # enable security checks - "/Gy", # separate functions for linker - "/Zc:wchar_t", - "/Gd", - "/MD" if GetOption("dynamic-crt") else "/MT", -]) - -var.Add('LINKFLAGS', 'Linker Flags', [ - "/DEBUG", # Generate debug symbols - "/INCREMENTAL:NO", # Disable incremental linking - "/OPT:REF", # Remove dead code - "/DYNAMICBASE", - "/NXCOMPAT", -]) - -var.Add('TOOLS', 'SCons tools', [ - "default", - "swig", - "textfile" -]) - -var.Add('SWIG', 'SWIG binary location', swig_binary) - -env = Environment( - variables = var -) - -env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1 - -useZlib = GetOption("zlib") -useSnappy = GetOption("snappy") -useLz4 = GetOption("lz4") -useTcmalloc = GetOption("tcmalloc") -useMemkind = GetOption("memkind") -wtlibs = [] - -conf = Configure(env) -if not conf.CheckCHeader('stdlib.h'): - print('stdlib.h must be installed!') - Exit(1) - -if useZlib: - conf.env.Append(CPPPATH=[useZlib + "/include"]) - conf.env.Append(LIBPATH=[useZlib + "/lib"]) - if conf.CheckCHeader('zlib.h'): - conf.env.Append(CPPDEFINES=["HAVE_BUILTIN_EXTENSION_ZLIB"]) - wtlibs.append("zlib") - else: - print('zlib.h must be installed!') - Exit(1) - -if useSnappy: - conf.env.Append(CPPPATH=[useSnappy + "/include"]) - conf.env.Append(LIBPATH=[useSnappy + "/lib"]) - if conf.CheckCHeader('snappy-c.h'): - conf.env.Append(CPPDEFINES=['HAVE_BUILTIN_EXTENSION_SNAPPY']) - wtlibs.append("snappy") - else: - print('snappy-c.h must be installed!') - Exit(1) - -if useLz4: - conf.env.Append(CPPPATH=[useLz4 + "/include"]) - conf.env.Append(LIBPATH=[useLz4 + "/lib"]) - if conf.CheckCHeader('lz4.h'): - conf.env.Append(CPPDEFINES=['HAVE_BUILTIN_EXTENSION_LZ4']) - wtlibs.append("lz4") - else: - print('lz4.h must be installed!') - Exit(1) - -if useTcmalloc: - conf.env.Append(CPPPATH=[useTcmalloc + "/include"]) - conf.env.Append(LIBPATH=[useTcmalloc + "/lib"]) - if conf.CheckCHeader('gperftools/tcmalloc.h'): - wtlibs.append("libtcmalloc_minimal") - conf.env.Append(CPPDEFINES=['HAVE_LIBTCMALLOC']) - conf.env.Append(CPPDEFINES=['HAVE_POSIX_MEMALIGN']) - else: - print('tcmalloc.h must be installed!') - Exit(1) - -if useMemkind: - conf.env.Append(CPPPATH=[useMemkind + "/include"]) - conf.env.Append(LIBPATH=[useMemkind + "/lib"]) - if conf.CheckCHeader('memkind.h'): - conf.env.Append(CPPDEFINES=['HAVE_MEMKIND']) - wtlibs.append("memkind") - else: - print('memkind.h must be installed!') - Exit(1) - -env = conf.Finish() - -# Configure build environment variables -# -if GetOption("attach"): - env.Append(CPPDEFINES = ["HAVE_ATTACH"]) - -if GetOption("diagnostic"): - env.Append(CPPDEFINES = ["HAVE_DIAGNOSTIC"]) - -if GetOption("lang-python"): - env.Append(LIBPATH=[distutils.sysconfig.PREFIX + r"\libs"]) - env.Append(CPPPATH=[distutils.sysconfig.get_python_inc()]) - -disableStandaloneBuild = GetOption("standalone-build") -if disableStandaloneBuild: - print('Disable Standalone Build') -else: - env.Append(CPPDEFINES = ["WT_STANDALONE_BUILD"]) - -# Build WiredTiger.h file -# -version_file = 'build_posix/aclocal/version-set.m4' - -VERSION_MAJOR = None -VERSION_MINOR = None -VERSION_PATCH = None -VERSION_STRING = None - -# Read the version information from the version-set.m4 file -for l in open(File(version_file).srcnode().abspath): - if re.match(r'^VERSION_[A-Z]+', l): - exec(l) - -if (VERSION_MAJOR == None or - VERSION_MINOR == None or - VERSION_PATCH == None or - VERSION_STRING == None): - print("Failed to find version variables in " + version_file) - Exit(1) - -wiredtiger_includes = """ - #include <sys/types.h> - #include <stdarg.h> - #include <stdbool.h> - #include <stdint.h> - #include <stdio.h> - """ -wiredtiger_includes = textwrap.dedent(wiredtiger_includes) -replacements = { - '@VERSION_MAJOR@' : VERSION_MAJOR, - '@VERSION_MINOR@' : VERSION_MINOR, - '@VERSION_PATCH@' : VERSION_PATCH, - '@VERSION_STRING@' : VERSION_STRING, - '@uintmax_t_decl@': "", - '@uintptr_t_decl@': "", - '@off_t_decl@' : 'typedef int64_t wt_off_t;', - '@wiredtiger_includes_decl@': wiredtiger_includes -} - -wtheader = env.Substfile( - target='wiredtiger.h', - source=[ - 'src/include/wiredtiger.in', - ], - SUBST_DICT=replacements) - -# -# WiredTiger library -# -# Map WiredTiger build conditions: any conditions that appear in WiredTiger's -# dist/filelist must appear here, and if the value is true, those files will be -# included. -# -condition_map = { - 'ARM64_HOST' : False, - 'POSIX_HOST' : env['PLATFORM'] == 'posix', - 'POWERPC_HOST' : False, - 'RISCV64_HOST' : False, - 'WINDOWS_HOST' : env['PLATFORM'] == 'win32', - 'X86_HOST' : True, - 'ZSERIES_HOST' : False, -} - -def filtered_filelist(f): - for line in f: - file_cond = line.split() - if line.startswith("#") or len(file_cond) == 0: - continue - if len(file_cond) == 1 or condition_map[file_cond[1]]: - yield file_cond[0] - -filelistfile = r'dist/filelist' -wtsources = list(filtered_filelist(open(filelistfile))) - -if useZlib: - wtsources.append("ext/compressors/zlib/zlib_compress.c") - -if useSnappy: - wtsources.append("ext/compressors/snappy/snappy_compress.c") - -if useLz4: - wtsources.append("ext/compressors/lz4/lz4_compress.c") - -wt_objs = [env.Object(a) for a in wtsources] - -# Static Library - libwiredtiger.lib -# -wtlib = env.Library( - target="libwiredtiger", - source=wt_objs, LIBS=wtlibs) - -env.Depends(wtlib, [filelistfile, version_file]) - -# Dynamically Loaded Library - wiredtiger.dll -# -wtdll = env.SharedLibrary( - target="wiredtiger", - source=wt_objs + ['build_win/wiredtiger.def'], LIBS=wtlibs) - -env.Depends(wtdll, [filelistfile, version_file]) - -Default(wtlib, wtdll) - -wtbin = env.Program("wt", [ - "src/utilities/util_alter.c", - "src/utilities/util_backup.c", - "src/utilities/util_compact.c", - "src/utilities/util_cpyright.c", - "src/utilities/util_create.c", - "src/utilities/util_downgrade.c", - "src/utilities/util_drop.c", - "src/utilities/util_dump.c", - "src/utilities/util_list.c", - "src/utilities/util_load.c", - "src/utilities/util_load_json.c", - "src/utilities/util_loadtext.c", - "src/utilities/util_main.c", - "src/utilities/util_misc.c", - "src/utilities/util_printlog.c", - "src/utilities/util_read.c", - "src/utilities/util_rename.c", - "src/utilities/util_salvage.c", - "src/utilities/util_stat.c", - "src/utilities/util_truncate.c", - "src/utilities/util_upgrade.c", - "src/utilities/util_verbose.c", - "src/utilities/util_verify.c", - "src/utilities/util_write.c"], - LIBS=[wtlib] + wtlibs) - -Default(wtbin) - -# Python SWIG wrapper for WiredTiger -if GetOption("lang-python"): - # Check that this version of python is 64-bit - # - if sys.maxsize < 2**32: - print("The Python Interpreter must be 64-bit in order to build the python bindings") - Exit(1) - - pythonEnv = env.Clone() - pythonEnv.Append(SWIGFLAGS=[ - "-python", - "-threads", - "-O", - "-nodefaultctor", - "-nodefaultdtor", - ]) - # Ignore warnings in swig-generated code. - pythonEnv['CFLAGS'].remove("/WX") - pythonEnv['CFLAGS'].remove("/we4100") - - swiglib = pythonEnv.SharedLibrary('_wiredtiger', - [ 'lang\python\wiredtiger.i'], - SHLIBSUFFIX=".pyd", - LIBS=[wtlib] + wtlibs) - - # Shuffle the wiredtiger __init__ into place. - copySwig1 = pythonEnv.Command( - 'lang/python/wiredtiger/swig_wiredtiger.py', - 'lang/python/wiredtiger.py', - Copy('$TARGET', '$SOURCE')) - pythonEnv.Depends(copySwig1, swiglib) - - copySwig2 = pythonEnv.Command( - 'lang/python/wiredtiger/__init__.py', - 'lang/python/wiredtiger/init.py', - Copy('$TARGET', '$SOURCE')) - pythonEnv.Depends(copySwig2, swiglib) - - swiginstall = pythonEnv.Install('lang/python/wiredtiger/', swiglib) - - Default(swiginstall, copySwig1, copySwig2) - -# Shim library of functions to emulate POSIX on Windows -shim = env.Library("window_shim", - ["test/windows/windows_shim.c"]) - - - -examples = [ - "ex_access", - # Temporarily disabled - # "ex_all", - "ex_call_center", - "ex_config_parse", - "ex_cursor", - "ex_data_source", - "ex_encrypt", - "ex_extending", - "ex_file_system", - "ex_hello", - "ex_log", - "ex_pack", - "ex_process", - "ex_schema", - "ex_stat", - "ex_thread", - ] - -# WiredTiger Smoke Test support -# Runs each test in a custom temporary directory -def run_smoke_test(x): - print("Running Smoke Test: " + x) - - # Make temp dir - temp_dir = tempfile.mkdtemp(prefix="wt_home") - - try: - # Set WT_HOME environment variable for test - os.environ["WIREDTIGER_HOME"] = temp_dir - - # Run the test - ret = subprocess.call(x); - if( ret != 0): - sys.stderr.write("Bad exit code %d\n" % (ret)) - raise Exception() - - finally: - # Clean directory - # - shutil.rmtree(temp_dir) - -def builder_smoke_test(target, source, env): - run_smoke_test(source[0].abspath) - return None - -env.Append(BUILDERS={'SmokeTest' : Builder(action = builder_smoke_test)}) - -#Build the tests and setup the "scons test" target -testutil = env.Library('testutil', - [ - 'test/utility/misc.c', - 'test/utility/parse_opts.c' - ]) -env.Append(CPPPATH=["test/utility"]) - -t = env.Program("t_bloom", - "test/bloom/test_bloom.c", - LIBS=[wtlib, shim, testutil] + wtlibs) -Default(t) - -t = env.Program("t_checkpoint", - ["test/checkpoint/checkpointer.c", - "test/checkpoint/test_checkpoint.c", - "test/checkpoint/workers.c"], - LIBS=[wtlib, shim, testutil] + wtlibs) -Default(t) - -t = env.Program("t_cursor_order", - ["test/cursor_order/cursor_order.c", - "test/cursor_order/cursor_order_file.c", - "test/cursor_order/cursor_order_ops.c"], - LIBS=[wtlib, shim, testutil] + wtlibs) -Default(t) - -t = env.Program("t_fops", - ["test/fops/file.c", - "test/fops/fops.c", - "test/fops/t.c"], - LIBS=[wtlib, shim, testutil] + wtlibs) -Default(t) - -t = env.Program("t_huge", - "test/huge/huge.c", - LIBS=[wtlib, shim, testutil] + wtlibs) -Default(t) - -t = env.Program("t_manydbs", - "test/manydbs/manydbs.c", - LIBS=[wtlib, shim, testutil] + wtlibs) -Default(t) - -t = env.Program("wtperf", [ - "bench/wtperf/config.c", - "bench/wtperf/idle_table_cycle.c", - "bench/wtperf/misc.c", - "bench/wtperf/track.c", - "bench/wtperf/wtperf.c", - "bench/wtperf/wtperf_throttle.c", - "bench/wtperf/wtperf_truncate.c", - ], - LIBS=[wtlib, shim, testutil] + wtlibs) -Default(t) - -t = env.Program('wt2695_checksum', ['test/csuite/wt2695_checksum/main.c'], - LIBS=[wtlib, shim, testutil] + wtlibs) -Default(t) - -t = env.Program('wt4117_checksum', ['test/csuite/wt4117_checksum/main.c'], - LIBS=[wtlib, shim, testutil] + wtlibs) -Default(t) - -#Build the Examples -for ex in examples: - exp = env.Program(ex, "examples/c/" + ex + ".c", LIBS=[wtlib, shim, testutil] + wtlibs) - Default(exp) - if not ex == 'ex_log': - env.Alias("check", env.SmokeTest(exp)) - -# Install Target -# -prefix = GetOption("prefix") -env.Alias("install", env.Install(os.path.join(prefix, "bin"), wtbin)) -env.Alias("install", env.Install(os.path.join(prefix, "bin"), wtdll[0])) # Just the dll -env.Alias("install", env.Install(os.path.join(prefix, "include"), wtheader)) -env.Alias("install", env.Install(os.path.join(prefix, "lib"), wtdll[1])) # Just the import lib -env.Alias("install", env.Install(os.path.join(prefix, "lib"), wtlib)) diff --git a/src/third_party/wiredtiger/autogen.sh b/src/third_party/wiredtiger/autogen.sh deleted file mode 100755 index 0fb46feb9da..00000000000 --- a/src/third_party/wiredtiger/autogen.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# Helper script with a familiar name to run auto* on a development tree. -sh `dirname $0`/build_posix/reconf diff --git a/src/third_party/wiredtiger/bench/workgen/Makefile.am b/src/third_party/wiredtiger/bench/workgen/Makefile.am deleted file mode 100644 index a40967002c1..00000000000 --- a/src/third_party/wiredtiger/bench/workgen/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -# FIX-ME-WT-8263: Remove the next line to keep the flags defined in configure.ac.in -AM_CXXFLAGS = -AM_CPPFLAGS = -I$(top_builddir) -AM_CPPFLAGS +=-I$(top_srcdir)/src/include -AM_CPPFLAGS +=-I$(top_srcdir)/test/utility - -PYSRC = $(top_srcdir)/bench/workgen -PYDIRS = -t $(abs_builddir) -I $(abs_top_srcdir):$(abs_top_builddir) -L $(abs_top_builddir)/.libs:$(abs_top_builddir)/bench/workgen/.libs -all-local: _workgen.so libworkgen.la -libworkgen_la_SOURCES = workgen.cxx workgen_func.c -noinst_LTLIBRARIES = libworkgen.la - -# We keep generated Python sources under bench/workgen. -$(PYSRC)/workgen_wrap.cxx: $(PYSRC)/workgen.h $(PYSRC)/workgen.i - (cd $(PYSRC) && \ - $(SWIG) -c++ -python -threads -O -Wall -I$(abs_top_builddir) -outdir ./workgen workgen.i) - -_workgen.so: $(top_builddir)/libwiredtiger.la $(PYSRC)/workgen_wrap.cxx libworkgen.la $(PYSRC)/workgen.h $(PYSRC)/workgen_time.h - (cd $(PYSRC) && \ - $(PYTHON) setup.py build_ext -f -b $(abs_builddir) $(PYDIRS)) - -install-exec-local: - (cd $(PYSRC) && \ - $(PYTHON) setup.py build_py -d $(abs_builddir)/build && \ - $(PYTHON) setup.py build_ext -f -b $(abs_builddir)/build $(PYDIRS) && \ - $(PYTHON) setup.py install_lib -b $(abs_builddir)/build --skip-build $(PYTHON_INSTALL_ARG)) - -# We build in different places for an install vs running from the tree: -# clean up both. Don't rely on "setup.py clean" -- everything that should -# be removed is created under the build directory. -clean-local: - rm -rf build _workgen.so workgen_wrap.o WT_TEST diff --git a/src/third_party/wiredtiger/bench/workgen/runner/runner/__init__.py b/src/third_party/wiredtiger/bench/workgen/runner/runner/__init__.py index be3d4b565e5..d758d953af4 100755 --- a/src/third_party/wiredtiger/bench/workgen/runner/runner/__init__.py +++ b/src/third_party/wiredtiger/bench/workgen/runner/runner/__init__.py @@ -34,11 +34,19 @@ import os, sys thisdir = os.path.dirname(os.path.abspath(__file__)) workgen_src = os.path.dirname(os.path.dirname(thisdir)) wt_dir = os.path.dirname(os.path.dirname(workgen_src)) +curdir = os.getcwd() env_builddir = os.getenv('WT_BUILDDIR') if env_builddir: wt_builddir = env_builddir +elif os.path.isfile(os.path.join(curdir, 'wt')): + wt_builddir = curdir else: - wt_builddir = os.path.join(wt_dir, 'build_posix') + # Print a warning that we can't find a useable WiredTiger build. We will + # proceed however in the chance the Python paths are set up correctly. + print('Warning: Unable to identify WiredTiger build. Please consider either:\n' + '- Setting \'WT_BUILDDIR\' environment variable to specify the build directory.\n' + '- Calling workgen from the root of the build directory.') + wt_builddir = '' def _prepend_env_path(pathvar, s): last = '' @@ -60,15 +68,15 @@ except: try: import wiredtiger except: - # If the .libs directory is not in our library search path, + # If the WiredTiger libraries is not in our library search path, # we need to set it and retry. However, the dynamic link # library has already cached its value, our only option is # to restart the Python interpreter. if '_workgen_init' not in os.environ: os.environ['_workgen_init'] = 'true' - dotlibs = os.path.join(wt_builddir, '.libs') - _prepend_env_path('LD_LIBRARY_PATH', dotlibs) - _prepend_env_path('DYLD_LIBRARY_PATH', dotlibs) + libsdir = os.path.join(wt_builddir) + _prepend_env_path('LD_LIBRARY_PATH', libsdir) + _prepend_env_path('DYLD_LIBRARY_PATH', libsdir) py_args = sys.argv py_args.insert(0, sys.executable) try: @@ -76,7 +84,7 @@ except: except Exception as exception: print('re-exec failed: ' + str(exception), file=sys.stderr) print(' exec(' + sys.executable + ', ' + str(py_args) + ')') - print('Try adding "' + dotlibs + '" to the', file=sys.stderr) + print('Try adding "' + libsdir + '" to the', file=sys.stderr) print('LD_LIBRARY_PATH environment variable before running ' + \ 'this program again.', file=sys.stderr) sys.exit(1) diff --git a/src/third_party/wiredtiger/bench/workgen/runner/runner/core.py b/src/third_party/wiredtiger/bench/workgen/runner/runner/core.py index 3851634199d..a7907e90f81 100755 --- a/src/third_party/wiredtiger/bench/workgen/runner/runner/core.py +++ b/src/third_party/wiredtiger/bench/workgen/runner/runner/core.py @@ -57,11 +57,15 @@ def timed(seconds, op): result._timed = seconds return result -# Check for a local build that contains the wt utility. First check in -# current working directory, then in build_posix and finally in the disttop -# directory. This isn't ideal - if a user has multiple builds in a tree we -# could pick the wrong one. +# Check for a local build that contains the wt utility. First check for a +# user supplied 'WT_BUILDDIR' environment variable, then the current working +# directory, then finally in in the disttop directory. This isn't +# ideal - if a user has multiple builds in a tree we could pick the wrong one. def _wiredtiger_builddir(): + env_builddir = os.getenv('WT_BUILDDIR') + if env_builddir and os.path.isfile(os.path.join(env_builddir, 'wt')): + return env_builddir + if os.path.isfile(os.path.join(os.getcwd(), 'wt')): return os.getcwd() @@ -71,8 +75,6 @@ def _wiredtiger_builddir(): thisdir, os.pardir, os.pardir, os.pardir, os.pardir) if os.path.isfile(os.path.join(wt_disttop, 'wt')): return wt_disttop - if os.path.isfile(os.path.join(wt_disttop, 'build_posix', 'wt')): - return os.path.join(wt_disttop, 'build_posix') if os.path.isfile(os.path.join(wt_disttop, 'wt.exe')): return wt_disttop raise Exception('Unable to find useable WiredTiger build') diff --git a/src/third_party/wiredtiger/bench/wtperf/Makefile.am b/src/third_party/wiredtiger/bench/wtperf/Makefile.am deleted file mode 100644 index 5690d03224e..00000000000 --- a/src/third_party/wiredtiger/bench/wtperf/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -AM_CPPFLAGS +=-I$(top_srcdir)/src/include -AM_CPPFLAGS +=-I$(top_srcdir)/test/utility - -noinst_PROGRAMS = wtperf -wtperf_SOURCES =\ - config.c idle_table_cycle.c misc.c track.c wtperf.c \ - wtperf.h wtperf_opt.i wtperf_throttle.c wtperf_truncate.c - -wtperf_LDADD = $(top_builddir)/test/utility/libtest_util.la -wtperf_LDADD +=$(top_builddir)/libwiredtiger.la -wtperf_LDADD +=-lm -wtperf_LDFLAGS = -static - -TESTS = smoke.sh -AM_TESTS_ENVIRONMENT = rm -rf WT_TEST ; mkdir WT_TEST ; -# automake 1.11 compatibility -TESTS_ENVIRONMENT = $(AM_TESTS_ENVIRONMENT) - -clean-local: - rm -rf WT_TEST core.* *.core diff --git a/src/third_party/wiredtiger/build_posix/Make.base b/src/third_party/wiredtiger/build_posix/Make.base deleted file mode 100644 index 2ca49f1ada8..00000000000 --- a/src/third_party/wiredtiger/build_posix/Make.base +++ /dev/null @@ -1,72 +0,0 @@ -ACLOCAL_AMFLAGS = -I build_posix/aclocal - -# BEGIN SUBDIRS, maintained by makemake and Make.subdirs -# END SUBDIRS - -lib_LTLIBRARIES = libwiredtiger.la -LDADD = $(lib_LTLIBRARIES) - -# BEGIN SOURCES, maintained by makemake and dist/filelist -# END SOURCES - -bin_PROGRAMS = wt -wt_SOURCES =\ - src/utilities/util_alter.c \ - src/utilities/util_backup.c \ - src/utilities/util_compact.c \ - src/utilities/util_cpyright.c \ - src/utilities/util_create.c \ - src/utilities/util_downgrade.c \ - src/utilities/util_drop.c \ - src/utilities/util_dump.c \ - src/utilities/util_list.c \ - src/utilities/util_load.c \ - src/utilities/util_load_json.c \ - src/utilities/util_loadtext.c \ - src/utilities/util_main.c \ - src/utilities/util_misc.c \ - src/utilities/util_printlog.c \ - src/utilities/util_read.c \ - src/utilities/util_rename.c \ - src/utilities/util_salvage.c \ - src/utilities/util_stat.c \ - src/utilities/util_truncate.c \ - src/utilities/util_upgrade.c \ - src/utilities/util_verbose.c \ - src/utilities/util_verify.c \ - src/utilities/util_write.c - -include_HEADERS= wiredtiger.h src/include/wiredtiger_ext.h -AM_CPPFLAGS = -I$(srcdir)/src/include - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = wiredtiger.pc - -$(srcdir)/Makefile.am: $(srcdir)/build_posix/Make.base $(srcdir)/build_posix/makemake $(srcdir)/dist/filelist - @cd $(srcdir)/build_posix && sh makemake - -libtool: $(LIBTOOL_DEPS) - $(SHELL) ./config.status libtool - -$(srcdir)/docs/index.html: - @cd $(srcdir)/dist && sh s_docs - -libwiredtiger_la_LIBADD = -if HAVE_BUILTIN_EXTENSION_LZ4 -libwiredtiger_la_LIBADD += ext/compressors/lz4/libwiredtiger_lz4.la -endif -if HAVE_BUILTIN_EXTENSION_SNAPPY -libwiredtiger_la_LIBADD += ext/compressors/snappy/libwiredtiger_snappy.la -endif -if HAVE_BUILTIN_EXTENSION_ZLIB -libwiredtiger_la_LIBADD += ext/compressors/zlib/libwiredtiger_zlib.la -endif -if HAVE_BUILTIN_EXTENSION_ZSTD -libwiredtiger_la_LIBADD += ext/compressors/zstd/libwiredtiger_zstd.la -endif -if HAVE_BUILTIN_EXTENSION_SODIUM -libwiredtiger_la_LIBADD += ext/encryptors/sodium/libwiredtiger_sodium.la -endif - -clean-local: - rm -rf WT_TEST diff --git a/src/third_party/wiredtiger/build_posix/Make.subdirs b/src/third_party/wiredtiger/build_posix/Make.subdirs deleted file mode 100644 index fa1063fc7ca..00000000000 --- a/src/third_party/wiredtiger/build_posix/Make.subdirs +++ /dev/null @@ -1,55 +0,0 @@ -# List of sub-directories, used by makemake to create Makefile.am -# -# The format is: -# <dir> [<condition> ...] -# -# If the directory exists, it is added to AUTO_SUBDIRS. -# If condition(s) are included, the subdir is made conditional via -# AM_CONDITIONAL. All conditions must be true to include the directory. -ext/collators/reverse -ext/collators/revint -ext/compressors/lz4 LZ4 -ext/compressors/nop -ext/compressors/snappy SNAPPY -ext/compressors/zlib ZLIB -ext/compressors/zstd ZSTD -ext/encryptors/nop -ext/encryptors/rotn -ext/encryptors/sodium SODIUM -ext/extractors/csv -ext/storage_sources/local_store POSIX_HOST -ext/test/fail_fs -ext/test/local_store -. -lang/python PYTHON - -# Test/Benchmark/Examples support library. -test/utility - -# Example programs. -examples/c - -# Test programs. -test/bloom -test/checkpoint -test/cppsuite HAVE_CXX -test/csuite -test/cursor_order -test/fops -test/format -test/fuzz POSIX_HOST LIBFUZZER -test/huge -test/import -test/manydbs -test/packing -test/readonly -test/salvage -test/syscall -test/thread - -# Benchmark programs. -bench/workgen PYTHON HAVE_CXX -bench/wtperf - -# Utility programs. -tools/xray_to_optrack LLVM HAVE_CXX diff --git a/src/third_party/wiredtiger/build_posix/aclocal/ax_check_compile_flag.m4 b/src/third_party/wiredtiger/build_posix/aclocal/ax_check_compile_flag.m4 deleted file mode 100644 index ca3639715e7..00000000000 --- a/src/third_party/wiredtiger/build_posix/aclocal/ax_check_compile_flag.m4 +++ /dev/null @@ -1,74 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) -# -# DESCRIPTION -# -# Check whether the given FLAG works with the current language's compiler -# or gives an error. (Warnings, however, are ignored) -# -# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on -# success/failure. -# -# If EXTRA-FLAGS is defined, it is added to the current language's default -# flags (e.g. CFLAGS) when the check is done. The check is thus made with -# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to -# force the compiler to issue an error when a bad flag is given. -# -# INPUT gives an alternative input source to AC_COMPILE_IFELSE. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this -# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> -# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 4 - -AC_DEFUN([AX_CHECK_COMPILE_FLAG], -[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF -AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl -AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ - ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS - _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" - AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], - [AS_VAR_SET(CACHEVAR,[yes])], - [AS_VAR_SET(CACHEVAR,[no])]) - _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) -AS_VAR_IF(CACHEVAR,yes, - [m4_default([$2], :)], - [m4_default([$3], :)]) -AS_VAR_POPDEF([CACHEVAR])dnl -])dnl AX_CHECK_COMPILE_FLAGS diff --git a/src/third_party/wiredtiger/build_posix/aclocal/ax_func_posix_memalign.m4 b/src/third_party/wiredtiger/build_posix/aclocal/ax_func_posix_memalign.m4 deleted file mode 100644 index 1e21d429b42..00000000000 --- a/src/third_party/wiredtiger/build_posix/aclocal/ax_func_posix_memalign.m4 +++ /dev/null @@ -1,50 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_func_posix_memalign.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_FUNC_POSIX_MEMALIGN -# -# DESCRIPTION -# -# Some versions of posix_memalign (notably glibc 2.2.5) incorrectly apply -# their power-of-two check to the size argument, not the alignment -# argument. AX_FUNC_POSIX_MEMALIGN defines HAVE_POSIX_MEMALIGN if the -# power-of-two check is correctly applied to the alignment argument. -# -# LICENSE -# -# Copyright (c) 2008 Scott Pakin <pakin@uiuc.edu> -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 7 - -AC_DEFUN([AX_FUNC_POSIX_MEMALIGN], -[AC_CACHE_CHECK([for working posix_memalign], - [ax_cv_func_posix_memalign_works], - [AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include <stdlib.h> - -int -main () -{ - void *buffer; - - /* Some versions of glibc incorrectly perform the alignment check on - * the size word. */ - exit (posix_memalign (&buffer, sizeof(void *), 123) != 0); -} - ]])], - [ax_cv_func_posix_memalign_works=yes], - [ax_cv_func_posix_memalign_works=no], - [ax_cv_func_posix_memalign_works=no])]) -if test "$ax_cv_func_posix_memalign_works" = "yes" ; then - AC_DEFINE([HAVE_POSIX_MEMALIGN], [1], - [Define to 1 if `posix_memalign' works.]) -fi -]) diff --git a/src/third_party/wiredtiger/build_posix/aclocal/ax_pkg_swig.m4 b/src/third_party/wiredtiger/build_posix/aclocal/ax_pkg_swig.m4 deleted file mode 100644 index 89941bc3fa9..00000000000 --- a/src/third_party/wiredtiger/build_posix/aclocal/ax_pkg_swig.m4 +++ /dev/null @@ -1,135 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_pkg_swig.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PKG_SWIG([major.minor.micro], [action-if-found], [action-if-not-found]) -# -# DESCRIPTION -# -# This macro searches for a SWIG installation on your system. If found, -# then SWIG is AC_SUBST'd; if not found, then $SWIG is empty. If SWIG is -# found, then SWIG_LIB is set to the SWIG library path, and AC_SUBST'd. -# -# You can use the optional first argument to check if the version of the -# available SWIG is greater than or equal to the value of the argument. It -# should have the format: N[.N[.N]] (N is a number between 0 and 999. Only -# the first N is mandatory.) If the version argument is given (e.g. -# 1.3.17), AX_PKG_SWIG checks that the swig package is this version number -# or higher. -# -# As usual, action-if-found is executed if SWIG is found, otherwise -# action-if-not-found is executed. -# -# In configure.in, use as: -# -# AX_PKG_SWIG(1.3.17, [], [ AC_MSG_ERROR([SWIG is required to build..]) ]) -# AX_SWIG_ENABLE_CXX -# AX_SWIG_MULTI_MODULE_SUPPORT -# AX_SWIG_PYTHON -# -# LICENSE -# -# Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de> -# Copyright (c) 2008 Alan W. Irwin -# Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net> -# Copyright (c) 2008 Andrew Collier -# Copyright (c) 2011 Murray Cumming <murrayc@openismus.com> -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 11 - -AC_DEFUN([AX_PKG_SWIG],[ - # Ubuntu has swig 2.0 as /usr/bin/swig2.0 - AC_PATH_PROGS([SWIG],[swig swig3.0 swig2.0]) - if test -z "$SWIG" ; then - m4_ifval([$3],[$3],[:]) - elif test -n "$1" ; then - AC_MSG_CHECKING([SWIG version]) - [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] - AC_MSG_RESULT([$swig_version]) - if test -n "$swig_version" ; then - # Calculate the required version number components - [required=$1] - [required_major=`echo $required | sed 's/[^0-9].*//'`] - if test -z "$required_major" ; then - [required_major=0] - fi - [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] - [required_minor=`echo $required | sed 's/[^0-9].*//'`] - if test -z "$required_minor" ; then - [required_minor=0] - fi - [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] - [required_patch=`echo $required | sed 's/[^0-9].*//'`] - if test -z "$required_patch" ; then - [required_patch=0] - fi - # Calculate the available version number components - [available=$swig_version] - [available_major=`echo $available | sed 's/[^0-9].*//'`] - if test -z "$available_major" ; then - [available_major=0] - fi - [available=`echo $available | sed 's/[0-9]*[^0-9]//'`] - [available_minor=`echo $available | sed 's/[^0-9].*//'`] - if test -z "$available_minor" ; then - [available_minor=0] - fi - [available=`echo $available | sed 's/[0-9]*[^0-9]//'`] - [available_patch=`echo $available | sed 's/[^0-9].*//'`] - if test -z "$available_patch" ; then - [available_patch=0] - fi - # Convert the version tuple into a single number for easier comparison. - # Using base 100 should be safe since SWIG internally uses BCD values - # to encode its version number. - required_swig_vernum=`expr $required_major \* 10000 \ - \+ $required_minor \* 100 \+ $required_patch` - available_swig_vernum=`expr $available_major \* 10000 \ - \+ $available_minor \* 100 \+ $available_patch` - - if test $available_swig_vernum -lt $required_swig_vernum; then - AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version.]) - SWIG='' - m4_ifval([$3],[$3],[]) - else - AC_MSG_CHECKING([for SWIG library]) - SWIG_LIB=`$SWIG -swiglib` - AC_MSG_RESULT([$SWIG_LIB]) - m4_ifval([$2],[$2],[]) - fi - else - AC_MSG_WARN([cannot determine SWIG version]) - SWIG='' - m4_ifval([$3],[$3],[]) - fi - fi - AC_SUBST([SWIG_LIB]) -]) diff --git a/src/third_party/wiredtiger/build_posix/aclocal/cond-if.m4 b/src/third_party/wiredtiger/build_posix/aclocal/cond-if.m4 deleted file mode 100644 index df4b2c4b8ac..00000000000 --- a/src/third_party/wiredtiger/build_posix/aclocal/cond-if.m4 +++ /dev/null @@ -1,14 +0,0 @@ -dnl AC_CONFIG_FILES conditionalization requires using AM_COND_IF, however -dnl AM_COND_IF is new to Automake 1.11. To use it on new Automake without -dnl requiring same, a fallback implementation for older Autoconf is provided. -dnl Note that disabling of AC_CONFIG_FILES requires Automake 1.11, this code -dnl is correct only in terms of m4sh generated script. -m4_ifndef([AM_COND_IF], [AC_DEFUN([AM_COND_IF], [ -if test -z "$$1_TRUE"; then : - m4_n([$2])[]dnl -m4_ifval([$3], -[else - $3 -])dnl -fi[]dnl -])]) diff --git a/src/third_party/wiredtiger/build_posix/aclocal/options.m4 b/src/third_party/wiredtiger/build_posix/aclocal/options.m4 deleted file mode 100644 index 0fe512c0c8c..00000000000 --- a/src/third_party/wiredtiger/build_posix/aclocal/options.m4 +++ /dev/null @@ -1,349 +0,0 @@ -# Optional configuration. -AC_DEFUN([AM_OPTIONS], [ - -AH_TEMPLATE(HAVE_ATTACH, [Define to 1 to pause for debugger attach on failure.]) -AC_MSG_CHECKING(if --enable-attach option specified) -AC_ARG_ENABLE(attach, - [AS_HELP_STRING([--enable-attach], - [Configure for debugger attach on failure.])], r=$enableval, r=no) -case "$r" in -no) wt_cv_enable_attach=no;; -*) AC_DEFINE(HAVE_ATTACH) - wt_cv_enable_attach=yes;; -esac -AC_MSG_RESULT($wt_cv_enable_attach) - -AH_TEMPLATE(HAVE_BUILTIN_EXTENSION_LZ4, - [LZ4 support automatically loaded.]) -AH_TEMPLATE(HAVE_BUILTIN_EXTENSION_SNAPPY, - [Snappy support automatically loaded.]) -AH_TEMPLATE(HAVE_BUILTIN_EXTENSION_ZLIB, - [Zlib support automatically loaded.]) -AH_TEMPLATE(HAVE_BUILTIN_EXTENSION_ZSTD, - [ZSTD support automatically loaded.]) -AH_TEMPLATE(HAVE_BUILTIN_EXTENSION_SODIUM, - [Sodium support automatically loaded.]) -AC_MSG_CHECKING(if --with-builtins option specified) -AC_ARG_WITH(builtins, - [AS_HELP_STRING([--with-builtins], - [builtin extension names (lz4, snappy, zlib, zstd, sodium).])], - [with_builtins=$withval], - [with_builtins=]) - -# Validate and setup each builtin extension library. -builtin_list=`echo "$with_builtins"|tr -s , ' '` -for builtin_i in $builtin_list; do - case "$builtin_i" in - lz4) AC_DEFINE(HAVE_BUILTIN_EXTENSION_LZ4) - wt_cv_with_builtin_extension_lz4=yes;; - snappy) AC_DEFINE(HAVE_BUILTIN_EXTENSION_SNAPPY) - wt_cv_with_builtin_extension_snappy=yes;; - zlib) AC_DEFINE(HAVE_BUILTIN_EXTENSION_ZLIB) - wt_cv_with_builtin_extension_zlib=yes;; - zstd) AC_DEFINE(HAVE_BUILTIN_EXTENSION_ZSTD) - wt_cv_with_builtin_extension_zstd=yes;; - sodium) AC_DEFINE(HAVE_BUILTIN_EXTENSION_SODIUM) - wt_cv_with_builtin_extension_sodium=yes;; - *) AC_MSG_ERROR([Unknown builtin extension "$builtin_i"]);; - esac -done -AM_CONDITIONAL([HAVE_BUILTIN_EXTENSION_LZ4], - [test "$wt_cv_with_builtin_extension_lz4" = "yes"]) -AM_CONDITIONAL([HAVE_BUILTIN_EXTENSION_SNAPPY], - [test "$wt_cv_with_builtin_extension_snappy" = "yes"]) -AM_CONDITIONAL([HAVE_BUILTIN_EXTENSION_ZLIB], - [test "$wt_cv_with_builtin_extension_zlib" = "yes"]) -AM_CONDITIONAL([HAVE_BUILTIN_EXTENSION_ZSTD], - [test "$wt_cv_with_builtin_extension_zstd" = "yes"]) -AM_CONDITIONAL([HAVE_BUILTIN_EXTENSION_SODIUM], - [test "$wt_cv_with_builtin_extension_sodium" = "yes"]) -AC_MSG_RESULT($with_builtins) - -AH_TEMPLATE(HAVE_DIAGNOSTIC, [Define to 1 for diagnostic tests.]) -AC_MSG_CHECKING(if --enable-diagnostic option specified) -AC_ARG_ENABLE(diagnostic, - [AS_HELP_STRING([--enable-diagnostic], - [Configure for diagnostic tests.])], r=$enableval, r=no) -case "$r" in -no) wt_cv_enable_diagnostic=no;; -*) AC_DEFINE(HAVE_DIAGNOSTIC) - wt_cv_enable_diagnostic=yes;; -esac -AC_MSG_RESULT($wt_cv_enable_diagnostic) - -AC_MSG_CHECKING(if --enable-python option specified) -AC_ARG_ENABLE(python, - [AS_HELP_STRING([--enable-python], - [Configure the python API.])], r=$enableval, r=no) -case "$r" in -no) wt_cv_enable_python=no;; -*) if test "$enable_shared" = "no"; then - AC_MSG_ERROR([--enable-python requires shared libraries]) - fi - wt_cv_enable_python=yes;; -esac -AC_MSG_RESULT($wt_cv_enable_python) -AM_CONDITIONAL([PYTHON], [test x$wt_cv_enable_python = xyes]) - -AC_MSG_CHECKING(if --with-python-prefix option specified) -AC_ARG_WITH(python-prefix, - [AS_HELP_STRING([--with-python-prefix=DIR], - [Installation prefix for Python module.])]) -AC_MSG_RESULT($with_python_prefix) - -AC_MSG_CHECKING(if --enable-snappy option specified) -AC_ARG_ENABLE(snappy, - [AS_HELP_STRING([--enable-snappy], - [Build the snappy compressor extension.])], r=$enableval, r=no) -case "$r" in -no) if test "$wt_cv_with_builtin_extension_snappy" = "yes"; then - wt_cv_enable_snappy=yes - else - wt_cv_enable_snappy=no - fi - ;; -*) if test "$wt_cv_with_builtin_extension_snappy" = "yes"; then - AC_MSG_ERROR( - [Only one of --enable-snappy --with-builtins=snappy allowed]) - fi - wt_cv_enable_snappy=yes;; -esac -AC_MSG_RESULT($wt_cv_enable_snappy) -if test "$wt_cv_enable_snappy" = "yes"; then - AC_CHECK_HEADER(snappy-c.h,, - [AC_MSG_ERROR([--enable-snappy requires snappy.h])]) - AC_CHECK_LIB(snappy, snappy_compress,, - [AC_MSG_ERROR([--enable-snappy requires snappy library])]) -fi -AM_CONDITIONAL([SNAPPY], [test "$wt_cv_enable_snappy" = "yes"]) - -AC_MSG_CHECKING(if --enable-lz4 option specified) -AC_ARG_ENABLE(lz4, - [AS_HELP_STRING([--enable-lz4], - [Build the lz4 compressor extension.])], r=$enableval, r=no) -case "$r" in -no) if test "$wt_cv_with_builtin_extension_lz4" = "yes"; then - wt_cv_enable_lz4=yes - else - wt_cv_enable_lz4=no - fi - ;; -*) if test "$wt_cv_with_builtin_extension_lz4" = "yes"; then - AC_MSG_ERROR( - [Only one of --enable-lz4 --with-builtins=lz4 allowed]) - fi - wt_cv_enable_lz4=yes;; -esac -AC_MSG_RESULT($wt_cv_enable_lz4) -if test "$wt_cv_enable_lz4" = "yes"; then - AC_CHECK_HEADER(lz4.h,, - [AC_MSG_ERROR([--enable-lz4 requires lz4.h])]) - AC_CHECK_LIB(lz4, LZ4_compress_destSize,, - [AC_MSG_ERROR([--enable-lz4 requires lz4 library with LZ4_compress_destSize support])]) -fi -AM_CONDITIONAL([LZ4], [test "$wt_cv_enable_lz4" = "yes"]) - -AC_MSG_CHECKING(if --enable-sodium option specified) -AC_ARG_ENABLE(sodium, - [AS_HELP_STRING([--enable-sodium], - [Build the libsodium encryptor extension.])], r=$enableval, r=no) -case "$r" in -no) if test "$wt_cv_with_builtin_extension_sodium" = "yes"; then - wt_cv_enable_sodium=yes - else - wt_cv_enable_sodium=no - fi - ;; -*) if test "$wt_cv_with_builtin_extension_sodium" = "yes"; then - AC_MSG_ERROR( - [Only one of --enable-sodium --with-builtins=sodium allowed]) - fi - wt_cv_enable_sodium=yes;; -esac -AC_MSG_RESULT($wt_cv_enable_sodium) -if test "$wt_cv_enable_sodium" = "yes"; then - AC_CHECK_HEADER(sodium.h,, - [AC_MSG_ERROR([--enable-sodium requires sodium.h])]) - AC_CHECK_LIB(sodium, sodium_init,, - [AC_MSG_ERROR([--enable-sodium requires sodium library])]) -fi -AM_CONDITIONAL([SODIUM], [test "$wt_cv_enable_sodium" = "yes"]) - -AC_MSG_CHECKING(if --enable-tcmalloc option specified) -AC_ARG_ENABLE(tcmalloc, - [AS_HELP_STRING([--enable-tcmalloc], - [Build WiredTiger with tcmalloc.])], r=$enableval, r=no) -case "$r" in -no) wt_cv_enable_tcmalloc=no;; -*) wt_cv_enable_tcmalloc=yes;; -esac -AC_MSG_RESULT($wt_cv_enable_tcmalloc) -if test "$wt_cv_enable_tcmalloc" = "yes"; then - AC_CHECK_HEADER(gperftools/tcmalloc.h,, - [AC_MSG_ERROR([--enable-tcmalloc requires gperftools/tcmalloc.h])]) - AC_CHECK_LIB(tcmalloc, tc_calloc,, - [AC_MSG_ERROR([--enable-tcmalloc requires tcmalloc library])]) -fi -AM_CONDITIONAL([TCMalloc], [test "$wt_cv_enable_tcmalloc" = "yes"]) - -AC_MSG_CHECKING(if --enable-memkind option specified) -AC_ARG_ENABLE(memkind, - [AS_HELP_STRING([--enable-memkind], - [Memkind library enables using memory on Optane NVRAM. Enable if planning to use NVRAM block cache.])], r=$enableval, r=no) -case "$r" in -no) wt_cv_enable_memkind=no;; -*) wt_cv_enable_memkind=yes;; -esac -AC_MSG_RESULT($wt_cv_enable_memkind) -if test "$wt_cv_enable_memkind" = "yes"; then - AC_CHECK_HEADER(memkind.h,, - [AC_MSG_ERROR([--enable-memkind requires memkind.h])]) - AC_CHECK_LIB(memkind, memkind_get_version,, - [AC_MSG_ERROR([--enable-memkind requires memkind library])]) -fi -AM_CONDITIONAL([Memkind], [test "$wt_cv_enable_memkind" = "yes"]) - -AH_TEMPLATE(SPINLOCK_TYPE, [Spinlock type from mutex.h.]) -AC_MSG_CHECKING(if --with-spinlock option specified) -AC_ARG_WITH(spinlock, - [AS_HELP_STRING([--with-spinlock], - [Spinlock type (pthread, pthread_adaptive or gcc).])], - [], - [with_spinlock=pthread]) -case "$with_spinlock" in -gcc) AC_DEFINE(SPINLOCK_TYPE, SPINLOCK_GCC);; -pthread|pthreads) - AC_DEFINE(SPINLOCK_TYPE, SPINLOCK_PTHREAD_MUTEX);; -pthread_adaptive|pthreads_adaptive) - AC_DEFINE(SPINLOCK_TYPE, SPINLOCK_PTHREAD_MUTEX_ADAPTIVE);; -*) AC_MSG_ERROR([Unknown spinlock type "$with_spinlock"]);; -esac -AC_MSG_RESULT($with_spinlock) - -AC_MSG_CHECKING(if --enable-strict option specified) -AC_ARG_ENABLE(strict, - [AS_HELP_STRING([--enable-strict], - [Enable strict compiler checking.])], r=$enableval, r=no) -case "$r" in -no) wt_cv_enable_strict=no;; -*) wt_cv_enable_strict=yes;; -esac -AC_MSG_RESULT($wt_cv_enable_strict) - -AC_MSG_CHECKING(if --enable-zlib option specified) -AC_ARG_ENABLE(zlib, - [AS_HELP_STRING([--enable-zlib], - [Build the zlib compressor extension.])], r=$enableval, r=no) -case "$r" in -no) if test "$wt_cv_with_builtin_extension_zlib" = "yes"; then - wt_cv_enable_zlib=yes - else - wt_cv_enable_zlib=no - fi - ;; -*) if test "$wt_cv_with_builtin_extension_zlib" = "yes"; then - AC_MSG_ERROR( - [Only one of --enable-zlib --with-builtins=zlib allowed]) - fi - wt_cv_enable_zlib=yes;; -esac -AC_MSG_RESULT($wt_cv_enable_zlib) -if test "$wt_cv_enable_zlib" = "yes"; then - AC_CHECK_HEADER(zlib.h,, - [AC_MSG_ERROR([--enable-zlib requires zlib.h])]) - AC_CHECK_LIB(z, deflate,, - [AC_MSG_ERROR([--enable-zlib requires zlib library])]) -fi -AM_CONDITIONAL([ZLIB], [test "$wt_cv_enable_zlib" = "yes"]) - -AC_MSG_CHECKING(if --enable-zstd option specified) -AC_ARG_ENABLE(zstd, - [AS_HELP_STRING([--enable-zstd], - [Build the zstd compressor extension.])], r=$enableval, r=no) -case "$r" in -no) if test "$wt_cv_with_builtin_extension_zstd" = "yes"; then - wt_cv_enable_zstd=yes - else - wt_cv_enable_zstd=no - fi - ;; -*) if test "$wt_cv_with_builtin_extension_zstd" = "yes"; then - AC_MSG_ERROR( - [Only one of --enable-zstd --with-builtins=zstd allowed]) - fi - wt_cv_enable_zstd=yes;; -esac -AC_MSG_RESULT($wt_cv_enable_zstd) -if test "$wt_cv_enable_zstd" = "yes"; then - AC_CHECK_HEADER(zstd.h,, - [AC_MSG_ERROR([--enable-zstd requires zstd.h])]) - AC_CHECK_LIB(zstd, ZSTD_compress,, - [AC_MSG_ERROR([--enable-zstd requires Zstd library])]) -fi -AM_CONDITIONAL([ZSTD], [test "$wt_cv_enable_zstd" = "yes"]) - -AH_TEMPLATE(HAVE_NO_CRC32_HARDWARE, - [Define to 1 to disable any crc32 hardware support.]) -AC_MSG_CHECKING(if --disable-crc32-hardware option specified) -AC_ARG_ENABLE(crc32-hardware, - [AS_HELP_STRING([--disable-crc32-hardware], - [Disable any crc32 hardware support.])], r=$enableval, r=yes) -case "$r" in -no) wt_cv_crc32_hardware=no - AC_DEFINE(HAVE_NO_CRC32_HARDWARE) - AC_MSG_RESULT(yes);; -*) wt_cv_crc32_hardware=yes - AC_MSG_RESULT(no);; -esac - -AH_TEMPLATE(WT_STANDALONE_BUILD, - [Define to 1 to support standalone build.]) -AC_MSG_CHECKING(if --disable-standalone-build option specified) -AC_ARG_ENABLE(standalone-build, - [AS_HELP_STRING([--disable-standalone-build], - [Disable standalone build support.])], r=$enableval, r=yes) -case "$r" in -no) wt_cv_disable_standalone_build=no - AC_MSG_RESULT(yes);; -*) wt_cv_disable_standalone_build=yes - AC_DEFINE(WT_STANDALONE_BUILD) - AC_MSG_RESULT(no);; -esac - -AC_MSG_CHECKING(if --enable-llvm option specified) -AC_ARG_ENABLE(llvm, - [AS_HELP_STRING([--enable-llvm], - [Configure with LLVM.])], r=$enableval, r=no) -case "$r" in -no) wt_cv_enable_llvm=no;; -*) wt_cv_enable_llvm=yes;; -esac -AC_MSG_RESULT($wt_cv_enable_llvm) -if test "$wt_cv_enable_llvm" = "yes"; then - AC_CHECK_PROG(wt_cv_llvm_config, llvm-config, yes) - if test "$wt_cv_llvm_config" != "yes"; then - AC_MSG_ERROR([--enable-llvm requires llvm-config]) - fi - if ! test $(llvm-config --version | grep "^8"); then - AC_MSG_ERROR([llvm-config must be version 8]) - fi -fi -AM_CONDITIONAL([LLVM], [test x$wt_cv_enable_llvm = xyes]) - -AC_MSG_CHECKING(if --enable-libfuzzer option specified) -AC_ARG_ENABLE(libfuzzer, - [AS_HELP_STRING([--enable-libfuzzer], - [Configure with LibFuzzer.])], r=$enableval, r=no) -case "$r" in -no) wt_cv_enable_libfuzzer=no;; -*) wt_cv_enable_libfuzzer=yes;; -esac -AC_MSG_RESULT($wt_cv_enable_libfuzzer) -if test "$wt_cv_enable_libfuzzer" = "yes"; then - AX_CHECK_COMPILE_FLAG([-fsanitize=fuzzer-no-link], [wt_cv_libfuzzer_works=yes]) - if test "$wt_cv_libfuzzer_works" != "yes"; then - AC_MSG_ERROR([--enable-libfuzzer requires a Clang version that supports -fsanitize=fuzzer-no-link]) - fi -fi -AM_CONDITIONAL([LIBFUZZER], [test x$wt_cv_enable_libfuzzer = xyes]) -]) diff --git a/src/third_party/wiredtiger/build_posix/aclocal/strict.m4 b/src/third_party/wiredtiger/build_posix/aclocal/strict.m4 deleted file mode 100644 index 608e52490f4..00000000000 --- a/src/third_party/wiredtiger/build_posix/aclocal/strict.m4 +++ /dev/null @@ -1,174 +0,0 @@ -# AM_STRICT -# Per compiler-version flags used when compiling in strict mode. - -# GCC warnings. -AC_DEFUN([AM_GCC_WARNINGS], [ - - # List of common C/CXX flags. - w="$w -Wcast-align" - w="$w -Wdouble-promotion" - w="$w -Werror" - w="$w -Wfloat-equal" - w="$w -Wformat-nonliteral" - w="$w -Wformat-security" - w="$w -Wformat=2" - w="$w -Winit-self" - w="$w -Wmissing-declarations" - w="$w -Wmissing-field-initializers" - w="$w -Wpacked" - w="$w -Wpointer-arith" - w="$w -Wredundant-decls" - w="$w -Wswitch-enum" - w="$w -Wundef" - w="$w -Wuninitialized" - w="$w -Wunreachable-code" - w="$w -Wunused" - w="$w -Wwrite-strings" - - # Non-fatal informational warnings. - # The unsafe-loop-optimizations warning is only enabled for specific gcc versions. - # Regardless, don't fail when it's configured. - w="$w -Wno-error=unsafe-loop-optimizations" - - # GCC 4.7 - # WiredTiger uses anonymous structures/unions, a C11 extension, - # turn off those warnings. - gcc5=0 - gcc6=0 - gcc7=0 - gcc8=0 - case "$1" in - [*4.7.[0-9]*]) # gcc4.7 - w="$w -Wno-c11-extensions";; - [*5.[0-9].[0-9]*]) # gcc5.X - gcc5=1;; - [*6.[0-9].[0-9]*]) # gcc6.X - gcc5=1 - gcc6=1;; - [*7.[0-9].[0-9]*]) # gcc7.X - gcc5=1 - gcc6=1 - gcc7=1;; - [*8.[0-9].[0-9]*]) # gcc8.X - gcc5=1 - gcc6=1 - gcc7=1 - gcc8=1;; - esac - - if test $gcc5 -eq 1; then - w="$w -Wformat-signedness" - w="$w -Wunused-macros" - w="$w -Wvariadic-macros" - fi - if test $gcc6 -eq 1; then - w="$w -Wduplicated-cond" - w="$w -Wlogical-op" - w="$w -Wunused-const-variable=2" - fi - if test $gcc7 -eq 1; then - w="$w -Walloca" - w="$w -Walloc-zero" - w="$w -Wduplicated-branches" - w="$w -Wformat-overflow=2" - w="$w -Wformat-truncation=2" - w="$w -Wrestrict" - fi - if test $gcc8 -eq 1; then - w="$w -Wmultistatement-macros" - fi - - w_c="$w" - w_cxx="$w" - - # FIX-ME-WT-8247: Add those flags to the common ones if we want them for the compilation of the c++ files too. - w_c="$w_c -Waggregate-return" - w_c="$w_c -Wall" - w_c="$w_c -Wextra" - w_c="$w_c -Wshadow" - w_c="$w_c -Wsign-conversion" - - # Specific C flags. - w_c="$w_c -Wbad-function-cast" - w_c="$w_c -Wdeclaration-after-statement" - w_c="$w_c -Wjump-misses-init" - w_c="$w_c -Wmissing-prototypes" - w_c="$w_c -Wnested-externs" - w_c="$w_c -Wold-style-definition" - w_c="$w_c -Wpointer-sign" - w_c="$w_c -Wstrict-prototypes" - - # We only turn on the unsafe-loop-optimizations warning before gcc7, - # it's too noisy to tolerate otherwise. - case "$1" in - [*4.7.[0-9]*]) # gcc4.7 - w_c="$w_c -Wunsafe-loop-optimizations";; - [*5.[0-9].[0-9]*]) # gcc5.X - w_c="$w_c -Wunsafe-loop-optimizations";; - [*6.[0-9].[0-9]*]) # gcc6.X - w_c="$w_c -Wunsafe-loop-optimizations";; - esac - - wt_c_strict_warnings="$w_c" - wt_cxx_strict_warnings="$w_cxx" -]) - -# Clang warnings. -AC_DEFUN([AM_CLANG_WARNINGS], [ - - # List of common C/CXX flags. - w="$w -Werror" - w="$w -Wno-cast-align" - w="$w -Wno-documentation-unknown-command" - w="$w -Wno-format-nonliteral" - w="$w -Wno-packed" - w="$w -Wno-padded" - w="$w -Wno-reserved-id-macro" - w="$w -Wno-zero-length-array" - - # We should turn on cast-qual, but not as a fatal error: see WT-2690. - # For now, turn it off. - # w="$w -Wno-error=cast-qual" - w="$w -Wno-cast-qual" - - # Turn off clang thread-safety-analysis, it doesn't like some of the - # code patterns in WiredTiger. - w="$w -Wno-thread-safety-analysis" - - # On Centos 7.3.1611, system header files aren't compatible with - # -Wdisabled-macro-expansion. - w="$w -Wno-disabled-macro-expansion" - - case "$1" in - *Apple*clang*version*4.1*) - # Apple clang has its own numbering system, and older OS X - # releases need some special love. Turn off some flags for - # Apple's clang 4.1: - # Apple clang version 4.1 - # (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn) - w="$w -Wno-attributes" - w="$w -Wno-pedantic" - w="$w -Wno-unused-command-line-argument";; - esac - - # We occasionally use an extra semicolon to indicate an empty loop or - # conditional body. - w="$w -Wno-extra-semi-stmt" - - # FIXME-WT-8052: Figure out whether we want to disable these or change the code. - w="$w -Wno-implicit-int-float-conversion" - w="$w -Wno-implicit-fallthrough" - - # Ignore unrecognized options. - w="$w -Wno-unknown-warning-option" - - w_c="$w" - w_cxx="$w" - - # Specific C flags. - # The -Weverything flag is not recommended, we only keep it for C files as it was already enabled. - w_c="$w_c -Weverything" - - wt_c_strict_warnings="$w_c" - wt_cxx_strict_warnings="$w_cxx" -]) diff --git a/src/third_party/wiredtiger/build_posix/aclocal/types.m4 b/src/third_party/wiredtiger/build_posix/aclocal/types.m4 deleted file mode 100644 index 089058f5611..00000000000 --- a/src/third_party/wiredtiger/build_posix/aclocal/types.m4 +++ /dev/null @@ -1,48 +0,0 @@ -# AM_TYPES -- -# Check for missing types, create substitutes where we can. -AC_DEFUN([AM_TYPES], [ - # Basic list of include files that might have types. We also use - # as the list of includes directly included by wiredtiger.h. - std_includes=" -#include <sys/types.h> -#include <inttypes.h> -#include <stdarg.h> -#include <stdbool.h> -#include <stdint.h> -#include <stdio.h>" - AC_SUBST(wiredtiger_includes_decl) - wiredtiger_includes_decl="$std_includes" - - # We require FILE, pid_t, size_t, ssize_t, time_t, uintmax_t - # and uintptr_t. - AC_SUBST(FILE_t_decl) - AC_CHECK_TYPE(FILE *,, AC_MSG_ERROR([No FILE type.]), $std_includes) - AC_SUBST(pid_t_decl) - AC_CHECK_TYPE(pid_t,, AC_MSG_ERROR([No pid_t type.]), $std_includes) - AC_SUBST(size_t_decl) - AC_CHECK_TYPE(size_t,, AC_MSG_ERROR([No size_t type.]), $std_includes) - AC_SUBST(ssize_t_decl) - AC_CHECK_TYPE(ssize_t,, AC_MSG_ERROR([No size_t type.]), $std_includes) - AC_SUBST(time_t_decl) - AC_CHECK_TYPE(time_t,, AC_MSG_ERROR([No time_t type.]), $std_includes) - - # We require off_t, but use a local version for portability to Windows - # where it's 4B, not 8B. - AC_SUBST(off_t_decl) - AC_CHECK_TYPE(off_t, - [off_t_decl="typedef off_t wt_off_t;"], - [AC_MSG_ERROR([No off_t type.])], - $std_includes) - - # Some systems don't have a uintmax_t type (for example, FreeBSD 6.2. - # In this case, use an unsigned long long. - AC_SUBST(uintmax_t_decl) - AC_CHECK_TYPE(uintmax_t,, [AC_CHECK_TYPE(unsigned long long, - [uintmax_t_decl="typedef unsigned long long uintmax_t;"], - [uintmax_t_decl="typedef unsigned long uintmax_t;"], - $std_includes)]) - - AC_SUBST(uintptr_t_decl) - AC_CHECK_TYPE(uintptr_t,, - AC_MSG_ERROR([No uintptr_t type.]), $std_includes) -]) diff --git a/src/third_party/wiredtiger/build_posix/aclocal/version-set.m4 b/src/third_party/wiredtiger/build_posix/aclocal/version-set.m4 deleted file mode 100644 index 53dadedd6ad..00000000000 --- a/src/third_party/wiredtiger/build_posix/aclocal/version-set.m4 +++ /dev/null @@ -1,14 +0,0 @@ -dnl build by dist/s_version - -VERSION_MAJOR=10 -VERSION_MINOR=0 -VERSION_PATCH=2 -VERSION_STRING='"WiredTiger 10.0.2: (November 30, 2021)"' - -AC_SUBST(VERSION_MAJOR) -AC_SUBST(VERSION_MINOR) -AC_SUBST(VERSION_PATCH) -AC_SUBST(VERSION_STRING) - -VERSION_NOPATCH=10.0 -AC_SUBST(VERSION_NOPATCH) diff --git a/src/third_party/wiredtiger/build_posix/aclocal/version.m4 b/src/third_party/wiredtiger/build_posix/aclocal/version.m4 deleted file mode 100644 index 4e08838ca75..00000000000 --- a/src/third_party/wiredtiger/build_posix/aclocal/version.m4 +++ /dev/null @@ -1,2 +0,0 @@ -dnl WiredTiger product version for AC_INIT. Maintained by dist/s_version -10.0.2 diff --git a/src/third_party/wiredtiger/build_posix/configure.ac.in b/src/third_party/wiredtiger/build_posix/configure.ac.in deleted file mode 100644 index 9968763a210..00000000000 --- a/src/third_party/wiredtiger/build_posix/configure.ac.in +++ /dev/null @@ -1,267 +0,0 @@ -PACKAGE=wiredtiger -AC_PREREQ(2.63) -AC_INIT(WiredTiger, m4_normalize(m4_include([build_posix/aclocal/version.m4])), - [support@wiredtiger.com]) - -m4_include([build_posix/aclocal/version-set.m4]) - -AC_CONFIG_AUX_DIR([build_posix/gnu-support]) -AC_CONFIG_MACRO_DIR([build_posix/aclocal]) -AC_CONFIG_SRCDIR([RELEASE_INFO]) - -# We rely on some automake features for testing (like AM_TEST_ENVIRONMENT) -# that didn't work before 1.11.6. -AM_INIT_AUTOMAKE([1.11.6 foreign parallel-tests subdir-objects]) -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])]) - -# If CFLAGS/CXXFLAGS were not set on entry, default to "-O3 -g" -: ${CFLAGS=-O3 -g ${ADD_CFLAGS}} -: ${CXXFLAGS=-O3 -g ${ADD_CFLAGS}} - -AC_PROG_CC(cc gcc) -AC_PROG_CXX(c++ g++) -AM_PROG_AS(as gas) - -define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl -define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl - -# We only turn on C++ if the compiler is named "cc", otherwise, there's no -# reason to believe "c++" can build compatible objects. -# -# Check whether the C++ compiler works by linking a trivial program. -AM_CONDITIONAL([IS_CXX_OK], [test "$CC" = "cc"]) -AM_COND_IF([IS_CXX_OK], [], AM_CONDITIONAL([IS_CXX_OK], [test $(expr `"$CC" --version | head -n 1 | grep -o -E "[[[[:digit:]]]].[[[[:digit:]]]].[[[[:digit:]]]]" | uniq`) = $(expr `"$CXX" --version | head -n 1 | grep -o -E "[[[[:digit:]]]].[[[[:digit:]]]].[[[[:digit:]]]]" | uniq`)])) - -AM_COND_IF([IS_CXX_OK], - [AC_CACHE_CHECK([whether the C++ compiler works], - [wt_cv_prog_cxx_works], - [AC_LANG_PUSH([C++]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], - [wt_cv_prog_cxx_works=yes], - [wt_cv_prog_cxx_works=no]) - AC_LANG_POP([C++])])], - [AC_MSG_WARN([C++ compiler ignored unless compiler is named "cc" or gcc and g++ versions match]) - wt_cv_prog_cxx_works=no]) - -AM_CONDITIONAL([HAVE_CXX], [test "$wt_cv_prog_cxx_works" = "yes"]) - -LT_PREREQ(2.2.6) -LT_INIT([pic-only]) -AC_SUBST([LIBTOOL_DEPS]) -AM_CONDITIONAL([POSIX_HOST], [true]) -AM_CONDITIONAL([WINDOWS_HOST], [false]) - -AS_CASE([$host_cpu], - [ppc64*], [wt_cv_powerpc="yes"], - [elf64lppc], [wt_cv_powerpc="yes"], - [powerpc*], [wt_cv_powerpc="yes"], - [wt_cv_powerpc="no"]) -AM_CONDITIONAL([POWERPC_HOST], [test "$wt_cv_powerpc" = "yes"]) -AS_CASE([$host_cpu], - [amd*|i[[3456]]86*|pentium|x86*|mips64el*], [wt_cv_x86="yes"], [wt_cv_x86="no"]) -AM_CONDITIONAL([X86_HOST], [test "$wt_cv_x86" = "yes"]) -AS_CASE([$host_cpu], - [s390x*], [wt_cv_zseries="yes"], - [wt_cv_zseries="no"]) -AM_CONDITIONAL([ZSERIES_HOST], [test "$wt_cv_zseries" = "yes"]) -AS_CASE([$host_cpu], - [riscv64*], [wt_cv_riscv64="yes"], - [wt_cv_riscv64="no"]) -AM_CONDITIONAL([RISCV64_HOST], [test "$wt_cv_riscv64" = "yes"]) -AS_CASE([$host_cpu], - [aarch64*], [wt_cv_arm64="yes"], - [wt_cv_arm64="no"]) -AM_CONDITIONAL([ARM64_HOST], [test "$wt_cv_arm64" = "yes"]) -AS_CASE([$host_cpu], - [mips64el*], [wt_cv_mips64el="yes"], - [wt_cv_mips64el="no"]) -AM_CONDITIONAL([MIPS64EL_HOST], [test "$wt_cv_mips64el" = "yes"]) -AS_CASE([$host_os], [*solaris*], [wt_cv_solaris="yes"], [wt_cv_solaris="no"]) - -# This is a workaround as part of WT-2459. Currently, clang (v3.7) does not -# support compiling the ASM code we have to perform the CRC checks on PowerPC. -# To compile with clang we need to override the ASM compiler with CCAS to use -# gcc. Unfortunately, doing the compilation in this manner means libtool can't -# determine what tag to use for that one .sx file. If we catch that we are using -# two different compilers for CC and CCAS and we are on a PowerPC system we -# overload the libtool flags to provide CC by default. -if test "$wt_cv_powerpc" = "yes" -a "$CC" != "$CCAS"; then - [AM_LIBTOOLFLAGS+="--tag=CC"] -fi -AC_SUBST(AM_LIBTOOLFLAGS) - -# WiredTiger uses anonymous unions to pad structures. It's part of C11, but -# some compilers require -std=c11 to support them. Turn on that flag for any -# compiler that supports it, except for Solaris, where gcc -std=c11 makes -# some non-C11 prototypes unavailable. -if test "$wt_cv_solaris" = "no"; then - AX_CHECK_COMPILE_FLAG([-std=c11], [AM_CFLAGS="$AM_CFLAGS -std=c11"]) -fi - -if test "$GCC" = "yes"; then - # The Solaris gcc compiler gets the additional -pthreads flag. - if test "$wt_cv_solaris" = "yes"; then - AM_CFLAGS="$AM_CFLAGS -pthreads" - fi - - # ARMv8-A is the 64-bit ARM architecture, turn on the optional CRC - # instructions. - if test "$wt_cv_arm64" = "yes"; then - AM_CFLAGS="$AM_CFLAGS -march=armv8-a+crc" - # moutline-atomics preserves backwards compatibility with Arm v8.0 - # systems but also supports using Arm v8.1 atomics. The latter can - # massively improve performance on larger Arm systems. The flag was - # back ported to gcc8, 9 and is the default in gcc10+. See if the - # compiler supports the flag. - AX_CHECK_COMPILE_FLAG([-moutline-atomics], [AM_CFLAGS="$AM_CFLAGS -moutline-atomics"]) - fi -else - # The Solaris native compiler gets the additional -mt flag. - if test "$wt_cv_solaris" = "yes"; then - AM_CFLAGS="$AM_CFLAGS -mt" - fi -fi - -# Linux requires _GNU_SOURCE to be defined -AS_CASE([$host_os], [linux*], [AM_CFLAGS="$AM_CFLAGS -D_GNU_SOURCE"]) - -# Configure options. -AM_OPTIONS - -# If enable-strict is configured, turn on as much error checking as we can for -# this compiler. Intended for developers, and only works for gcc/clang, but it -# fills a need. -if test "$wt_cv_enable_strict" = "yes"; then - wt_cv_cc_version="`$CC --version | sed -eq`" - case "$wt_cv_cc_version" in - *clang*) - AM_CLANG_WARNINGS($wt_cv_cc_version);; - *cc*|*CC*) # cc, CC, gcc, GCC - AM_GCC_WARNINGS($wt_cv_cc_version);; - *) - AC_MSG_ERROR( - [--enable-strict does not support "$wt_cv_cc_version".]);; - esac - - AM_CFLAGS="$AM_CFLAGS $wt_c_strict_warnings" - AM_CXXFLAGS="$AM_CXXFLAGS $wt_cxx_strict_warnings" -fi - -# Python API -if test "$wt_cv_enable_python" = "yes"; then - # Only a warning, we need to build release packages without SWIG. - AX_PKG_SWIG(2.0.4, [], - [AC_MSG_WARN([SWIG is required to rebuild Python API.]) && - SWIG="SWIG_NOT_FOUND_DURING_CONFIGURE"]) -fi - -if test "$wt_cv_enable_python" = "yes"; then - AM_PATH_PYTHON([3.0]) - if test -n "$with_python_prefix" ; then - PYTHON_INSTALL_ARG="-d $with_python_prefix" - fi - AC_SUBST(PYTHON_INSTALL_ARG) -fi - -AM_TYPES - -AC_PROG_INSTALL - -AC_CHECK_HEADERS([x86intrin.h]) -AC_CHECK_LIB(pthread, pthread_create) -AC_CHECK_LIB(dl, dlopen) -AC_CHECK_LIB(rt, sched_yield) - -AC_CHECK_FUNCS([\ - clock_gettime fallocate ftruncate gettimeofday posix_fadvise posix_fallocate\ - posix_madvise setrlimit strtouq sync_file_range timer_create]) - -# OS X wrongly reports that it has fdatasync -AS_CASE([$host_os], [darwin*], [], [AC_CHECK_FUNCS([fdatasync])]) - -# Check for posix_memalign explicitly: it is a builtin in some compilers and -# the generic declaration in AC_CHECK_FUNCS is incompatible. -AX_FUNC_POSIX_MEMALIGN - -# Check for POSIX condition variables with monotonic clock support -AC_CACHE_CHECK([for condition waits with monotonic clock support], - [wt_cv_pthread_cond_monotonic], - [AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include <errno.h> -#include <pthread.h> -#include <stdlib.h> -#include <time.h> - -int main() -{ - int ret; - pthread_condattr_t condattr; - pthread_cond_t cond; - pthread_mutex_t mtx; - struct timespec ts; - - if ((ret = pthread_condattr_init(&condattr)) != 0) exit(1); - if ((ret = pthread_condattr_setclock(&condattr, CLOCK_MONOTONIC)) != 0) exit(1); - if ((ret = pthread_cond_init(&cond, &condattr)) != 0) exit(1); - if ((ret = pthread_mutex_init(&mtx, NULL)) != 0) exit(1); - if ((ret = clock_gettime(CLOCK_MONOTONIC, &ts)) != 0) exit(1); - ts.tv_sec += 1; - if ((ret = pthread_mutex_lock(&mtx)) != 0) exit(1); - if ((ret = pthread_cond_timedwait(&cond, &mtx, &ts)) != 0 && ret != EINTR && ret != ETIMEDOUT) exit(1); - - exit(0); -} - ]])], - [wt_pthread_cond_monotonic=yes], - [wt_pthread_cond_monotonic=no], - [wt_pthread_cond_monotonic=no])]) -AC_MSG_RESULT($wt_pthread_cond_monotonic) -if test "$wt_pthread_cond_monotonic" = "yes" ; then - AC_DEFINE([HAVE_PTHREAD_COND_MONOTONIC], [1], - [Define to 1 if pthread condition variables support monotonic clocks.]) -fi - -AC_SYS_LARGEFILE - -AC_C_BIGENDIAN - -AC_MSG_CHECKING([for a 64-bit build]) -AC_COMPUTE_INT(ac_cv_sizeof_void_p, [sizeof(void *)]) -if test "$ac_cv_sizeof_void_p" != "8" ; then - AC_MSG_ERROR([WiredTiger requires a 64-bit build.]) -fi -AC_MSG_RESULT(yes) - -# Linux requires buffers aligned to 4KB boundaries for O_DIRECT to work. -BUFFER_ALIGNMENT=0 -if test "$ax_cv_func_posix_memalign_works" = "yes" ; then - case "$host_os" in - linux*) BUFFER_ALIGNMENT=4096 ;; - esac -fi -AC_DEFINE_UNQUOTED(WT_BUFFER_ALIGNMENT_DEFAULT, $BUFFER_ALIGNMENT, - [Default alignment of buffers used for I/O]) - -# Export the C and CXX flags. -AC_SUBST(AM_CFLAGS) -AC_SUBST(AM_CXXFLAGS) - -# Warn that diagnostic builds should not be used in production -if test "$wt_cv_enable_diagnostic" = "yes"; then - AC_MSG_WARN( - [DIAGNOSTIC BUILDS ARE NOT RECOMMENDED FOR PRODUCTION DEPLOYMENT.]) -fi - -# Output files -AC_CONFIG_HEADERS([wiredtiger_config.h:build_posix/config.hin]) - -# BEGIN check existence -- maintained by reconf and Make.subdirs -# END check existence - -AC_CONFIG_FILES([ - Makefile - wiredtiger.h:src/include/wiredtiger.in - wiredtiger_ext.h:src/include/wiredtiger_ext.h - wiredtiger.pc:build_posix/wiredtiger.pc.in -]) -AC_OUTPUT diff --git a/src/third_party/wiredtiger/build_posix/makemake b/src/third_party/wiredtiger/build_posix/makemake deleted file mode 100755 index 73d6b6bcfb1..00000000000 --- a/src/third_party/wiredtiger/build_posix/makemake +++ /dev/null @@ -1,55 +0,0 @@ -#! /bin/sh -# -# Build Makefile.am - -# Process Make.base, insert subdirs that exist from Make.subdirs -# (in release trees, some of the subdirs might be excluded). -(sed -n '1,/BEGIN SUBDIRS/p' Make.base - -echo "SUBDIRS =" -sed -e 's/#.*$//' -e '/^$/d' Make.subdirs | while read dir conds ; do - test -d ../$dir || continue - if test -n "$conds" ; then - # Multiple conditions are allowed, they will appear - # as nested 'if' statements. - for cond in $conds; do - cat <<END_CONDITIONAL -if ${cond} -END_CONDITIONAL - done - cat <<END_CONDITIONAL - SUBDIRS += $dir -END_CONDITIONAL - for cond in $conds; do - cat <<END_CONDITIONAL -endif -END_CONDITIONAL - done - else - echo "SUBDIRS += $dir" - fi -done - -# Write the rest of Make.base, up to SOURCES -sed -n '/END SUBDIRS/,/BEGIN SOURCES/p' Make.base - -# Write the list of sources. -echo -echo "libwiredtiger_la_LDFLAGS = -release @VERSION@" -echo "libwiredtiger_la_SOURCES =" -sed -e '/^[a-z]/!d' < ../dist/filelist | while read file cond; do - if test -n "$cond"; then - cat <<END_CONDITIONAL -# DO NOT indent the "libwiredtiger_la_SOURCES" lines, it breaks the build. -if ${cond} -libwiredtiger_la_SOURCES += $file -endif -END_CONDITIONAL - else - echo "libwiredtiger_la_SOURCES += $file" - fi -done - -# Write the rest of Make.base -sed -n '/END SOURCES/,$p' Make.base -) > ../Makefile.am diff --git a/src/third_party/wiredtiger/build_posix/reconf b/src/third_party/wiredtiger/build_posix/reconf deleted file mode 100755 index ef0c5886b40..00000000000 --- a/src/third_party/wiredtiger/build_posix/reconf +++ /dev/null @@ -1,79 +0,0 @@ -#! /bin/sh - -t=/tmp/__configure.$$ -trap 'rm -f $t; exit 0' 0 1 2 3 13 15 - -# Insulate against IFS from the user's env -IFS=' '' '' -' -export IFS - -# Allow this script to be run from anywhere -cd "`dirname \"$0\"`" - -# There's a cleanup function so we can easily clean out the directory. -clean() -{ - # Use the Makefile to remove object files if they exist. - test -f Makefile && make distclean > /dev/null - - # Remove automatically generated files. - rm -rf Makefile \ - Makefile.am \ - Makefile.in \ - aclocal.m4 \ - autom4te.cache \ - config.cache \ - config.hin \ - config.hin~ \ - config.log \ - config.status \ - configure \ - gnu-support \ - mklog -} - -# We always clean things up, assume build_posix and the top-level directory -# are the build spots. -(cd .. && clean) -clean - -while : - do case "$1" in - -c) # Clean and leave empty - exit 0;; - *) # Clean and then re-create - break;; - esac -done - -# Build configure.ac -( -echo "# DO NOT EDIT" -echo "# This file is built automatically from build_posix/configure.ac.in." - -sed -n '1,/BEGIN check existence/p' configure.ac.in - -sed -e 's/#.*$//' -e '/^$/d' -e '/^\.$/d' Make.subdirs | \ -while read dir cond ; do - test -d ../$dir || continue - echo 'AC_CONFIG_FILES(['$dir/Makefile'])' -done - -sed -n '/END check existence/,$p' configure.ac.in -) > ../configure.ac - -# Build Makefile.am -sh ./makemake - -# From here on, work in the top of the tree -cd .. -autoreconf --install --warnings=all - -# Make sure any missing files are writable -chmod 755 build_posix/gnu-support/* - -# Cleanup -rm -rf autom4te.cache - -exit 0 diff --git a/src/third_party/wiredtiger/build_posix/wiredtiger.pc.in b/src/third_party/wiredtiger/build_posix/wiredtiger.pc.in deleted file mode 100644 index fb45c74bb08..00000000000 --- a/src/third_party/wiredtiger/build_posix/wiredtiger.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: WiredTiger -Description: The WiredTiger Data Engine -Requires: -Version: @PACKAGE_VERSION@ -Libs: -L${libdir} -lwiredtiger -Cflags: -I${includedir} diff --git a/src/third_party/wiredtiger/cmake/configs/base.cmake b/src/third_party/wiredtiger/cmake/configs/base.cmake index 3e7595ef307..0c22c6ce838 100644 --- a/src/third_party/wiredtiger/cmake/configs/base.cmake +++ b/src/third_party/wiredtiger/cmake/configs/base.cmake @@ -184,6 +184,12 @@ config_bool( DEFAULT OFF ) +config_bool( + ENABLE_LLVM + "Enable compilation of LLVM-based tools and executables i.e. xray & fuzzer." + DEFAULT OFF +) + set(default_optimize_level) if("${WT_OS}" STREQUAL "windows") set(default_optimize_level "/O2") diff --git a/src/third_party/wiredtiger/build_win/wiredtiger.def b/src/third_party/wiredtiger/cmake/configs/wiredtiger.def index 16a824acf1b..16a824acf1b 100644 --- a/src/third_party/wiredtiger/build_win/wiredtiger.def +++ b/src/third_party/wiredtiger/cmake/configs/wiredtiger.def diff --git a/src/third_party/wiredtiger/dist/s_all b/src/third_party/wiredtiger/dist/s_all index 916115ca3ee..d6511a483d6 100755 --- a/src/third_party/wiredtiger/dist/s_all +++ b/src/third_party/wiredtiger/dist/s_all @@ -36,11 +36,6 @@ done echo "Updating files that include the package version" && sh ./s_version $force -test "$reconf" -eq 0 || { - (echo "Rebuilding GNU tools library support" && - cd ../build_posix && 2>&1 sh ./reconf | sed -e 's/^/ /') -} - errchk() { if ! `test -s $2`; then @@ -116,7 +111,6 @@ COMMANDS=" 2>&1 ./s_typedef -c > ${t_pfx}s_typedef_c 2>&1 ./s_void > ${t_pfx}s_void 2>&1 ./s_whitespace > ${t_pfx}s_whitespace -2>&1 ./s_win > ${t_pfx}s_win 2>&1 python function.py > ${t_pfx}py_function 2>&1 python style.py > ${t_pfx}py_style" diff --git a/src/third_party/wiredtiger/dist/s_clang-scan b/src/third_party/wiredtiger/dist/s_clang-scan index 9a5ee3d4587..5235a069c60 100644 --- a/src/third_party/wiredtiger/dist/s_clang-scan +++ b/src/third_party/wiredtiger/dist/s_clang-scan @@ -1,9 +1,11 @@ #! /bin/sh -t=__wt.$$ +t_out=__wt.$$.out +t_err=__wt.$$.err a=__wt.$$.a b=__wt.$$.b -trap 'rm -rf $a $b $t' 0 1 2 3 13 15 +t_build=__s_clang_scan_tmp_build +trap 'rm -rf $a $b $t_out $t_err $t_build' 0 1 2 3 13 15 # Find the top-level WiredTiger directory and move to there. top=`git rev-parse --show-toplevel` && cd $top || exit 1 @@ -32,26 +34,25 @@ echo "$0: scan-build: $scan" # Remove old reports. rm -rf clangScanBuildReports && mkdir clangScanBuildReports +rm -rf ${t_build} && mkdir ${t_build} -sh autogen.sh > /dev/null || exit 1 - +cd ${t_build} args="-o clangScanBuildReports" args="$args --use-cc=$compiler" args="$args -disable-checker core.NullDereference" -$scan $args ./configure 'CFLAGS=-g' \ - --disable-shared --enable-diagnostic --enable-strict > /dev/null -$scan $args make -j 8 wt 1>/dev/null 2>$t - -make -j 8 distclean > /dev/null +$scan $args cmake CMAKE_C_FLAGS=-g \ + -DENABLE_STATIC=1 -DENABLE_SHARED=0 -DHAVE_DIAGNOSTIC=1 -DENABLE_STRICT=1 ../.> /dev/null +$scan $args make -j 8 wt 1>../$t_out 2>../$t_err +cd .. -grep 'No bugs found' $t > /dev/null && exit 0 +grep 'No bugs found' $t_out > /dev/null && exit 0 # Compare the set of errors/warnings and exit success when they're expected. # clang-scan outputs errors/warnings with a leading file path followed by a # colon, followed by the string "error:" or "warning:". cat dist/s_clang-scan.diff | egrep '^[a-z\./].*error: |^[a-z\./].*warning: ' | sed -e 's/:.*:.*://' | sort > $a -cat $t | +cat $t_err | egrep '^[a-z\./].*error: |^[a-z\./].*warning: ' | sed -e 's/:.*:.*://' | sort > $b diff $a $b > /dev/null && exit 0 @@ -59,5 +60,5 @@ echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" echo 'scan-build output differs from expected:' echo '<<<<<<<<<< Expected >>>>>>>>>> Current' echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" -diff dist/s_clang-scan.diff $t +diff dist/s_clang-scan.diff $t_err exit 1 diff --git a/src/third_party/wiredtiger/dist/s_clang-tidy b/src/third_party/wiredtiger/dist/s_clang-tidy index 784bdb1c413..b0f928054ae 100644 --- a/src/third_party/wiredtiger/dist/s_clang-tidy +++ b/src/third_party/wiredtiger/dist/s_clang-tidy @@ -1,7 +1,8 @@ #! /bin/sh t=__wt.$$ -trap 'rm -rf $t' 0 1 2 3 13 15 +t_pfx=__s_clang_tidy_tmp_ +trap 'rm -rf $t $t_pfx*' 0 1 2 3 13 15 # Find the top-level WiredTiger directory and move to there. top=`git rev-parse --show-toplevel` && cd $top || exit 1 @@ -23,13 +24,14 @@ if test -z "$tidy"; then fi echo "$0: clang-tidy: $tidy" -(sh autogen.sh && - ./configure --enable-diagnostic --enable-strict) > /dev/null || exit 1 +rm -rf ${t_pfx}build && mkdir ${t_pfx}build +(cd ${t_pfx}build && + cmake -DHAVE_DIAGNOSTIC=1 -DENABLE_STRICT=1 ../.) > /dev/null || exit 1 # We need a custom wiredtiger_config.h, clang-tidy doesn't know where to # find the x86intrin.h include file. -cp wiredtiger_config.h $t -sed '/HAVE_X86INTRIN_H/d' < $t > wiredtiger_config.h +cp ${t_pfx}build/config/wiredtiger_config.h $t +sed '/HAVE_X86INTRIN_H/d' < $t > ${t_pfx}build/config/wiredtiger_config.h # We need a custom verify_build.h, clang-tidy doesn't like the magic. f=src/include/verify_build.h @@ -37,7 +39,7 @@ cat $f > $f.save echo '#define WT_STATIC_ASSERT(a)' > $f def="-D_GNU_SOURCE" -inc="-I. -Isrc/include" +inc="-I${t_pfx}build/config -I${t_pfx}build/include -Isrc/include" args="-checks=*" args="$args,-android-cloexec-fopen" diff --git a/src/third_party/wiredtiger/dist/s_copyright b/src/third_party/wiredtiger/dist/s_copyright index 4b3ed9fc0d9..98d1b45e1b2 100755 --- a/src/third_party/wiredtiger/dist/s_copyright +++ b/src/third_party/wiredtiger/dist/s_copyright @@ -112,7 +112,7 @@ fi -o -name '*.py' \ -o -name '*.swig' | sed -e '/Makefile.in/d' \ - -e '/^build_posix\//d' \ + -e '/^cmake\//d' \ -e '/checksum\/power8\//d' \ -e '/checksum\/zseries\//d' \ -e '/\/3rdparty\//d' \ diff --git a/src/third_party/wiredtiger/dist/s_copyright.list b/src/third_party/wiredtiger/dist/s_copyright.list index 8f4534c2670..8488696cfb9 100644 --- a/src/third_party/wiredtiger/dist/s_copyright.list +++ b/src/third_party/wiredtiger/dist/s_copyright.list @@ -1,7 +1,6 @@ skip bench/workgen/workgen/workgen.py skip bench/workgen/workgen_wrap.cxx skip cmake/install/wiredtiger.pc.in -skip build_win/wiredtiger_config.h skip dist/api_config.py skip dist/api_config_gen.py skip dist/api_data.py diff --git a/src/third_party/wiredtiger/dist/s_export b/src/third_party/wiredtiger/dist/s_export index 8615f1415b2..f2c093b1b2e 100755 --- a/src/third_party/wiredtiger/dist/s_export +++ b/src/third_party/wiredtiger/dist/s_export @@ -42,14 +42,12 @@ check() # This check would normally be done after the library is built, but this way # we don't forget about a symbol during development. We usually build in the -# top-level or build_posix directories, check the previously built library, +# top-level directories, check the previously built library, # if it exists. And, allow this script to be run from the top-level directory # as well as locally. (??? this last wasn't true before my changes and still # isn't) # # Check all library images that appear; typically they will be one of -# ../build_posix/.libs/libwiredtiger.$ext (autotools build) -# ../.libs/libwiredtiger.$ext (autotools build at top level) # ../build/libwiredtiger.$ext (cmake build) # ../cmake_build/libwiredtiger.$ext (cmake build) diff --git a/src/third_party/wiredtiger/dist/s_release b/src/third_party/wiredtiger/dist/s_release index f55247f6fe2..f96b96e683e 100755 --- a/src/third_party/wiredtiger/dist/s_release +++ b/src/third_party/wiredtiger/dist/s_release @@ -32,15 +32,6 @@ fi echo "Running 'dist/s_all' in the release tree" (cd "$DEST/dist" && env WT_RELEASE_BUILD=yes sh s_all -A > /dev/null) -echo "Running swig to generate the Python API" -(cd "$DEST/build_posix" && - ../configure --enable-python && - (cd lang/python && make ../../../lang/python/wiredtiger_wrap.c) && - make distclean && - find . -type d -a -empty | xargs rmdir && - find . -type d -a -empty | xargs rmdir && - find . -type d -a -empty | xargs rmdir) > /dev/null - echo "Building documentation" (cd "$DEST/dist" && sh s_docs > /dev/null) diff --git a/src/third_party/wiredtiger/dist/s_style b/src/third_party/wiredtiger/dist/s_style index dfee7284c38..0b94f582332 100755 --- a/src/third_party/wiredtiger/dist/s_style +++ b/src/third_party/wiredtiger/dist/s_style @@ -20,7 +20,6 @@ if [ $# -ne 1 ]; then -name '*.[chsy]' -o -name '*.in' -o -name '*.dox' -o -name '*.cxx' -o -name '*.py' -o -name '*.cmake' -o -name '*.i' | sed -e '/Makefile.in/d' \ -e '/test\/3rdparty/d' \ - -e '/build_win\/wiredtiger_config.h/d' \ -e '/checksum\/power8/d' \ -e '/checksum\/zseries/d' | xargs $xp -n 1 -I{} sh ./dist/s_style {} diff --git a/src/third_party/wiredtiger/dist/s_tags b/src/third_party/wiredtiger/dist/s_tags index 52449aca582..c5faedb034b 100755 --- a/src/third_party/wiredtiger/dist/s_tags +++ b/src/third_party/wiredtiger/dist/s_tags @@ -26,8 +26,10 @@ for i in -d -t -w --language-force=C '-I WT_GCC_FUNC_ATTRIBUTE+'; do fi done -# Generate a tags file for the standard build directory. -(cd ../build_posix && +# If it exists, generate a tags file for the build directory. The user can have +# any number of out-of-source build directories. We will just conventionally test +# for a directory named 'build'. +test -d ../build && (cd ../build && rm -f tags && ctags $flags ../src/include/*.in `find ../src -name '*.[ch]'` 2>/dev/null) diff --git a/src/third_party/wiredtiger/dist/s_version b/src/third_party/wiredtiger/dist/s_version index 63b424240c9..736a712af8a 100755 --- a/src/third_party/wiredtiger/dist/s_version +++ b/src/third_party/wiredtiger/dist/s_version @@ -3,9 +3,6 @@ # Propagate version changes to the necessary files. . ../RELEASE_INFO -m4dir=../build_posix/aclocal -rpmspec=./package/wiredtiger.spec -tmp_file=__tmp cmakedir=../cmake/configs force=no @@ -19,48 +16,6 @@ while : esac done -GenAutoconfVersion(){ - # If the version hasn't changed and we're not forcing the issue, we're done. - if test "$force" = no -a \ - -f $m4dir/version.m4 -a \ - -f $m4dir/version-set.m4 ; then - eval `grep '^VERSION_[A-Z]*=' $m4dir/version-set.m4` - if test x${WIREDTIGER_VERSION_MAJOR} = x${VERSION_MAJOR} -a \ - x${WIREDTIGER_VERSION_MINOR} = x${VERSION_MINOR} -a \ - x${WIREDTIGER_VERSION_PATCH} = x${VERSION_PATCH} ; then - return - fi - fi - dotted_version=${WIREDTIGER_VERSION_MAJOR}.${WIREDTIGER_VERSION_MINOR}.${WIREDTIGER_VERSION_PATCH} - echo "Building $m4dir/version.m4" - cat > $m4dir/version.m4 <<-END - dnl WiredTiger product version for AC_INIT. Maintained by dist/s_version - ${dotted_version} - END - - echo "Building $m4dir/version-set.m4" - cat > $m4dir/version-set.m4 <<-END - dnl build by dist/s_version - - VERSION_MAJOR=${WIREDTIGER_VERSION_MAJOR} - VERSION_MINOR=${WIREDTIGER_VERSION_MINOR} - VERSION_PATCH=${WIREDTIGER_VERSION_PATCH} - VERSION_STRING='"${WIREDTIGER_VERSION_STRING}"' - - AC_SUBST(VERSION_MAJOR) - AC_SUBST(VERSION_MINOR) - AC_SUBST(VERSION_PATCH) - AC_SUBST(VERSION_STRING) - - VERSION_NOPATCH=${WIREDTIGER_VERSION_MAJOR}.${WIREDTIGER_VERSION_MINOR} - AC_SUBST(VERSION_NOPATCH) - END - - echo "Building $rpmspec" - sed -e "s/Version: .*/Version: ${dotted_version}/" $rpmspec \ - > $tmp_file && mv $tmp_file $rpmspec -} - GenCmakeVersion(){ if test "$force" = no -a \ -f $cmakedir/version.cmake ; then @@ -81,5 +36,4 @@ GenCmakeVersion(){ END } -GenAutoconfVersion GenCmakeVersion diff --git a/src/third_party/wiredtiger/dist/s_win b/src/third_party/wiredtiger/dist/s_win deleted file mode 100755 index 5b45cacf0f4..00000000000 --- a/src/third_party/wiredtiger/dist/s_win +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -t=__wt.$$ -trap 'rm -f $t' 0 1 2 3 13 15 - -# Insulate against locale-specific sort order -LC_ALL=C -export LC_ALL - -win_config() -{ - f='../build_win/wiredtiger_config.h' - egrep '#define|#undef' \ - ../build_posix/config.hin $f | - sed 's/^.*#//' | - awk '{print $2}' | - egrep -v '^(LT_OBJDIR|PACKAGE|VERSION)' | - sort | uniq -u > $t - - test -s $t && { - echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" - echo "$f: configuration #defines do not match POSIX" - echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" - cat $t - exit 1 - } -} - -win_export() -{ - # Build the Windows list of exported symbols. - f='../build_win/wiredtiger.def' - (echo 'LIBRARY WIREDTIGER' - echo 'EXPORTS' - sed -e '/^$/d' \ - -e '/^#/d' \ - -e 's/^/ /') < s_export.list > $t - cmp $t $f > /dev/null 2>&1 || - (echo "Building $f" && rm -f $f && cp $t $f) -} - -win_config -win_export - -exit 0 diff --git a/src/third_party/wiredtiger/examples/c/Makefile.am b/src/third_party/wiredtiger/examples/c/Makefile.am deleted file mode 100644 index e83bac63f2c..00000000000 --- a/src/third_party/wiredtiger/examples/c/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -LDADD = $(top_builddir)/test/utility/libtest_util.la -LDADD += $(top_builddir)/libwiredtiger.la -AM_CPPFLAGS = -I$(top_srcdir)/src/include -AM_CPPFLAGS +=-I$(top_srcdir)/test/utility - -noinst_PROGRAMS = \ - ex_access \ - ex_all \ - ex_backup \ - ex_backup_block \ - ex_call_center \ - ex_col_store \ - ex_config_parse \ - ex_cursor \ - ex_data_source \ - ex_encrypt \ - ex_event_handler \ - ex_extending \ - ex_extractor \ - ex_file_system \ - ex_hello \ - ex_log \ - ex_pack \ - ex_process \ - ex_schema \ - ex_smoke \ - ex_stat \ - ex_thread - -ex_encrypt_LDFLAGS = -rdynamic -ex_file_system_LDFLAGS = -rdynamic - -# The examples can be run with no arguments as simple smoke tests -TESTS = $(noinst_PROGRAMS) - -AM_TESTS_ENVIRONMENT = WIREDTIGER_HOME=`mktemp -d WT_HOME.XXXX` ; export WIREDTIGER_HOME ; rm -rf $$WIREDTIGER_HOME ; mkdir $$WIREDTIGER_HOME ; - -# Inject valgrind or similar -LOG_COMPILER = $(TEST_WRAPPER) - -clean-local: - rm -rf WT_HOME* core.* *.core backup_full.* backup_incr.* diff --git a/src/third_party/wiredtiger/ext/collators/reverse/Makefile.am b/src/third_party/wiredtiger/ext/collators/reverse/Makefile.am deleted file mode 100644 index 5cfde94d847..00000000000 --- a/src/third_party/wiredtiger/ext/collators/reverse/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include - -noinst_LTLIBRARIES = libwiredtiger_reverse_collator.la -libwiredtiger_reverse_collator_la_SOURCES = reverse_collator.c - -# libtool hack: noinst_LTLIBRARIES turns off building shared libraries as well -# as installation, it will only build static libraries. As far as I can tell, -# the "approved" libtool way to turn them back on is by adding -rpath. -libwiredtiger_reverse_collator_la_LDFLAGS = \ - -avoid-version -module -rpath /nowhere diff --git a/src/third_party/wiredtiger/ext/collators/revint/Makefile.am b/src/third_party/wiredtiger/ext/collators/revint/Makefile.am deleted file mode 100644 index 8c85c6a4701..00000000000 --- a/src/third_party/wiredtiger/ext/collators/revint/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include - -noinst_LTLIBRARIES = libwiredtiger_revint_collator.la -libwiredtiger_revint_collator_la_SOURCES = revint_collator.c - -# libtool hack: noinst_LTLIBRARIES turns off building shared libraries as well -# as installation, it will only build static libraries. As far as I can tell, -# the "approved" libtool way to turn them back on is by adding -rpath. -libwiredtiger_revint_collator_la_LDFLAGS = \ - -avoid-version -module -rpath /nowhere diff --git a/src/third_party/wiredtiger/ext/compressors/lz4/Makefile.am b/src/third_party/wiredtiger/ext/compressors/lz4/Makefile.am deleted file mode 100644 index c800a5adb15..00000000000 --- a/src/third_party/wiredtiger/ext/compressors/lz4/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include - -if HAVE_BUILTIN_EXTENSION_LZ4 -noinst_LTLIBRARIES = libwiredtiger_lz4.la -else -lib_LTLIBRARIES = libwiredtiger_lz4.la -libwiredtiger_lz4_la_LDFLAGS = -avoid-version -module -endif - -libwiredtiger_lz4_la_SOURCES = lz4_compress.c -libwiredtiger_lz4_la_LIBADD = -llz4 diff --git a/src/third_party/wiredtiger/ext/compressors/nop/Makefile.am b/src/third_party/wiredtiger/ext/compressors/nop/Makefile.am deleted file mode 100644 index 87dbf18cb22..00000000000 --- a/src/third_party/wiredtiger/ext/compressors/nop/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include - -noinst_LTLIBRARIES = libwiredtiger_nop.la -libwiredtiger_nop_la_SOURCES = nop_compress.c - -# libtool hack: noinst_LTLIBRARIES turns off building shared libraries as well -# as installation, it will only build static libraries. As far as I can tell, -# the "approved" libtool way to turn them back on is by adding -rpath. -libwiredtiger_nop_la_LDFLAGS = -avoid-version -module -rpath /nowhere diff --git a/src/third_party/wiredtiger/ext/compressors/snappy/Makefile.am b/src/third_party/wiredtiger/ext/compressors/snappy/Makefile.am deleted file mode 100644 index 78317234ba0..00000000000 --- a/src/third_party/wiredtiger/ext/compressors/snappy/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include - -if HAVE_BUILTIN_EXTENSION_SNAPPY -noinst_LTLIBRARIES = libwiredtiger_snappy.la -else -lib_LTLIBRARIES = libwiredtiger_snappy.la -libwiredtiger_snappy_la_LDFLAGS = -avoid-version -module -endif -libwiredtiger_snappy_la_SOURCES = snappy_compress.c -libwiredtiger_snappy_la_LIBADD = -lsnappy diff --git a/src/third_party/wiredtiger/ext/compressors/zlib/Makefile.am b/src/third_party/wiredtiger/ext/compressors/zlib/Makefile.am deleted file mode 100644 index fb0ec306562..00000000000 --- a/src/third_party/wiredtiger/ext/compressors/zlib/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include - -if HAVE_BUILTIN_EXTENSION_ZLIB -noinst_LTLIBRARIES = libwiredtiger_zlib.la -else -lib_LTLIBRARIES = libwiredtiger_zlib.la -libwiredtiger_zlib_la_LDFLAGS = -avoid-version -module -endif -libwiredtiger_zlib_la_SOURCES = zlib_compress.c -libwiredtiger_zlib_la_LIBADD = -lz diff --git a/src/third_party/wiredtiger/ext/compressors/zstd/Makefile.am b/src/third_party/wiredtiger/ext/compressors/zstd/Makefile.am deleted file mode 100644 index 9f0997011e9..00000000000 --- a/src/third_party/wiredtiger/ext/compressors/zstd/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include - -if HAVE_BUILTIN_EXTENSION_ZSTD -noinst_LTLIBRARIES = libwiredtiger_zstd.la -else -lib_LTLIBRARIES = libwiredtiger_zstd.la -libwiredtiger_zstd_la_LDFLAGS = -avoid-version -module -endif - -libwiredtiger_zstd_la_SOURCES = zstd_compress.c -libwiredtiger_zstd_la_LIBADD = -lzstd diff --git a/src/third_party/wiredtiger/ext/encryptors/nop/Makefile.am b/src/third_party/wiredtiger/ext/encryptors/nop/Makefile.am deleted file mode 100644 index 189f764b04c..00000000000 --- a/src/third_party/wiredtiger/ext/encryptors/nop/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include - -noinst_LTLIBRARIES = libwiredtiger_nop.la -libwiredtiger_nop_la_SOURCES = nop_encrypt.c - -# libtool hack: noinst_LTLIBRARIES turns off building shared libraries as well -# as installation, it will only build static libraries. As far as I can tell, -# the "approved" libtool way to turn them back on is by adding -rpath. -libwiredtiger_nop_la_LDFLAGS = -avoid-version -module -rpath /nowhere diff --git a/src/third_party/wiredtiger/ext/encryptors/rotn/Makefile.am b/src/third_party/wiredtiger/ext/encryptors/rotn/Makefile.am deleted file mode 100644 index fec4ed0f861..00000000000 --- a/src/third_party/wiredtiger/ext/encryptors/rotn/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include - -noinst_LTLIBRARIES = libwiredtiger_rotn.la -libwiredtiger_rotn_la_SOURCES = rotn_encrypt.c - -# libtool hack: noinst_LTLIBRARIES turns off building shared libraries as well -# as installation, it will only build static libraries. As far as I can tell, -# the "approved" libtool way to turn them back on is by adding -rpath. -libwiredtiger_rotn_la_LDFLAGS = -avoid-version -module -rpath /nowhere diff --git a/src/third_party/wiredtiger/ext/encryptors/sodium/Makefile.am b/src/third_party/wiredtiger/ext/encryptors/sodium/Makefile.am deleted file mode 100644 index d46be6eb4f5..00000000000 --- a/src/third_party/wiredtiger/ext/encryptors/sodium/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include - -if HAVE_BUILTIN_EXTENSION_SODIUM -noinst_LTLIBRARIES = libwiredtiger_sodium.la -else -lib_LTLIBRARIES = libwiredtiger_sodium.la -libwiredtiger_sodium_la_LDFLAGS = -avoid-version -module -endif -libwiredtiger_sodium_la_SOURCES = sodium_encrypt.c -libwiredtiger_sodium_la_LIBADD = -lsodium diff --git a/src/third_party/wiredtiger/ext/extractors/csv/Makefile.am b/src/third_party/wiredtiger/ext/extractors/csv/Makefile.am deleted file mode 100644 index bb2a35bbf8e..00000000000 --- a/src/third_party/wiredtiger/ext/extractors/csv/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include - -noinst_LTLIBRARIES = libwiredtiger_csv_extractor.la -libwiredtiger_csv_extractor_la_SOURCES = csv_extractor.c - -# libtool hack: noinst_LTLIBRARIES turns off building shared libraries as well -# as installation, it will only build static libraries. As far as I can tell, -# the "approved" libtool way to turn them back on is by adding -rpath. -libwiredtiger_csv_extractor_la_LDFLAGS = \ - -avoid-version -module -rpath /nowhere diff --git a/src/third_party/wiredtiger/ext/storage_sources/local_store/Makefile.am b/src/third_party/wiredtiger/ext/storage_sources/local_store/Makefile.am deleted file mode 100644 index 3debb3f8a64..00000000000 --- a/src/third_party/wiredtiger/ext/storage_sources/local_store/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include - -noinst_LTLIBRARIES = libwiredtiger_local_store.la -libwiredtiger_local_store_la_SOURCES = local_store.c - -# libtool hack: noinst_LTLIBRARIES turns off building shared libraries as well -# as installation, it will only build static libraries. As far as I can tell, -# the "approved" libtool way to turn them back on is by adding -rpath. -libwiredtiger_local_store_la_LDFLAGS = -avoid-version -module -rpath /nowhere diff --git a/src/third_party/wiredtiger/ext/test/fail_fs/Makefile.am b/src/third_party/wiredtiger/ext/test/fail_fs/Makefile.am deleted file mode 100644 index f31f5395cd1..00000000000 --- a/src/third_party/wiredtiger/ext/test/fail_fs/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include - -noinst_LTLIBRARIES = libwiredtiger_fail_fs.la -libwiredtiger_fail_fs_la_SOURCES = fail_fs.c - -# libtool hack: noinst_LTLIBRARIES turns off building shared libraries as well -# as installation, it will only build static libraries. As far as I can tell, -# the "approved" libtool way to turn them back on is by adding -rpath. -libwiredtiger_fail_fs_la_LDFLAGS = -avoid-version -module -rpath /nowhere diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 92dec15656a..17934318fa2 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-master", - "commit": "9e92b73891510149a24567249223e2ccc34abe91" + "commit": "0d65fabfca1e3435e8f8298a98d4fc91c56e331c" } diff --git a/src/third_party/wiredtiger/lang/python/Makefile.am b/src/third_party/wiredtiger/lang/python/Makefile.am deleted file mode 100644 index cdbc615a6f1..00000000000 --- a/src/third_party/wiredtiger/lang/python/Makefile.am +++ /dev/null @@ -1,47 +0,0 @@ -PYSRC = $(top_srcdir)/lang/python -PYDIRS = -t $(abs_builddir) -I $(abs_top_srcdir):$(abs_top_builddir) -L $(abs_top_builddir)/.libs -PYDST = $(abs_builddir)/wiredtiger -PYFILES = $(PYDST)/fpacking.py $(PYDST)/intpacking.py $(PYDST)/packing.py \ - $(PYDST)/packutil.py $(PYDST)/swig_wiredtiger.py $(PYDST)/__init__.py - -all-local: _wiredtiger.so pyfiles - -# We keep generated Python sources under lang/python: that's where they live -# in release packages. -$(PYSRC)/wiredtiger_wrap.c $(PYSRC)/wiredtiger.py: $(top_srcdir)/src/include/wiredtiger.in $(PYSRC)/wiredtiger.i - (cd $(PYSRC) && \ - $(SWIG) -python \ - -threads -O -Wall -nodefaultctor -nodefaultdtor \ - -I$(abs_top_builddir) wiredtiger.i) - -_wiredtiger.so: $(top_builddir)/libwiredtiger.la $(PYSRC)/wiredtiger_wrap.c - (cd $(PYSRC) && \ - $(PYTHON) setup.py build_ext -f -b $(abs_builddir) $(PYDIRS)) - -pyfiles: $(PYFILES) - -$(PYDST)/%: $(PYSRC)/wiredtiger/% - mkdir -p $(PYDST) && cp -f $< $@ - -$(PYDST)/__init__.py: $(PYSRC)/wiredtiger/init.py - mkdir -p $(PYDST) && cp -f $< $@ - -# Note: this cannot be named wiredtiger.py in the target directory, -# we won't be able to import it. -$(PYDST)/swig_wiredtiger.py: $(PYSRC)/wiredtiger.py - mkdir -p $(PYDST) && cp -f $< $@ - -install-exec-local: - (cd $(PYSRC) && \ - $(PYTHON) setup.py build_py -d $(abs_builddir)/build && \ - $(PYTHON) setup.py build_ext -f -b $(abs_builddir)/build $(PYDIRS) && \ - $(PYTHON) setup.py install_lib -b $(abs_builddir)/build --skip-build $(PYTHON_INSTALL_ARG) && \ - rm -rf $(abs_builddir)/build) - -# We build in different places for an install vs running from the tree: -# clean up both. Don't rely on "setup.py clean" -- everything that should -# be removed is created under the build directory. -clean-local: - rm -rf build _wiredtiger.so wiredtiger_wrap.o WT_TEST core.* *.core - -TESTS = run-ex_access diff --git a/src/third_party/wiredtiger/src/docs/build-autoconf.dox b/src/third_party/wiredtiger/src/docs/build-autoconf.dox deleted file mode 100644 index 30310e2fcfe..00000000000 --- a/src/third_party/wiredtiger/src/docs/build-autoconf.dox +++ /dev/null @@ -1,205 +0,0 @@ -/*! @page build-autoconf Building and installing WiredTiger with autoconf/libtool - -@section autoconf_github Building using Git and GitHub - -Skip this step if you are building from a WiredTiger release package, -and proceed with @ref autoconf_building. - -To build from the WiredTiger GitHub repository requires -<a href="http://git-scm.com/">git</a>, -<a href="http://www.gnu.org/software/autoconf/autoconf.html">autoconf</a>, -<a href="http://www.gnu.org/software/autoconf/automake.html">automake</a>, -<a href="http://www.gnu.org/software/libtool/libtool.html">libtool</a> and -related tools. The standard options for those tools can be specified -when configuring and building WiredTiger. - -First, clone the repository: - -@code -git clone git://github.com/wiredtiger/wiredtiger.git -@endcode - -Second, run \c autogen.sh to create the \c configure script: - -@code -cd wiredtiger -sh autogen.sh -@endcode - -Now proceed with @ref autoconf_building. - -@section autoconf_building Building WiredTiger - -To build the WiredTiger software on a POSIX system, change directory to -the top-level directory, then configure and build the software: - -@code -cd wiredtiger -./configure && make -@endcode - -To rebuild from scratch, discard any previous configuration by cleaning -out the build area: - -@code -make distclean -@endcode - -To see additional configuration options, run: - -@code -./configure --help -@endcode - -WiredTiger uses -<a href="http://www.gnu.org/software/autoconf/autoconf.html">autoconf</a> -<a href="http://www.gnu.org/software/autoconf/automake.html">automake</a>, -and <a href="http://www.gnu.org/software/libtool/libtool.html">libtool</a> -to create the configure script and Makefiles. The standard options for those -tools can be specified when configuring and building WiredTiger. - -@section autoconf_installing Installing WiredTiger - -The WiredTiger software consists of a library and a single standalone -utility. - -WiredTiger's distribution follows the GNU Coding Standards installation -guidelines, and by default WiredTiger builds and installs four versions -of the library in <code>/usr/local/lib</code>. For example: - -@code -file /usr/local/lib/libwiredtiger* -/usr/local/lib/libwiredtiger-1.0.0.so: ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically linked, not stripped -/usr/local/lib/libwiredtiger.a: current ar archive -/usr/local/lib/libwiredtiger.la: libtool library file -/usr/local/lib/libwiredtiger.so: symbolic link to `libwiredtiger-1.0.0.so' -@endcode - -WiredTiger uses -<a href="http://www.gnu.org/software/libtool/libtool.html">libtool</a> to -build the libraries. By default, both shared and static libraries are built. -To build only static libraries, configure WiredTiger using the -\c --disable-shared argument. To build only shared libraries, configure using -WiredTiger using the \c --disable-static argument. - -In addition, WiredTiger installs a standalone utility program named -<code>wt</code>. By default, this utility is installed in -<code>/usr/local/bin/wt</code>. - -To install WiredTiger: - -@code -make install -@endcode - -To uninstall WiredTiger: - -@code -make uninstall -@endcode - -To install WiredTiger's libraries or binaries into alternate locations, -use the configuration or installation options described in the -<a href="http://www.gnu.org/prep/standards/">GNU coding standards</a> -documentation. For example, to install the libraries and binaries into -a different location: - -@code -./configure --prefix=/c/wiredtiger -@endcode - -@section autoconf_configure Configuring WiredTiger - -The WiredTiger software supports some additional configuration options: - -@par \c --enable-attach -Configure WiredTiger to sleep and wait for a debugger to attach on failure. -<b>DO NOT</b> configure this option in production environments. - -@par \c --enable-diagnostic -Configure WiredTiger to perform various run-time diagnostic tests. -<b>DO NOT</b> configure this option in production environments. - -@par \c --enable-lz4 -Configure WiredTiger for <a href="https://github.com/Cyan4973/lz4">LZ4</a> -compression; see @ref compression for more information. - -@par \c --enable-python -Build the WiredTiger <a href="http://www.python.org">Python</a> API; -requires <a href="http://swig.org">SWIG</a>. - -@par \c --enable-snappy -Configure WiredTiger for <a href="http://code.google.com/p/snappy/">snappy</a> -compression; see @ref compression for more information. - -@par \c --enable-zlib -Configure WiredTiger for <a href="http://www.zlib.net/">zlib</a> -compression; see @ref compression for more information. - -@par \c --enable-zstd -Configure WiredTiger for <a href="https://github.com/facebook/zstd">Zstd</a> -compression; see @ref compression for more information. - -@par \c --disable-standalone-build -Configure WiredTiger to disable standalone build. Standalone build is enabled -by default. - -@par <code>--with-builtins</code> -Configure WiredTiger to include support for extensions in the main library. -This avoids requiring additional libraries for supported extensions. Currently -supported options are \c lz4, \c snappy, \c zlib and \c zstd. - -@par <code>--with-python-prefix</code> -Configure WiredTiger to install Python libraries to a non-standard Python -install location. - -@par <code>--with-spinlock[=pthread, pthread_adaptive, gcc]</code> -Configure WiredTiger to use a specific mutex type for serialization; -options are \c pthread (the default, which configures WiredTiger to use -POSIX 1003.1c pthread mutexes), \c pthread_adaptive (which configures -WiredTiger to use POSIX 1003.1c pthread mutexes configured to be -adaptive (where that functionality is available), or \c gcc (which -configures WiredTiger to use gcc-based spinlocks). - -@section autoconf_compiler Changing compiler or loader options - -To change the compiler or loader behavior during the build, use the -<code>CC</code>, <code>CFLAGS</code>, <code>LDFLAGS</code>, or -<code>LIBS</code> environment variables: - -@par \c CC -The compiler. -@par \c CFLAGS -Compiler flags. -@par \c LDFLAGS -Loader flags. -@par \c LIBS -Additional libraries. - -For example, to specify a different compiler: - -@code -env CC=mygcc ./configure -@endcode - -By default, WiredTiger builds with the \c -O3 compiler optimization flag -unless the \c --enable-debug configuration option is specified, in which -case the \c -g compiler flag is used instead. For example, to specify -a different level of optimization: - -@code -env CFLAGS=-Os ./configure -@endcode - -To specify a different set of include files: - -@code -env CFLAGS=-I/usr/local/include ./configure -@endcode - -To specify an additional library: - -@code -env LIBS="-lrtf -lmin" LDFLAGS=-L/usr/local/lib ./configure -@endcode - */ diff --git a/src/third_party/wiredtiger/src/docs/build-posix.dox b/src/third_party/wiredtiger/src/docs/build-posix.dox index ea9bcb5ea90..40b1d3356bc 100644 --- a/src/third_party/wiredtiger/src/docs/build-posix.dox +++ b/src/third_party/wiredtiger/src/docs/build-posix.dox @@ -1,7 +1,5 @@ /*! @page build-posix Building and installing WiredTiger on POSIX (Linux, *BSD, OS X): -To read instructions on using the legacy autoconf build system, see @subpage build-autoconf. - @section posix_github Building using Git and GitHub Skip this step if you are building from a WiredTiger release package, @@ -9,10 +7,9 @@ and proceed with @ref posix_building. To build from the WiredTiger GitHub repository requires <a href="http://git-scm.com/">git</a>, -<a href="https://cmake.org/">CMake</a>, -<a href="https://ninja-build.org/">Ninja</a>. -We also suggest <a href="https://ccache.dev/">ccache</a> for improved build times -and <a href="http://www.swig.org/">SWIG</a> for building with Python support. +<a href="https://cmake.org/">CMake</a>. +We also suggest <a href="https://ninja-build.org/">Ninja</a> and <a href="https://ccache.dev/">ccache</a> for improved +incremental build times and <a href="http://www.swig.org/">SWIG</a> for building with Python support. First, clone the repository: @@ -35,14 +32,17 @@ cd build @endcode Change into your newly created build directory and using CMake run the build configuration -step to generate your ninja build. +step to generate your build. @code -cmake -G Ninja ../. +cmake ../. +# If using the Ninja build tool, you can additionally specify the generator '-G Ninja' to construct a +# ninja build i.e 'cmake -G Ninja ../.'. @endcode -Lastly, in the same directory you configured your build, run the ninja command to start the build: +Lastly, in the same directory you configured your build, start the build: @code -ninja +make +# Or 'ninja' if using the Ninja build tool. @endcode @section posix_installing Installing WiredTiger @@ -70,7 +70,8 @@ In addition, WiredTiger installs a standalone utility program named To install WiredTiger: @code -ninja install +make install +# Or 'ninja install' if using the Ninja build tool. @endcode To uninstall WiredTiger: @@ -147,13 +148,13 @@ toolchain you can pass the \c -DCMAKE_TOOLCHAIN_FILE= to the CMake configuration For example, to explicitly specify the GCC toolchain: @code -cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/gcc.cmake -G Ninja ../. +cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/gcc.cmake ../. @endcode To explicitly specify the Clang toolchain: @code -cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/clang.cmake -G Ninja ../. +cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/clang.cmake ../. @endcode By default, WiredTiger builds with the \c -O3 compiler optimization flag @@ -161,7 +162,7 @@ unless manually specified through the \c -DCC_OPTIMIZE_LEVEL configuration optio a different level of optimization: @code -cmake -DCC_OPTIMIZE_LEVEL=-O1 -G Ninja ../. +cmake -DCC_OPTIMIZE_LEVEL=-O1 ../. @endcode @section posix_ctest Running WiredTiger C/C++ Tests diff --git a/src/third_party/wiredtiger/src/docs/build-windows.dox b/src/third_party/wiredtiger/src/docs/build-windows.dox index d45f479ce57..fd162250790 100644 --- a/src/third_party/wiredtiger/src/docs/build-windows.dox +++ b/src/third_party/wiredtiger/src/docs/build-windows.dox @@ -16,27 +16,36 @@ Now proceed with @ref windows_building @section windows_building Building on Windows Building WiredTiger on Windows requires -<a href="http://www.scons.org">SCons</a> as well as the Microsoft Visual +<a href="https://cmake.org/">CMake</a> as well as the Microsoft Visual C++ compiler in Microsoft Visual Studio. -Change directory to the top-level directory, then build the software: +You can build WiredTiger from source using command-line tools. +When compiling via command-line tools, we recommend a prompt/shell that has been appropriately +configured with VS toolchain environment variables. We usually recommend using the +<a href="https://docs.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell">Visual Studio Developer Command Prompt/Powershell</a> to +ensure an appropriately configured environment. + +Change directory to the top-level directory, then create and configure a new directory to run your +build from: @code cd wiredtiger -scons +mkdir build +cd build @endcode -To rebuild from scratch, discard any previous configuration by cleaning -out the build area: +Change into your newly created build directory and using CMake run the build configuration +step to generate your build. @code -scons -c +cmake ..\. @endcode -To see additional configuration options, run: - +In the absence of an explicit generator, CMake will generate Visual Studio project files +(\c .vcxproj), representing build targets within WiredTiger. To compile the entire +WiredTiger project, in the same directory we configured the build, run \c msbuild: @code -scons --help +msbuild ALL_BUILD.vcxproj @endcode To build the python language support, a 64-bit version of Python is @@ -55,11 +64,10 @@ guidelines, and by default WiredTiger builds and installs a static library and dll version of the library. @code -file <root directory>/package/bin/ +file <root directory>/bin/ wt.exe: x64 standalone executable -wiredtiger.dll: x64 dynamically linked library -file <root directory>/package/lib/ +file <root directory>/lib/ libwiredtiger.lib: x64 static library wiredtiger.lib: x64 import library for dll @endcode @@ -67,42 +75,78 @@ wiredtiger.lib: x64 import library for dll To install WiredTiger: @code -scons install +msbuild INSTALL.vcxproj @endcode To install WiredTiger's libraries or binaries into alternate locations, -you can use the --prefix configuration option. +you can use the \c -DCMAKE_INSTALL_PREFIX configuration option. @code -scons --prefix=c:\wiredtiger install +cmake -DCMAKE_INSTALL_PREFIX=c:\wiredtiger @endcode @section windows_configure Configuring WiredTiger The WiredTiger software supports some additional configuration options: -@par \c --enable-attach +@par \c -DHAVE_ATTACH=1 Configure WiredTiger to sleep and wait for a debugger to attach on failure. <b>DO NOT</b> configure this option in production environments. -@par \c --enable-diagnostic +@par \c -DHAVE_DIAGNOSTIC=1 Configure WiredTiger to perform various run-time diagnostic tests. <b>DO NOT</b> configure this option in production environments. -@par \c --enable-python -Build the WiredTiger <a href="http://www.python.org">Python</a> API, -requires path to swig.exe on Windows. +@par \c -DENABLE_LZ4=1 +Configure WiredTiger for <a href="https://github.com/Cyan4973/lz4">LZ4</a> +compression; see @ref compression for more information. + +@par \c -DENABLE_PYTHON=1 +Build the WiredTiger <a href="http://www.python.org">Python</a> API; +requires <a href="http://swig.org">SWIG</a>. -@par \c --enable-snappy +@par \c -DENABLE_SNAPPY=1 Configure WiredTiger for <a href="http://code.google.com/p/snappy/">snappy</a> compression; see @ref compression for more information. -@par \c --enable-zlib +@par \c -DENABLE_ZLIB=1 Configure WiredTiger for <a href="http://www.zlib.net/">zlib</a> compression; see @ref compression for more information. -@par \c --disable-standalone-build +@par \c -DENABLE_ZSTD=1 +Configure WiredTiger for <a href="https://github.com/facebook/zstd">Zstd</a> +compression; see @ref compression for more information. + +@par \c -DWT_STANDALONE_BUILD=0 Configure WiredTiger to disable standalone build. Standalone build is enabled by default. +@section windows_ctest Running WiredTiger C/C++ Tests + +The WiredTiger CMake build makes available a suite of C/C++ based tests. +To run the available tests you can use our smoke test alias (\c check). Ensure you're in the build directory and execute: + +@code +ctest -C <Debug|Release> -L check +@endcode + +Alternatively to just run all the tests available: + +@code +ctest -C <Debug|Release> +@endcode + +In addition, to get verbose output with your test run you can use the \c -VV flag: + +@code +ctest -C <Debug|Release> -VV +@endcode + +If you want to focus on running a specific test (i.e. run a test that may be failing) you can use the \c -R flag: + +@code +# Note: -R specifies a regex, where any matching test will be run +ctest -C <Debug|Release> -R test_name +@endcode + */ diff --git a/src/third_party/wiredtiger/src/docs/spell.ok b/src/third_party/wiredtiger/src/docs/spell.ok index ff023ea226d..63b7b6bfc36 100644 --- a/src/third_party/wiredtiger/src/docs/spell.ok +++ b/src/third_party/wiredtiger/src/docs/spell.ok @@ -3,6 +3,7 @@ ACM ADDR APIs ASAN +ASan ActiveState Adler's Atomicity @@ -29,6 +30,7 @@ Cyclomatic DB's DBTs DCC +DCLANG DCMAKE DENABLE DHANDLE @@ -107,6 +109,7 @@ NUMA NoSQL OPTYPE PMU +Powershell PPC PRELOAD PROFDATA @@ -456,6 +459,7 @@ mkdir mmap mpool mpoolfile +msbuild msec msg msgs @@ -671,6 +675,7 @@ util valign valuefmt valuev +vcxproj vec versa viewable diff --git a/src/third_party/wiredtiger/src/docs/tool-libfuzzer.dox b/src/third_party/wiredtiger/src/docs/tool-libfuzzer.dox index 43525faff39..6f2374c2372 100644 --- a/src/third_party/wiredtiger/src/docs/tool-libfuzzer.dox +++ b/src/third_party/wiredtiger/src/docs/tool-libfuzzer.dox @@ -20,27 +20,27 @@ Compiling with Clang's Address Sanitizer isn't mandatory but it is recommended s exposes memory bugs. @code -$ cd build_posix/ -$ ../configure --enable-libfuzzer CC="clang-8" CFLAGS="-fsanitize=address" +$ mkdir build +$ cd build +$ cmake -DENABLE_LLVM=1 -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/clang.cmake -DCLANG_C_VERSION="8" -DCLANG_CXX_VERSION="8" -DCMAKE_BUILD_TYPE=ASan ../. @endcode ## Step 2: Build as usual @code -$ cd build_posix $ make @endcode ## Step 3: Run a fuzzer -Each fuzzer is a program under \c build_posix/test/fuzz/. WiredTiger provides the +Each fuzzer is a program under \c build/test/fuzz/. WiredTiger provides the \c test/fuzz/fuzz_run.sh script to quickly get started using a fuzzer. It performs a limited number of runs, automatically cleans up after itself in between runs and provides a sensible set of parameters which users can add to. For example: @code -$ cd build_posix/test/fuzz/ -$ bash ../../../test/fuzz/fuzz_run.sh ./fuzz_modify +$ cd build/test/fuzz/ +$ bash ../../../test/fuzz/fuzz_run.sh ./test_fuzz_modify @endcode In general the usage is: @@ -77,8 +77,8 @@ supplied as the first positional argument to both \c fuzz_run.sh and the underly For example: @code -$ cd build_posix/test/fuzz/ -$ bash ../../../test/fuzz/fuzz_run.sh ./fuzz_config ../../../test/fuzz/config/corpus/ +$ cd build/test/fuzz/ +$ bash ../../../test/fuzz/fuzz_run.sh ./test_fuzz_config ../../../test/fuzz/config/corpus/ @endcode # Implementing an LLVM LibFuzzer fuzzer @@ -152,8 +152,9 @@ with profiling information. It's important that these are added to both the \c C \c LINKFLAGS variables. @code -$ cd build_posix/ -$ ../configure CC="clang-8" CFLAGS="-fprofile-instr-generate -fcoverage-mapping" LINKFLAGS="-fprofile-instr-generate -fcoverage-mapping" +$ mkdir build +$ cd build +$ cmake -DENABLE_LLVM=1 -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/clang.cmake -DCLANG_C_VERSION="8" -DCLANG_CXX_VERSION="8" -DCMAKE_BUILD_TYPE=Coverage ../. @endcode ## Step 2: Build and run fuzzer @@ -170,8 +171,8 @@ a readable form. WiredTiger provides a script called \c fuzz_coverage.sh that ha expects to be called from the same directory that the fuzzer was executed in. @code -$ cd build_posix/test/fuzz -$ bash ../../../test/fuzz/fuzz_coverage.sh ./fuzz_modify +$ cd build/test/fuzz +$ bash ../../../test/fuzz/fuzz_coverage.sh ./test_fuzz_modify @endcode In general the usage is: diff --git a/src/third_party/wiredtiger/src/docs/tool-xray.dox b/src/third_party/wiredtiger/src/docs/tool-xray.dox index b5e1d535d05..1333b9b1a23 100644 --- a/src/third_party/wiredtiger/src/docs/tool-xray.dox +++ b/src/third_party/wiredtiger/src/docs/tool-xray.dox @@ -8,23 +8,16 @@ functions and their timestamps. This article explains how to instrument WiredTiger, collect the XRay traces, and analyze them. As an example, we will show how to trace \c wtperf. -## Step 1: Configure the WiredTiger build with XRay instrumentation - -Select \c clang as your C compiler and provide the required flag to get it to -instrument your \c wtperf binary. - -@code -$ ../configure CC="clang-8" CFLAGS="-fxray-instrument" -@endcode - -## Step 2: Build as usual +## Step 1: Configure and compile WiredTiger with XRay instrumentation @code -$ cd build_posix +$ mkdir build +$ cd build +$ cmake -DCMAKE_C_FLAGS=-fxray-instrument -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/clang.cmake -DCLANG_C_VERSION="8" -DCLANG_CXX_VERSION="8" ../. $ make @endcode -## Step 3: Run wtperf +## Step 2: Run wtperf Use the script \c wtperf_xray.sh to launch \c wtperf from the directory containing the \c wtperf binary. The first argument to the script must be the @@ -109,13 +102,15 @@ invoked instead. The \c llvm-config command line tool is used to supply the required compiler and linker flags to build programs such like \c xray_to_optrack on top of LLVM. -## Step 3: Configure the WiredTiger build with LLVM flags +## Step 3: Configure and build WiredTiger with LLVM flags -Supply the \c --enable-llvm flag to your configuration to build anything with a +Supply the \c -DENABLE_LLVM flag to your configuration to build anything with a dependency to LLVM. @code -$ ../configure --enable-llvm +$ cd build +$ cmake -DENABLE_LLVM=1 -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/clang.cmake -DCLANG_C_VERSION="8" -DCLANG_CXX_VERSION="8" ../. +$ make @endcode Take care NOT to customize \c CC or \c CXX. Customizing either of these @@ -123,14 +118,7 @@ variables will cause C++ programs such as \c workgen or \c xray_to_optrack to be skipped since we can't reliably link object files emitted by C and C++ compilers unless they are the system's default \c cc and \c c++. -## Step 4: Build as usual - -@code -$ cd build_posix -$ make -@endcode - -## Step 5: Process the traces +## Step 4: Process the traces To process the traces, use the \c xray_to_optrack tool in the \c tools/xray_to_optrack directory. diff --git a/src/third_party/wiredtiger/test/bloom/Makefile.am b/src/third_party/wiredtiger/test/bloom/Makefile.am deleted file mode 100644 index 31c585dbb1f..00000000000 --- a/src/third_party/wiredtiger/test/bloom/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -AM_CPPFLAGS +=-I$(top_srcdir)/src/include -AM_CPPFLAGS +=-I$(top_srcdir)/test/utility - -noinst_PROGRAMS = t -t_SOURCES = test_bloom.c - -t_LDADD = $(top_builddir)/test/utility/libtest_util.la -t_LDADD +=$(top_builddir)/libwiredtiger.la -t_LDFLAGS = -static - -# Run this during a "make check" smoke test. -TESTS = $(noinst_PROGRAMS) -LOG_COMPILER = $(TEST_WRAPPER) - -clean-local: - rm -rf WiredTiger* core.* *.core WT_TEST diff --git a/src/third_party/wiredtiger/test/checkpoint/Makefile.am b/src/third_party/wiredtiger/test/checkpoint/Makefile.am deleted file mode 100644 index da7b85ec0b2..00000000000 --- a/src/third_party/wiredtiger/test/checkpoint/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -AM_CPPFLAGS +=-I$(top_srcdir)/src/include -AM_CPPFLAGS +=-I$(top_srcdir)/test/utility - -noinst_PROGRAMS = t -t_SOURCES = checkpointer.c workers.c test_checkpoint.c - -t_LDADD = $(top_builddir)/test/utility/libtest_util.la -t_LDADD +=$(top_builddir)/libwiredtiger.la -t_LDFLAGS = -static - -TESTS = smoke.sh - -clean-local: - rm -rf WT_TEST core.* *.core diff --git a/src/third_party/wiredtiger/test/cppsuite/Makefile.am b/src/third_party/wiredtiger/test/cppsuite/Makefile.am deleted file mode 100644 index 31c9e0797a9..00000000000 --- a/src/third_party/wiredtiger/test/cppsuite/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -AM_CPPFLAGS = -std='c++11' -I$(top_builddir) -I$(top_srcdir)/src/include \ - -I$(top_srcdir)/test/utility -I$(top_srcdir)/test/cppsuite -LDADD = $(top_builddir)/test/utility/libtest_util.la \ - $(top_builddir)/libwiredtiger.la -AM_LDFLAGS = -static - -# Copy across the default configuration files with the artifacts. -all: - rsync -rup $(top_srcdir)/test/cppsuite/configs $(top_builddir)/test/cppsuite - -all_TESTS= -noinst_PROGRAMS= - -test_harness = test_harness/core/component.cxx \ - test_harness/core/configuration.cxx \ - test_harness/core/throttle.cxx \ - test_harness/util/api_const.cxx \ - test_harness/util/logger.cxx \ - test_harness/util/scoped_connection.cxx \ - test_harness/util/scoped_types.cxx \ - test_harness/workload/database_model.cxx \ - test_harness/workload/database_operation.cxx \ - test_harness/workload/random_generator.cxx \ - test_harness/workload/thread_context.cxx \ - test_harness/workload/workload_tracking.cxx \ - test_harness/workload/workload_validation.cxx \ - test_harness/checkpoint_manager.cxx \ - test_harness/connection_manager.cxx \ - test_harness/runtime_monitor.cxx \ - test_harness/test.cxx \ - test_harness/thread_manager.cxx \ - test_harness/timestamp_manager.cxx \ - test_harness/workload_generator.cxx - -# If you prefer to not use the run binary you can add a test via this -# mechanism but it is generally frowned upon. -csuite_style_example_test_SOURCES = $(test_harness) tests/csuite_style_example_test.cxx -noinst_PROGRAMS += csuite_style_example_test -all_TESTS += csuite_style_example_test - -run_SOURCES = $(test_harness) tests/run.cxx -noinst_PROGRAMS += run -all_TESTS += run - -# Run this during a "make check" smoke test. -TESTS = $(all_TESTS) - -clean-local: - rm -rf WT_TEST.* core.* *.core diff --git a/src/third_party/wiredtiger/test/csuite/Makefile.am b/src/third_party/wiredtiger/test/csuite/Makefile.am deleted file mode 100644 index 937f58f3255..00000000000 --- a/src/third_party/wiredtiger/test/csuite/Makefile.am +++ /dev/null @@ -1,175 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include \ - -I$(top_srcdir)/test/utility -LDADD = $(top_builddir)/test/utility/libtest_util.la \ - $(top_builddir)/libwiredtiger.la -AM_LDFLAGS = -static - -all_TESTS= -noinst_PROGRAMS= - -test_incr_backup_SOURCES = incr_backup/main.c -noinst_PROGRAMS += test_incr_backup -all_TESTS += incr_backup/smoke.sh - -test_random_abort_SOURCES = random_abort/main.c -noinst_PROGRAMS += test_random_abort -all_TESTS += random_abort/smoke.sh - -test_random_directio_SOURCES = random_directio/main.c random_directio/util.c -noinst_PROGRAMS += test_random_directio -all_TESTS += random_directio/smoke.sh - -test_rwlock_SOURCES = rwlock/main.c -noinst_PROGRAMS += test_rwlock -all_TESTS += test_rwlock - -test_schema_abort_SOURCES = schema_abort/main.c -noinst_PROGRAMS += test_schema_abort -all_TESTS += schema_abort/smoke.sh - -test_scope_SOURCES = scope/main.c -noinst_PROGRAMS += test_scope -all_TESTS += test_scope - -test_tiered_abort_SOURCES = tiered_abort/main.c -noinst_PROGRAMS += test_tiered_abort -all_TESTS += tiered_abort/smoke.sh - -test_timestamp_abort_SOURCES = timestamp_abort/main.c -noinst_PROGRAMS += test_timestamp_abort -all_TESTS += timestamp_abort/smoke.sh - -test_truncated_log_SOURCES = truncated_log/main.c -noinst_PROGRAMS += test_truncated_log -all_TESTS += truncated_log/smoke.sh - -test_wt1965_col_efficiency_SOURCES = wt1965_col_efficiency/main.c -noinst_PROGRAMS += test_wt1965_col_efficiency -all_TESTS += test_wt1965_col_efficiency - -test_wt2403_lsm_workload_SOURCES = wt2403_lsm_workload/main.c -noinst_PROGRAMS += test_wt2403_lsm_workload -all_TESTS += test_wt2403_lsm_workload - -test_wt2246_col_append_SOURCES = wt2246_col_append/main.c -noinst_PROGRAMS += test_wt2246_col_append -all_TESTS += test_wt2246_col_append - -test_wt2323_join_visibility_SOURCES = wt2323_join_visibility/main.c -noinst_PROGRAMS += test_wt2323_join_visibility -all_TESTS += test_wt2323_join_visibility - -test_wt2535_insert_race_SOURCES = wt2535_insert_race/main.c -noinst_PROGRAMS += test_wt2535_insert_race -all_TESTS += wt2535_insert_race/smoke.sh - -test_wt2447_join_main_table_SOURCES = wt2447_join_main_table/main.c -noinst_PROGRAMS += test_wt2447_join_main_table -all_TESTS += wt2447_join_main_table/smoke.sh - -test_wt2695_checksum_SOURCES = wt2695_checksum/main.c -noinst_PROGRAMS += test_wt2695_checksum -all_TESTS += test_wt2695_checksum - -test_wt2592_join_schema_SOURCES = wt2592_join_schema/main.c -noinst_PROGRAMS += test_wt2592_join_schema -all_TESTS += test_wt2592_join_schema - -test_wt2719_reconfig_SOURCES = wt2719_reconfig/main.c -noinst_PROGRAMS += test_wt2719_reconfig -all_TESTS += test_wt2719_reconfig - -test_wt2834_join_bloom_fix_SOURCES = wt2834_join_bloom_fix/main.c -noinst_PROGRAMS += test_wt2834_join_bloom_fix -all_TESTS += test_wt2834_join_bloom_fix - -test_wt2853_perf_SOURCES = wt2853_perf/main.c -noinst_PROGRAMS += test_wt2853_perf -all_TESTS += wt2853_perf/smoke.sh - -test_wt2909_checkpoint_integrity_SOURCES = wt2909_checkpoint_integrity/main.c -noinst_PROGRAMS += test_wt2909_checkpoint_integrity -all_TESTS += wt2909_checkpoint_integrity/smoke.sh - -test_wt2999_join_extractor_SOURCES = wt2999_join_extractor/main.c -noinst_PROGRAMS += test_wt2999_join_extractor -all_TESTS += test_wt2999_join_extractor - -test_wt3120_filesys_SOURCES = wt3120_filesys/main.c -noinst_PROGRAMS += test_wt3120_filesys -all_TESTS += test_wt3120_filesys - -test_wt3135_search_near_collator_SOURCES = wt3135_search_near_collator/main.c -noinst_PROGRAMS += test_wt3135_search_near_collator -all_TESTS += test_wt3135_search_near_collator - -test_wt3184_dup_index_collator_SOURCES = wt3184_dup_index_collator/main.c -noinst_PROGRAMS += test_wt3184_dup_index_collator -all_TESTS += test_wt3184_dup_index_collator - -test_wt3338_partial_update_SOURCES = wt3338_partial_update/main.c -noinst_PROGRAMS += test_wt3338_partial_update -all_TESTS += test_wt3338_partial_update - -test_wt3363_checkpoint_op_races_SOURCES = wt3363_checkpoint_op_races/main.c -noinst_PROGRAMS += test_wt3363_checkpoint_op_races -all_TESTS += test_wt3363_checkpoint_op_races - -test_wt3874_pad_byte_collator_SOURCES = wt3874_pad_byte_collator/main.c -noinst_PROGRAMS += test_wt3874_pad_byte_collator -all_TESTS += test_wt3874_pad_byte_collator - -test_wt4105_large_doc_small_upd_SOURCES = wt4105_large_doc_small_upd/main.c -noinst_PROGRAMS += test_wt4105_large_doc_small_upd -all_TESTS += wt4105_large_doc_small_upd/smoke.sh - -test_wt4117_checksum_SOURCES = wt4117_checksum/main.c -noinst_PROGRAMS += test_wt4117_checksum -all_TESTS += test_wt4117_checksum - -test_wt4156_metadata_salvage_SOURCES = wt4156_metadata_salvage/main.c -noinst_PROGRAMS += test_wt4156_metadata_salvage -all_TESTS += test_wt4156_metadata_salvage - -test_wt4333_handle_locks_SOURCES = wt4333_handle_locks/main.c -noinst_PROGRAMS += test_wt4333_handle_locks -all_TESTS += test_wt4333_handle_locks - -test_wt4699_json_SOURCES = wt4699_json/main.c -noinst_PROGRAMS += test_wt4699_json -all_TESTS += test_wt4699_json - -test_wt4803_history_store_abort_SOURCES = wt4803_history_store_abort/main.c -noinst_PROGRAMS += test_wt4803_history_store_abort -all_TESTS += test_wt4803_history_store_abort - -test_wt4891_meta_ckptlist_get_alloc_SOURCES=wt4891_meta_ckptlist_get_alloc/main.c -noinst_PROGRAMS += test_wt4891_meta_ckptlist_get_alloc -all_TESTS += test_wt4891_meta_ckptlist_get_alloc - -test_wt6185_modify_ts_SOURCES = wt6185_modify_ts/main.c -noinst_PROGRAMS += test_wt6185_modify_ts -all_TESTS += wt6185_modify_ts/smoke.sh - -test_wt6616_checkpoint_oldest_ts_SOURCES = wt6616_checkpoint_oldest_ts/main.c -noinst_PROGRAMS += test_wt6616_checkpoint_oldest_ts -all_TESTS += wt6616_checkpoint_oldest_ts/smoke.sh - -test_wt7989_compact_checkpoint_SOURCES = wt7989_compact_checkpoint/main.c -noinst_PROGRAMS += test_wt7989_compact_checkpoint -all_TESTS += test_wt7989_compact_checkpoint - -test_wt8057_compact_stress_SOURCES = wt8057_compact_stress/main.c -noinst_PROGRAMS += test_wt8057_compact_stress -all_TESTS += test_wt8057_compact_stress - -test_wt8246_compact_rts_data_correctness_SOURCES = wt8246_compact_rts_data_correctness/main.c -noinst_PROGRAMS += test_wt8246_compact_rts_data_correctness -all_TESTS += test_wt8246_compact_rts_data_correctness - -# Run this during a "make check" smoke test. -TESTS = $(all_TESTS) -LOG_COMPILER = env top_builddir=$(top_builddir) top_srcdir=$(top_srcdir) $(TEST_WRAPPER) - -clean-local: - rm -rf WT_TEST.* core.* *.core diff --git a/src/third_party/wiredtiger/test/csuite/incr_backup/smoke.sh b/src/third_party/wiredtiger/test/csuite/incr_backup/smoke.sh index 7816a4ec70b..a465761b021 100755 --- a/src/third_party/wiredtiger/test/csuite/incr_backup/smoke.sh +++ b/src/third_party/wiredtiger/test/csuite/incr_backup/smoke.sh @@ -7,12 +7,15 @@ set -e if [ -n "$1" ] then # If the test binary is passed in manually. - $TEST_WRAPPER $1 -v 3 + test_bin=$1 else - # If $top_builddir/$top_srcdir aren't set, default to building in build_posix - # and running in test/csuite. - top_builddir=${top_builddir:-../../build_posix} - top_srcdir=${top_srcdir:-../..} - - $TEST_WRAPPER $top_builddir/test/csuite/test_incr_backup -v 3 + # If $binary_dir isn't set, default to using the build directory + # this script resides under. Our CMake build will sync a copy of this + # script to the build directory. Note this assumes we are executing a + # copy of the script that lives under the build directory. Otherwise + # passing the binary path is required. + binary_dir=${binary_dir:-`dirname $0`} + test_bin=$binary_dir/test_incr_backup fi + +$TEST_WRAPPER $test_bin -v 3 diff --git a/src/third_party/wiredtiger/test/csuite/random_abort/smoke.sh b/src/third_party/wiredtiger/test/csuite/random_abort/smoke.sh index bfa8656f6b1..aa3a629bd70 100755 --- a/src/third_party/wiredtiger/test/csuite/random_abort/smoke.sh +++ b/src/third_party/wiredtiger/test/csuite/random_abort/smoke.sh @@ -9,11 +9,13 @@ then # If the test binary is passed in manually. test_bin=$1 else - # If $top_builddir/$top_srcdir aren't set, default to building in build_posix - # and running in test/csuite. - top_builddir=${top_builddir:-../../build_posix} - top_srcdir=${top_srcdir:-../..} - test_bin=$top_builddir/test/csuite/test_random_abort + # If $binary_dir isn't set, default to using the build directory + # this script resides under. Our CMake build will sync a copy of this + # script to the build directory. Note this assumes we are executing a + # copy of the script that lives under the build directory. Otherwise + # passing the binary path is required. + binary_dir=${binary_dir:-`dirname $0`} + test_bin=$binary_dir/test_random_abort fi $TEST_WRAPPER $test_bin -t 10 -T 5 $TEST_WRAPPER $test_bin -m -t 10 -T 5 diff --git a/src/third_party/wiredtiger/test/csuite/random_directio/smoke.sh b/src/third_party/wiredtiger/test/csuite/random_directio/smoke.sh index 9c7c043beb0..f8420b77ae4 100755 --- a/src/third_party/wiredtiger/test/csuite/random_directio/smoke.sh +++ b/src/third_party/wiredtiger/test/csuite/random_directio/smoke.sh @@ -4,16 +4,18 @@ set -e # Smoke-test random_directio as part of running "make check". -# If $top_builddir/$top_srcdir aren't set, default to building in build_posix -# and running in test/csuite. -top_builddir=${top_builddir:-../../build_posix} -top_srcdir=${top_srcdir:-../..} +# If $binary_dir isn't set, default to using the build directory +# this script resides under. Our CMake build will sync a copy of this +# script to the build directory. Note this assumes we are executing a +# copy of the script that lives under the build directory. Otherwise +# passing the binary path is required. +binary_dir=${binary_dir:-`dirname $0`} if [ -n "$1" ] then RUN_TEST_CMD="$TEST_WRAPPER $1" else - RUN_TEST_CMD="$TEST_WRAPPER $top_builddir/test/csuite/test_random_directio" + RUN_TEST_CMD="$TEST_WRAPPER $binary_dir/test_random_directio" fi # Replace for more complete testing #TEST_THREADS="1 5 10" diff --git a/src/third_party/wiredtiger/test/csuite/schema_abort/smoke.sh b/src/third_party/wiredtiger/test/csuite/schema_abort/smoke.sh index bed880271d6..84702d5111e 100755 --- a/src/third_party/wiredtiger/test/csuite/schema_abort/smoke.sh +++ b/src/third_party/wiredtiger/test/csuite/schema_abort/smoke.sh @@ -10,11 +10,13 @@ then # If the test binary is passed in manually. test_bin=$1 else - # If $top_builddir/$top_srcdir aren't set, default to building in build_posix - # and running in test/csuite. - top_builddir=${top_builddir:-../../build_posix} - top_srcdir=${top_srcdir:-../..} - test_bin=$top_builddir/test/csuite/test_schema_abort + # If $binary_dir isn't set, default to using the build directory + # this script resides under. Our CMake build will sync a copy of this + # script to the build directory. Note this assumes we are executing a + # copy of the script that lives under the build directory. Otherwise + # passing the binary path is required. + binary_dir=${binary_dir:-`dirname $0`} + test_bin=$binary_dir/test_schema_abort fi $TEST_WRAPPER $test_bin -t 10 -T 5 diff --git a/src/third_party/wiredtiger/test/csuite/tiered_abort/smoke.sh b/src/third_party/wiredtiger/test/csuite/tiered_abort/smoke.sh index 98431781c2f..3faeff5217f 100755 --- a/src/third_party/wiredtiger/test/csuite/tiered_abort/smoke.sh +++ b/src/third_party/wiredtiger/test/csuite/tiered_abort/smoke.sh @@ -12,10 +12,12 @@ then # If the test binary is passed in manually. test_bin=$1 else - # If $top_builddir/$top_srcdir aren't set, default to building in build_posix - # and running in test/csuite. - top_builddir=${top_builddir:-../../build_posix} - top_srcdir=${top_srcdir:-../..} - test_bin=$top_builddir/test/csuite/test_tiered_abort + # If $binary_dir isn't set, default to using the build directory + # this script resides under. Our CMake build will sync a copy of this + # script to the build directory. Note this assumes we are executing a + # copy of the script that lives under the build directory. Otherwise + # passing the binary path is required. + binary_dir=${binary_dir:-`dirname $0`} + test_bin=$binary_dir/test_tiered_abort fi $TEST_WRAPPER $test_bin -t 10 -T 5 diff --git a/src/third_party/wiredtiger/test/csuite/time_shift_test.sh b/src/third_party/wiredtiger/test/csuite/time_shift_test.sh index 6d92afe426a..3c32abde67f 100755 --- a/src/third_party/wiredtiger/test/csuite/time_shift_test.sh +++ b/src/third_party/wiredtiger/test/csuite/time_shift_test.sh @@ -43,7 +43,15 @@ then fi # Locate Wiredtiger home directory. -: ${RW_LOCK_FILE:=$(git rev-parse --show-toplevel)/build_posix/test/csuite/test_rwlock} +# If RW_LOCK_FILE isn't set, default to using the build directory this script resides under +# under. Our CMake build will sync a copy of this script to the build directory the 'test_rwlock' +# binary is created under. Note this assumes we are executing a copy of the script that lives under +# the build directory. Otherwise passing the binary path is required. +: ${RW_LOCK_FILE:=$(dirname $0)/test_rwlock} +[ -x ${RW_LOCK_FILE} ] || { + echo "fail: unable to locate rwlock test binary" + exit 1 +} SEC1=`date +%s` if [ "$RUN_OS" = "Darwin" ] diff --git a/src/third_party/wiredtiger/test/csuite/timestamp_abort/smoke.sh b/src/third_party/wiredtiger/test/csuite/timestamp_abort/smoke.sh index b2c70340f4c..ac77db804a6 100755 --- a/src/third_party/wiredtiger/test/csuite/timestamp_abort/smoke.sh +++ b/src/third_party/wiredtiger/test/csuite/timestamp_abort/smoke.sh @@ -15,11 +15,13 @@ done if [ -z "$test_bin" ] then - # If $top_builddir/$top_srcdir aren't set, default to building in build_posix - # and running in test/csuite. - top_builddir=${top_builddir:-../../build_posix} - top_srcdir=${top_srcdir:-../..} - test_bin=$top_builddir/test/csuite/test_timestamp_abort + # If $binary_dir isn't set, default to using the build directory + # this script resides under. Our CMake build will sync a copy of this + # script to the build directory. Note this assumes we are executing a + # copy of the script that lives under the build directory. Otherwise + # passing the binary path is required. + binary_dir=${binary_dir:-`dirname $0`} + test_bin=$binary_dir/test_timestamp_abort fi $TEST_WRAPPER $test_bin $default_test_args diff --git a/src/third_party/wiredtiger/test/csuite/truncated_log/smoke.sh b/src/third_party/wiredtiger/test/csuite/truncated_log/smoke.sh index 0079adf0340..fd17597768b 100755 --- a/src/third_party/wiredtiger/test/csuite/truncated_log/smoke.sh +++ b/src/third_party/wiredtiger/test/csuite/truncated_log/smoke.sh @@ -9,12 +9,14 @@ then # If the test binary is passed in manually. test_bin=$1 else - # If $top_builddir/$top_srcdir aren't set, default to building in build_posix - # and running in test/csuite. - top_builddir=${top_builddir:-../../build_posix} - top_srcdir=${top_srcdir:-../..} - test_bin=$top_builddir/test/csuite/test_truncated_log + # If $binary_dir isn't set, default to using the build directory + # this script resides under. Our CMake build will sync a copy of this + # script to the build directory. Note this assumes we are executing a + # copy of the script that lives under the build directory. Otherwise + # passing the binary path is required. + binary_dir=${binary_dir:-`dirname $0`} + test_bin=$binary_dir/test_truncated_log fi -$TEST_WRAPPER $test_bin +$TEST_WRAPPER $test_bin $TEST_WRAPPER $test_bin -c diff --git a/src/third_party/wiredtiger/test/csuite/wt2447_join_main_table/smoke.sh b/src/third_party/wiredtiger/test/csuite/wt2447_join_main_table/smoke.sh index c57694807ac..4aecdc7ebda 100755 --- a/src/third_party/wiredtiger/test/csuite/wt2447_join_main_table/smoke.sh +++ b/src/third_party/wiredtiger/test/csuite/wt2447_join_main_table/smoke.sh @@ -9,11 +9,13 @@ then # If the test binary is passed in manually. test_bin=$1 else - # If $top_builddir/$top_srcdir aren't set, default to building in build_posix - # and running in test/csuite. - top_builddir=${top_builddir:-../../build_posix} - top_srcdir=${top_srcdir:-../..} - test_bin=$top_builddir/test/csuite/test_wt2447_join_main_table + # If $binary_dir isn't set, default to using the build directory + # this script resides under. Our CMake build will sync a copy of this + # script to the build directory. Note this assumes we are executing a + # copy of the script that lives under the build directory. Otherwise + # passing the binary path is required. + binary_dir=${binary_dir:-`dirname $0`} + test_bin=$binary_dir/test_wt2447_join_main_table fi $TEST_WRAPPER $test_bin -t r diff --git a/src/third_party/wiredtiger/test/csuite/wt2535_insert_race/smoke.sh b/src/third_party/wiredtiger/test/csuite/wt2535_insert_race/smoke.sh index 9db537df92b..914fceaa1cb 100755 --- a/src/third_party/wiredtiger/test/csuite/wt2535_insert_race/smoke.sh +++ b/src/third_party/wiredtiger/test/csuite/wt2535_insert_race/smoke.sh @@ -9,11 +9,13 @@ then # If the test binary is passed in manually. test_bin=$1 else - # If $top_builddir/$top_srcdir aren't set, default to building in build_posix - # and running in test/csuite. - top_builddir=${top_builddir:-../../build_posix} - top_srcdir=${top_srcdir:-../..} - test_bin=$top_builddir/test/csuite/test_wt2535_insert_race + # If $binary_dir isn't set, default to using the build directory + # this script resides under. Our CMake build will sync a copy of this + # script to the build directory. Note this assumes we are executing a + # copy of the script that lives under the build directory. Otherwise + # passing the binary path is required. + binary_dir=${binary_dir:-`dirname $0`} + test_bin=$binary_dir/test_wt2535_insert_race fi $TEST_WRAPPER $test_bin -t r diff --git a/src/third_party/wiredtiger/test/csuite/wt2853_perf/smoke.sh b/src/third_party/wiredtiger/test/csuite/wt2853_perf/smoke.sh index d2351082329..6dcc4497d14 100755 --- a/src/third_party/wiredtiger/test/csuite/wt2853_perf/smoke.sh +++ b/src/third_party/wiredtiger/test/csuite/wt2853_perf/smoke.sh @@ -9,11 +9,13 @@ then # If the test binary is passed in manually. test_bin=$1 else - # If $top_builddir/$top_srcdir aren't set, default to building in build_posix - # and running in test/csuite. - top_builddir=${top_builddir:-../../build_posix} - top_srcdir=${top_srcdir:-../..} - test_bin=$top_builddir/test/csuite/test_wt2853_perf + # If $binary_dir isn't set, default to using the build directory + # this script resides under. Our CMake build will sync a copy of this + # script to the build directory. Note this assumes we are executing a + # copy of the script that lives under the build directory. Otherwise + # passing the binary path is required. + binary_dir=${binary_dir:-`dirname $0`} + test_bin=$binary_dir/test_wt2853_perf fi $TEST_WRAPPER $test_bin -t r diff --git a/src/third_party/wiredtiger/test/csuite/wt2909_checkpoint_integrity/smoke.sh b/src/third_party/wiredtiger/test/csuite/wt2909_checkpoint_integrity/smoke.sh index e7c8f15f5a6..23b66d19864 100755 --- a/src/third_party/wiredtiger/test/csuite/wt2909_checkpoint_integrity/smoke.sh +++ b/src/third_party/wiredtiger/test/csuite/wt2909_checkpoint_integrity/smoke.sh @@ -18,11 +18,13 @@ then # If the test binary is passed in manually. test_bin=$1 else - # If $top_builddir/$top_srcdir aren't set, default to building in build_posix - # and running in test/csuite. - top_builddir=${top_builddir:-../../build_posix} - top_srcdir=${top_srcdir:-../..} - test_bin=$top_builddir/test/csuite/test_wt2909_checkpoint_integrity + # If $binary_dir isn't set, default to using the build directory + # this script resides under. Our CMake build will sync a copy of this + # script to the build directory. Note this assumes we are executing a + # copy of the script that lives under the build directory. Otherwise + # passing the binary path is required. + binary_dir=${binary_dir:-`dirname $0`} + test_bin=$binary_dir/test_wt2909_checkpoint_integrity fi $TEST_WRAPPER $test_bin $builddir_arg -t r diff --git a/src/third_party/wiredtiger/test/csuite/wt4105_large_doc_small_upd/smoke.sh b/src/third_party/wiredtiger/test/csuite/wt4105_large_doc_small_upd/smoke.sh index e8cfe61081f..fadd4559151 100755 --- a/src/third_party/wiredtiger/test/csuite/wt4105_large_doc_small_upd/smoke.sh +++ b/src/third_party/wiredtiger/test/csuite/wt4105_large_doc_small_upd/smoke.sh @@ -9,11 +9,13 @@ then # If the test binary is passed in manually. test_bin=$1 else - # If $top_builddir/$top_srcdir aren't set, default to building in build_posix - # and running in test/csuite. - top_builddir=${top_builddir:-../../build_posix} - top_srcdir=${top_srcdir:-../..} - test_bin=$top_builddir/test/csuite/test_wt4105_large_doc_small_upd + # If $binary_dir isn't set, default to using the build directory + # this script resides under. Our CMake build will sync a copy of this + # script to the build directory. Note this assumes we are executing a + # copy of the script that lives under the build directory. Otherwise + # passing the binary path is required. + binary_dir=${binary_dir:-`dirname $0`} + test_bin=$binary_dir/test_wt4105_large_doc_small_upd fi $TEST_WRAPPER $test_bin -t r diff --git a/src/third_party/wiredtiger/test/csuite/wt6185_modify_ts/smoke.sh b/src/third_party/wiredtiger/test/csuite/wt6185_modify_ts/smoke.sh index b317eeeb2ed..92b540ba3b4 100755 --- a/src/third_party/wiredtiger/test/csuite/wt6185_modify_ts/smoke.sh +++ b/src/third_party/wiredtiger/test/csuite/wt6185_modify_ts/smoke.sh @@ -9,13 +9,15 @@ then # If the test binary is passed in manually. test_bin=$1 else - # If $top_builddir/$top_srcdir aren't set, default to building in build_posix - # and running in test/csuite. - top_builddir=${top_builddir:-../../build_posix} - top_srcdir=${top_srcdir:-../..} - test_bin=$top_builddir/test/csuite/test_wt6185_modify_ts + # If $binary_dir isn't set, default to using the build directory + # this script resides under. Our CMake build will sync a copy of this + # script to the build directory. Note this assumes we are executing a + # copy of the script that lives under the build directory. Otherwise + # passing the binary path is required. + binary_dir=${binary_dir:-`dirname $0`} + test_bin=$binary_dir/test_wt6185_modify_ts fi -$TEST_WRAPPER $test_bin +$TEST_WRAPPER $test_bin $TEST_WRAPPER $test_bin -C diff --git a/src/third_party/wiredtiger/test/csuite/wt6616_checkpoint_oldest_ts/smoke.sh b/src/third_party/wiredtiger/test/csuite/wt6616_checkpoint_oldest_ts/smoke.sh index 9b9cc997026..85743e0abbd 100755 --- a/src/third_party/wiredtiger/test/csuite/wt6616_checkpoint_oldest_ts/smoke.sh +++ b/src/third_party/wiredtiger/test/csuite/wt6616_checkpoint_oldest_ts/smoke.sh @@ -9,13 +9,15 @@ then # If the test binary is passed in manually. test_bin=$1 else - # If $top_builddir/$top_srcdir aren't set, default to building in build_posix - # and running in test/csuite. - top_builddir=${top_builddir:-../../build_posix} - top_srcdir=${top_srcdir:-../..} - test_bin=$top_builddir/test/csuite/test_wt6616_checkpoint_oldest_ts + # If $binary_dir isn't set, default to using the build directory + # this script resides under. Our CMake build will sync a copy of this + # script to the build directory. Note this assumes we are executing a + # copy of the script that lives under the build directory. Otherwise + # passing the binary path is required. + binary_dir=${binary_dir:-`dirname $0`} + test_bin=$binary_dir/test_wt6616_checkpoint_oldest_ts fi -$TEST_WRAPPER $test_bin +$TEST_WRAPPER $test_bin $TEST_WRAPPER $test_bin -c diff --git a/src/third_party/wiredtiger/test/ctest_helpers.cmake b/src/third_party/wiredtiger/test/ctest_helpers.cmake index 23b00f9305e..65ca76d6404 100644 --- a/src/third_party/wiredtiger/test/ctest_helpers.cmake +++ b/src/third_party/wiredtiger/test/ctest_helpers.cmake @@ -190,7 +190,7 @@ function(define_c_test) "C_TEST" "" "TARGET;DIR_NAME;DEPENDS;EXEC_SCRIPT" - "SOURCES;FLAGS;ARGUMENTS;VARIANTS" + "SOURCES;FLAGS;ARGUMENTS;VARIANTS;ADDITIONAL_FILES" ) if (NOT "${C_TEST_UNPARSED_ARGUMENTS}" STREQUAL "") message(FATAL_ERROR "Unknown arguments to define_c_test: ${C_TEST_UNPARSED_ARGUMENTS}") @@ -213,9 +213,13 @@ function(define_c_test) eval_dependency("${C_TEST_DEPENDS}" enabled) if(enabled) set(additional_executable_args) + set(additional_file_args) if(NOT "${C_TEST_FLAGS}" STREQUAL "") list(APPEND additional_executable_args FLAGS ${C_TEST_FLAGS}) endif() + if(NOT "${C_TEST_ADDITIONAL_FILES}" STREQUAL "") + list(APPEND additional_file_args ${C_TEST_ADDITIONAL_FILES}) + endif() set(exec_wrapper) if(WT_WIN) # This is a workaround to run our csuite tests under Windows using CTest. When executing a test, @@ -225,10 +229,11 @@ function(define_c_test) endif() set(test_cmd) if (C_TEST_EXEC_SCRIPT) + list(APPEND additional_file_args ${C_TEST_EXEC_SCRIPT}) # Define the c test to be executed with a script, rather than invoking the binary directly. create_test_executable(${C_TEST_TARGET} SOURCES ${C_TEST_SOURCES} - ADDITIONAL_FILES ${C_TEST_EXEC_SCRIPT} + ADDITIONAL_FILES ${additional_file_args} BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${C_TEST_DIR_NAME} ${additional_executable_args} ) @@ -237,6 +242,7 @@ function(define_c_test) else() create_test_executable(${C_TEST_TARGET} SOURCES ${C_TEST_SOURCES} + ADDITIONAL_FILES ${additional_file_args} BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${C_TEST_DIR_NAME} ${additional_executable_args} ) diff --git a/src/third_party/wiredtiger/test/cursor_order/Makefile.am b/src/third_party/wiredtiger/test/cursor_order/Makefile.am deleted file mode 100644 index 448f8f95772..00000000000 --- a/src/third_party/wiredtiger/test/cursor_order/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -AM_CPPFLAGS +=-I$(top_srcdir)/src/include -AM_CPPFLAGS +=-I$(top_srcdir)/test/utility - -noinst_PROGRAMS = cursor_order -cursor_order_SOURCES = cursor_order_file.c cursor_order_ops.c cursor_order.c - -cursor_order_LDADD = $(top_builddir)/test/utility/libtest_util.la -cursor_order_LDADD +=$(top_builddir)/libwiredtiger.la -cursor_order_LDFLAGS = -static - -TESTS = smoke.sh - -clean-local: - rm -rf WT_TEST core.* *.core diff --git a/src/third_party/wiredtiger/test/evergreen.yml b/src/third_party/wiredtiger/test/evergreen.yml index dd8464ac049..99488cbfd5b 100755 --- a/src/third_party/wiredtiger/test/evergreen.yml +++ b/src/third_party/wiredtiger/test/evergreen.yml @@ -1694,7 +1694,7 @@ tasks: set -o errexit set -o verbose - ${test_env_vars|} WTPERF_DIR=$(pwd) ${python_binary|python3} ../../../test/wtperf/test_conf_dump.py 2>&1 + ${test_env_vars|} ${python_binary|python3} ../../../test/wtperf/test_conf_dump.py -d $(pwd) 2>&1 - name: fops tags: ["pull_request"] diff --git a/src/third_party/wiredtiger/test/evergreen/evg_cfg.py b/src/third_party/wiredtiger/test/evergreen/evg_cfg.py index e966ce0d69e..7fc4eea5530 100755 --- a/src/third_party/wiredtiger/test/evergreen/evg_cfg.py +++ b/src/third_party/wiredtiger/test/evergreen/evg_cfg.py @@ -30,7 +30,10 @@ CSUITE_TEST_SEARCH_STR = " # End of csuite test tasks" # They are not expected to trigger any 'make check' testing. make_check_subdir_skips = [ "test/csuite", # csuite has its own set of Evergreen tasks, skip the checking here - "test/cppsuite" + "test/cppsuite", + "test/fuzz", + "test/syscall", + "ext/storage_sources/s3_store/test" ] prog=sys.argv[0] @@ -132,22 +135,23 @@ def find_tests_missing_evg_cfg(test_type, dirs, evg_cfg_file): def get_make_check_dirs(): """ Figure out the 'make check' directories that are applicable for testing - Directories with Makefile.am containing 'TESTS =' are the ones require test. + Directories with CMakeLists.txt containing ctest declaration ('add_test', + 'define_c_test', 'define_test_variants') are the ones require test. Skip a few known directories that do not require test or covered separately. """ # Make sure we are under the repo top level directory os.chdir(run('git rev-parse --show-toplevel')) - # Search keyword in Makefile.am to identify directories that involve test configuration. + # Search keyword in CMakeLists.txt to identify directories that involve test configuration. # Need to use subprocess 'shell=True' to get the expected shell command output. - cmd = "find . -name Makefile.am -exec grep -H -e '^TESTS =' {} \; | cut -d: -f1 | cut -c3-" + cmd = "find . -name CMakeLists.txt -exec grep -H -e '\(add_test\|define_c_test|define_test_variants\)' {} \; | cut -d: -f1 | cut -c3- | uniq" p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True) mkfiles_with_tests = p.stdout.readlines() # Need some string manipulation work here against the subprocess output. # Cast elements to string, and strip the ending from the string to get directory names. - ending = '/Makefile.am\n' + ending = '/CMakeLists.txt\n' dirs_with_tests = [d.decode('utf-8')[:-len(ending)] for d in mkfiles_with_tests] debug("dirs_with_tests: %s" % dirs_with_tests) diff --git a/src/third_party/wiredtiger/test/fops/Makefile.am b/src/third_party/wiredtiger/test/fops/Makefile.am deleted file mode 100644 index 519f6315445..00000000000 --- a/src/third_party/wiredtiger/test/fops/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -AM_CPPFLAGS +=-I$(top_srcdir)/src/include -AM_CPPFLAGS +=-I$(top_srcdir)/test/utility - -noinst_PROGRAMS = t - -t_SOURCES = thread.h file.c fops.c t.c - -t_LDADD = $(top_builddir)/test/utility/libtest_util.la -t_LDADD +=$(top_builddir)/libwiredtiger.la -t_LDFLAGS = -static - -# Run this during a "make check" smoke test. -TESTS = $(noinst_PROGRAMS) -LOG_COMPILER = $(TEST_WRAPPER) - -clean-local: - rm -rf WT_TEST core.* *.core diff --git a/src/third_party/wiredtiger/test/format/Makefile.am b/src/third_party/wiredtiger/test/format/Makefile.am deleted file mode 100644 index 8897feee112..00000000000 --- a/src/third_party/wiredtiger/test/format/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -AM_CPPFLAGS +=-I$(top_srcdir)/src/include -AM_CPPFLAGS +=-I$(top_srcdir)/test/utility - -noinst_PROGRAMS = t -t_SOURCES =\ - alter.c backup.c bulk.c checkpoint.c compact.c config.c config_compat.c config_def.c hs.c \ - import.c kv.c ops.c random.c salvage.c snap.c t.c trace.c util.c wts.c - -t_LDADD = $(top_builddir)/test/utility/libtest_util.la -t_LDADD +=$(top_builddir)/libwiredtiger.la -t_LDFLAGS = -static - -#noinst_LTLIBRARIES = lzo_compress.la - -# libtool hack: noinst_LTLIBRARIES turns off building shared libraries as well -# as installation, it will only build static libraries. As far as I can tell, -# the "approved" libtool way to turn them back on is by adding -rpath. -#lzo_compress_la_SOURCES = lzo_compress.c -#lzo_compress_la_LIBADD = -llzo2 -lm -#lzo_compress_la_LDFLAGS = -avoid-version -module -rpath /nowhere - -backup: - rm -rf BACKUP && cp -p -r RUNDIR BACKUP -refresh: - rm -rf RUNDIR && cp -p -r BACKUP RUNDIR - -TESTS = smoke.sh - -clean-local: - rm -rf RUNDIR s_dumpcmp core.* *.core diff --git a/src/third_party/wiredtiger/test/format/format.sh b/src/third_party/wiredtiger/test/format/format.sh index 5c8331935ba..f13a1883ab8 100755 --- a/src/third_party/wiredtiger/test/format/format.sh +++ b/src/third_party/wiredtiger/test/format/format.sh @@ -44,6 +44,7 @@ usage() { echo " -a configure format abort/recovery testing (defaults to off)" echo " -b binary format binary (defaults to "./t")" echo " -c config format configuration file (defaults to CONFIG.stress)" + echo " -d directory directory of format binary" echo " -D directory directory of format configuration files (named \"CONFIG.*\")" echo " -E skip known errors (defaults to off)" echo " -e envvar Environment variable setting (default to none)" @@ -107,6 +108,8 @@ quit=0 skip_errors=0 stress_split_test=0 total_jobs=0 +# Default to format.sh directory (assumed to be in a WiredTiger build tree). +format_bin_dir=`dirname $0` while :; do case "$1" in @@ -119,6 +122,9 @@ while :; do -c) config="$2" shift ; shift ;; + -d) + format_bin_dir="$2" + shift ; shift ;; -D) # Format changes directories, get absolute paths to the CONFIG files. dir="$2" @@ -222,7 +228,7 @@ config_found=0 } # Move to the format.sh directory (assumed to be in a WiredTiger build tree). -cd $(dirname $0) || exit 1 +cd $format_bin_dir || exit 1 # If we haven't already found it, check for the config file (by default it's CONFIG.stress which # lives in the same directory of the WiredTiger build tree as format.sh. We're about to change @@ -233,17 +239,14 @@ cd $(dirname $0) || exit 1 config_found=1 } -# Find the last part of format_binary, which is format binary file. Builds are normally in the -# WiredTiger source tree, in which case it's in the same directory as format.sh, else it's in -# the build_posix tree. If the build is in the build_posix tree, move there, we have to run in -# the directory where the format binary lives because the format binary "knows" the wt utility -# is two directory levels above it. -[[ -x ${format_binary##* } ]] || { - build_posix_directory="../../build_posix/test/format" - [[ ! -d $build_posix_directory ]] || cd $build_posix_directory || exit 1 - [[ -x ${format_binary##* } ]] || - fatal_msg "format program \"${format_binary##* }\" not found" -} +# Check for the existence of the format_binary. This script is usually copied by CMake into the +# build directory, in which case we can expect to find the binary in the same directory as +# format.sh (being the default path value assigned to 'format_bin_dir'). If we can't detect the format +# binary, raise an error, as we expect the user to either execute the 'format.sh' script under the +# build directory or by passing the format build directory as an argument. +[[ -x ${format_binary##* } ]] || + fatal_msg "format program \"${format_binary##* }\" not found" + # Find the wt binary (required for abort/recovery testing). wt_binary="../../wt" diff --git a/src/third_party/wiredtiger/test/fuzz/Makefile.am b/src/third_party/wiredtiger/test/fuzz/Makefile.am deleted file mode 100644 index 0d768e17db2..00000000000 --- a/src/third_party/wiredtiger/test/fuzz/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -AM_CPPFLAGS = -fsanitize=fuzzer-no-link -AM_CPPFLAGS += -I$(top_builddir) -AM_CPPFLAGS += -I$(top_srcdir)/src/include -AM_CPPFLAGS += -I$(top_srcdir)/test/fuzz -AM_CPPFLAGS += -I$(top_srcdir)/test/utility - -AM_LDFLAGS = -fsanitize=fuzzer -static - -noinst_LTLIBRARIES = libfuzz_util.la -noinst_PROGRAMS = fuzz_config fuzz_modify - -libfuzz_util_la_SOURCES = fuzz_util.c -libfuzz_util_la_LIBADD = $(top_builddir)/libwiredtiger.la -libfuzz_util_la_LIBADD += $(top_builddir)/test/utility/libtest_util.la - -fuzz_config_SOURCES = config/fuzz_config.c -fuzz_config_LDADD = libfuzz_util.la - -fuzz_modify_SOURCES = modify/fuzz_modify.c -fuzz_modify_LDADD = libfuzz_util.la diff --git a/src/third_party/wiredtiger/test/fuzz/fuzz_run.sh b/src/third_party/wiredtiger/test/fuzz/fuzz_run.sh index b0958ba1679..86a2b8165ea 100644 --- a/src/third_party/wiredtiger/test/fuzz/fuzz_run.sh +++ b/src/third_party/wiredtiger/test/fuzz/fuzz_run.sh @@ -14,7 +14,7 @@ # # If the fuzzer you're running has an existing corpus directory, you may want to run with the corpus # supplied: -# e.g. fuzz_run.sh ../../build_posix/test/fuzz/fuzz_config corpus/ +# e.g. fuzz_run.sh ../../build/test/fuzz/fuzz_config corpus/ # # Output # crash-<input-hash> -- diff --git a/src/third_party/wiredtiger/test/huge/Makefile.am b/src/third_party/wiredtiger/test/huge/Makefile.am deleted file mode 100644 index 402e8efc81e..00000000000 --- a/src/third_party/wiredtiger/test/huge/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -AM_CPPFLAGS +=-I$(top_srcdir)/src/include -AM_CPPFLAGS +=-I$(top_srcdir)/test/utility - -noinst_PROGRAMS = t -t_SOURCES = huge.c - -t_LDADD = $(top_builddir)/test/utility/libtest_util.la -t_LDADD +=$(top_builddir)/libwiredtiger.la -t_LDFLAGS = -static - -# Run this during a "make check" smoke test. -TESTS = smoke.sh - -clean-local: - rm -rf WT_TEST core.* *.core diff --git a/src/third_party/wiredtiger/test/manydbs/Makefile.am b/src/third_party/wiredtiger/test/manydbs/Makefile.am deleted file mode 100644 index 66310350d71..00000000000 --- a/src/third_party/wiredtiger/test/manydbs/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -AM_CPPFLAGS +=-I$(top_srcdir)/src/include -AM_CPPFLAGS +=-I$(top_srcdir)/test/utility - -noinst_PROGRAMS = t -t_SOURCES = manydbs.c - -t_LDADD = $(top_builddir)/test/utility/libtest_util.la -t_LDADD +=$(top_builddir)/libwiredtiger.la -t_LDFLAGS = -static - -# Run this during a "make check" smoke test. -TESTS = $(noinst_PROGRAMS) -LOG_COMPILER = $(TEST_WRAPPER) - -clean-local: - rm -rf WT_TEST core.* *.core diff --git a/src/third_party/wiredtiger/test/packing/Makefile.am b/src/third_party/wiredtiger/test/packing/Makefile.am deleted file mode 100644 index 0f6f59d2cff..00000000000 --- a/src/third_party/wiredtiger/test/packing/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -AM_CPPFLAGS +=-I$(top_srcdir)/src/include -AM_CPPFLAGS +=-I$(top_srcdir)/test/utility - -noinst_PROGRAMS = intpack-test intpack-test2 intpack-test3 packing-test - -LDADD = $(top_builddir)/test/utility/libtest_util.la -LDADD +=$(top_builddir)/libwiredtiger.la -LDFLAGS = -static - -TESTS = smoke.sh - -clean-local: - rm -rf core.* *.core diff --git a/src/third_party/wiredtiger/test/readonly/Makefile.am b/src/third_party/wiredtiger/test/readonly/Makefile.am deleted file mode 100644 index 7dd08586122..00000000000 --- a/src/third_party/wiredtiger/test/readonly/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -AM_CPPFLAGS +=-I$(top_srcdir)/src/include -AM_CPPFLAGS +=-I$(top_srcdir)/test/utility - -noinst_PROGRAMS = t -t_SOURCES = readonly.c - -t_LDADD = $(top_builddir)/test/utility/libtest_util.la -t_LDADD +=$(top_builddir)/libwiredtiger.la -t_LDFLAGS = -static - -# Run this during a "make check" smoke test. -TESTS = smoke.sh - -clean-local: - rm -rf WT_RD* core.* *.core diff --git a/src/third_party/wiredtiger/test/salvage/Makefile.am b/src/third_party/wiredtiger/test/salvage/Makefile.am deleted file mode 100644 index b1540e639ba..00000000000 --- a/src/third_party/wiredtiger/test/salvage/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -AM_CPPFLAGS +=-I$(top_srcdir)/src/include -AM_CPPFLAGS +=-I$(top_srcdir)/test/utility - -noinst_PROGRAMS = t -t_SOURCES = salvage.c - -t_LDADD = $(top_builddir)/test/utility/libtest_util.la -t_LDADD +=$(top_builddir)/libwiredtiger.la -t_LDFLAGS = -static - -# Run this during a "make check" smoke test. -TESTS = $(noinst_PROGRAMS) -LOG_COMPILER = $(TEST_WRAPPER) - -clean-local: - rm -rf core.* *.core WT_TEST diff --git a/src/third_party/wiredtiger/test/suite/run.py b/src/third_party/wiredtiger/test/suite/run.py index 24baaff822f..1e63fbd14d5 100755 --- a/src/third_party/wiredtiger/test/suite/run.py +++ b/src/third_party/wiredtiger/test/suite/run.py @@ -46,27 +46,22 @@ suitedir = sys.path[0] wt_disttop = os.path.dirname(os.path.dirname(suitedir)) wt_3rdpartydir = os.path.join(wt_disttop, 'test', '3rdparty') -# Check for a local build that contains the wt utility. First check in -# current working directory, then in build_posix and finally in the disttop -# directory. This isn't ideal - if a user has multiple builds in a tree we +# Check for a local build that contains the wt utility. First check if the +# supplied an explicit build directory ('WT_BUILDDIR'), then the current +# working directory, and finally in the disttop directory. +# This isn't ideal - if a user has multiple builds in a tree we # could pick the wrong one. We also need to account for the fact that there -# may be an executable 'wt' file the build directory and a subordinate .libs -# directory. +# may be an executable 'wt' file the build directory. env_builddir = os.getenv('WT_BUILDDIR') curdir = os.getcwd() if env_builddir and os.path.isfile(os.path.join(env_builddir, 'wt')): wt_builddir = env_builddir -elif os.path.basename(curdir) == '.libs' and \ - os.path.isfile(os.path.join(curdir, os.pardir, 'wt')): - wt_builddir = os.path.join(curdir, os.pardir) elif os.path.isfile(os.path.join(curdir, 'wt')): wt_builddir = curdir elif os.path.isfile(os.path.join(curdir, 'wt.exe')): wt_builddir = curdir elif os.path.isfile(os.path.join(wt_disttop, 'wt')): wt_builddir = wt_disttop -elif os.path.isfile(os.path.join(wt_disttop, 'build_posix', 'wt')): - wt_builddir = os.path.join(wt_disttop, 'build_posix') elif os.path.isfile(os.path.join(wt_disttop, 'wt.exe')): wt_builddir = wt_disttop else: @@ -108,7 +103,7 @@ unittest = None def usage(): print('Usage:\n\ - $ cd build_posix\n\ + $ cd build\n\ $ python ../test/suite/run.py [ options ] [ tests ]\n\ \n\ Options:\n\ diff --git a/src/third_party/wiredtiger/test/syscall/Makefile.am b/src/third_party/wiredtiger/test/syscall/Makefile.am deleted file mode 100644 index 1d55b06c388..00000000000 --- a/src/third_party/wiredtiger/test/syscall/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include -LDADD = $(top_builddir)/libwiredtiger.la -AM_LDFLAGS = -static -noinst_PROGRAMS = - -test_wt2336_base_SOURCES = wt2336_base/main.c -noinst_PROGRAMS += test_wt2336_base diff --git a/src/third_party/wiredtiger/test/syscall/syscall.py b/src/third_party/wiredtiger/test/syscall/syscall.py index 09f6474fe1f..e88ae67bc05 100755 --- a/src/third_party/wiredtiger/test/syscall/syscall.py +++ b/src/third_party/wiredtiger/test/syscall/syscall.py @@ -971,7 +971,7 @@ wt_disttop = os.path.dirname(os.path.dirname(syscalldir)) # Check for a local build that contains the wt utility. First check if the user # manually specified a local build through the 'WT_BUILDDIR' env variable. Otherwise # iterate through other possible locations. This including current working directory, -# then in build_posix and finally in the dist directory. This isn't ideal - if a +# and in the dist directory. This isn't ideal - if a # user has multiple builds in a tree we could pick the wrong one. env_builddir = os.getenv('WT_BUILDDIR') if env_builddir and os.path.isfile(os.path.join(env_builddir, 'wt')): @@ -980,8 +980,6 @@ elif os.path.isfile(os.path.join(os.getcwd(), 'wt')): wt_builddir = os.getcwd() elif os.path.isfile(os.path.join(wt_disttop, 'wt')): wt_builddir = wt_disttop -elif os.path.isfile(os.path.join(wt_disttop, 'build_posix', 'wt')): - wt_builddir = os.path.join(wt_disttop, 'build_posix') elif os.path.isfile(os.path.join(wt_disttop, 'wt.exe')): wt_builddir = wt_disttop else: diff --git a/src/third_party/wiredtiger/test/thread/Makefile.am b/src/third_party/wiredtiger/test/thread/Makefile.am deleted file mode 100644 index 182effa3201..00000000000 --- a/src/third_party/wiredtiger/test/thread/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -AM_CPPFLAGS +=-I$(top_srcdir)/src/include -AM_CPPFLAGS +=-I$(top_srcdir)/test/utility - -noinst_PROGRAMS = t -t_SOURCES = file.c rw.c stats.c t.c - -t_LDADD = $(top_builddir)/test/utility/libtest_util.la -t_LDADD +=$(top_builddir)/libwiredtiger.la -t_LDFLAGS = -static - -TESTS = smoke.sh - -clean-local: - rm -rf WT_TEST __stats core.* *.core diff --git a/src/third_party/wiredtiger/test/utility/Makefile.am b/src/third_party/wiredtiger/test/utility/Makefile.am deleted file mode 100644 index 4bdbc775a59..00000000000 --- a/src/third_party/wiredtiger/test/utility/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include - -libtest_util_la_SOURCES = misc.c modify.c parse_opts.c thread.c -noinst_LTLIBRARIES = libtest_util.la diff --git a/src/third_party/wiredtiger/test/utility/misc.c b/src/third_party/wiredtiger/test/utility/misc.c index 5430af02857..f61a429fafd 100644 --- a/src/third_party/wiredtiger/test/utility/misc.c +++ b/src/third_party/wiredtiger/test/utility/misc.c @@ -140,42 +140,21 @@ testutil_clean_work_dir(const char *dir) /* * testutil_build_dir -- - * Get the git top level directory and concatenate the build directory. + * Get the build directory. */ void testutil_build_dir(TEST_OPTS *opts, char *buf, int size) { - FILE *fp; - char *p; - - /* If a build directory was manually given as an option we can directly return this instead. */ - if (opts->build_dir != NULL) { - strncpy(buf, opts->build_dir, (size_t)size); - return; - } - - /* Get the git top level directory. */ -#ifdef _WIN32 - fp = _popen("git rev-parse --show-toplevel", "r"); -#else - fp = popen("git rev-parse --show-toplevel", "r"); -#endif - - if (fp == NULL) - testutil_die(errno, "popen"); - p = fgets(buf, size, fp); - if (p == NULL) - testutil_die(errno, "fgets"); - -#ifdef _WIN32 - _pclose(fp); -#else - pclose(fp); -#endif + /* To keep it simple, in order to get the build directory we require the user to set the build + * directory from the command line options. + * We unfortunately can't depend on a known/constant build directory (the user could have + * multiple out-of-source build directories). There's also not really any OS-agnostic mechanisms + * we can here use to discover the build directory the calling test binary exists in. + */ + if (opts->build_dir == NULL) + testutil_die(ENOENT, "No build directory given"); - /* Remove the trailing newline character added by fgets. */ - buf[strlen(buf) - 1] = '\0'; - strcat(buf, "/build_posix"); + strncpy(buf, opts->build_dir, (size_t)size); } /* diff --git a/src/third_party/wiredtiger/test/wtperf/test_conf_dump.py b/src/third_party/wiredtiger/test/wtperf/test_conf_dump.py index 6e9faf65b6b..bc2147202f8 100755 --- a/src/third_party/wiredtiger/test/wtperf/test_conf_dump.py +++ b/src/third_party/wiredtiger/test/wtperf/test_conf_dump.py @@ -26,7 +26,7 @@ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. -# Usage: python test_conf_dump.py <optional-wtperf-config> +# Usage: python test_conf_dump.py -d wtperf_directory [-c optional_wtperf_config] # # This script tests if the config file dumped in the test directory corresponds # correctly to the wtperf config file used. Command line options to wtperf are @@ -46,18 +46,19 @@ # fails if the value for the option is not replaced/appended in the correct # order of precedence as stated above. -import os, re, subprocess, sys +import os, re, subprocess +import argparse OP_FILE = "WT_TEST/CONFIG.wtperf" TMP_CONF = "__tmp.wtperf" WTPERF_BIN = "./wtperf" -env_wtperfdir = os.getenv('WTPERF_DIR') -if env_wtperfdir: - WTPERF_DIR = env_wtperfdir -else: - WTPERF_DIR = "../../build_posix/bench/wtperf/" +ap = argparse.ArgumentParser('Validates a WiredTiger test config files matches the wtperf config file being used') +ap.add_argument('-d', '--wtperf_dir', type=str, required=True, help="Specify the wtperf binary directory") +ap.add_argument('-c', '--config', help="Optional wtperf config file") +args = ap.parse_args() +WTPERF_DIR = args.wtperf_dir CONF_NOT_PROVIDED = -2 # Generate a wtperf conf file to use @@ -304,8 +305,8 @@ def run_test(conf_file, option_C = "", option_T = "", option_o = ""): # ----------------- Execute Test -------------- # If a wtperf conf file is provided use it, else generate a temp conf file os.chdir(WTPERF_DIR) -if len(sys.argv) == 2: - conf_file = sys.argv[1] +if args.config: + conf_file = args.config else: conf_file = TMP_CONF generate_conf_file(conf_file) @@ -323,7 +324,7 @@ if not run_test(conf_file, option_C, option_T, option_o): # Cleanup generated temp files subprocess.check_call("rm -rf WT_TEST/", shell=True) -if len(sys.argv) == 1 and conf_file == TMP_CONF: +if not args.config and conf_file == TMP_CONF: subprocess.check_call("rm " + TMP_CONF, shell=True) print("All tests succeeded") diff --git a/src/third_party/wiredtiger/tools/wt_ckpt_decode.py b/src/third_party/wiredtiger/tools/wt_ckpt_decode.py index 940bbea37b6..31d4cc8a3b0 100755 --- a/src/third_party/wiredtiger/tools/wt_ckpt_decode.py +++ b/src/third_party/wiredtiger/tools/wt_ckpt_decode.py @@ -31,7 +31,7 @@ # This script uses WiredTiger's integer unpacking library. To load the # WiredTiger library built in a development tree, you may have to set # LD_LIBRARY_PATH or the equivalent for your system. For example: -# $ export LD_LIBRARY_PATH=`pwd`/../build_posix/.libs +# $ export LD_LIBRARY_PATH=`pwd`/../build import os, sys, getopt @@ -49,12 +49,17 @@ def err_usage(msg): # Set paths wt_disttop = sys.path[0] -while not os.path.isdir(wt_disttop + '/build_posix'): - if wt_disttop == '/': - err_usage('current dir not in wiredtiger development directory') - wt_disttop = os.path.dirname(wt_disttop) - sys.path.insert(1, os.path.join(wt_disttop, 'build_posix', 'lang', - 'python')) +env_builddir = os.getenv('WT_BUILDDIR') +curdir = os.getcwd() +if env_builddir and os.path.isfile(os.path.join(env_builddir, 'wt')): + wt_builddir = env_builddir +elif os.path.isfile(os.path.join(curdir, 'wt')): + wt_builddir = curdir +else: + err_usage('Unable to find useable WiredTiger build.' + 'Call the script from either the build directory root or set the \'WT_BUILDDIR\' environment variable') + +sys.path.insert(1, os.path.join(wt_builddir, 'lang', 'python')) from wiredtiger.packing import unpack diff --git a/src/third_party/wiredtiger/tools/xray_to_optrack/Makefile.am b/src/third_party/wiredtiger/tools/xray_to_optrack/Makefile.am deleted file mode 100644 index 7d6889efc32..00000000000 --- a/src/third_party/wiredtiger/tools/xray_to_optrack/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -AM_CPPFLAGS = `llvm-config --cxxflags --libs core` -AM_LDFLAGS = `llvm-config --ldflags --libs core` - -noinst_PROGRAMS = xray_to_optrack -xray_to_optrack_SOURCES = xray_to_optrack.cxx |