mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-06 19:12:50 -05:00
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Testing ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) No ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Currently documentdb tests only run with default rum and non-composite op-class. While with PG18 they run with ex_rum as a binary they still don't leverage the extended_rum index am and op-class. Add an option to add backend tests that test the combo until we make this the default path. ---- #### AI description (iteration 1) #### PR Classification This pull request introduces a new feature by adding support for running backend tests that leverage extended_rum in DocumentDB. #### PR Summary The changes integrate an extended_rum test suite into the DocumentDB backend testing infrastructure, ensuring that extended index handlers are properly configured and validated. - **`src/test/extended_rum_tests`**: Added new SQL test files, expected output files, scheduling files, a Makefile, a shell script (`mutate_schedule.sh`), a custom `postgresql.conf`, and a `.gitignore` to support and isolate extended_rum tests. - **`src/test/regress/validate_test_output.sh`**: Modified to correctly resolve directories for validating test outputs. - **Top-level and project Makefiles**: Updated (`Makefile`, `oss/pg_documentdb/Makefile`, and `src/test/Makefile`) with new targets to run extended_rum tests alongside the existing regression tests. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> Signed-off-by: Shuai Tian <shuaitian@microsoft.com>
101 lines
3.0 KiB
Makefile
101 lines
3.0 KiB
Makefile
EXTENSION = documentdb
|
|
MODULE_big = pg_$(EXTENSION)
|
|
|
|
SQL_DEPDIR=.deps/sql
|
|
SQL_BUILDDIR=build/sql
|
|
|
|
template_sql_files = $(wildcard sql/*.sql)
|
|
generated_sql_files = $(patsubst %,build/%,$(template_sql_files))
|
|
DATA_built = $(generated_sql_files)
|
|
sql_file_inputs = $(wildcard sql/**/*.sql)
|
|
|
|
BUILD_SCRIPT_DIR = ../
|
|
OSS_SRC_DIR = ../
|
|
OSS_COMMON_SQL_HEADER = $(wildcard $(OSS_SRC_DIR)/common_header.sql)
|
|
|
|
# Extension defines
|
|
API_SCHEMA_NAME=documentdb_api
|
|
API_SCHEMA_NAME_V2=documentdb_api
|
|
API_SCHEMA_INTERNAL_NAME=documentdb_api_internal
|
|
API_SCHEMA_INTERNAL_NAME_V2=documentdb_api_internal
|
|
API_CATALOG_SCHEMA_NAME=documentdb_api_catalog
|
|
API_CATALOG_SCHEMA_NAME_V2=documentdb_api_catalog
|
|
CORE_SCHEMA_NAME=documentdb_core
|
|
API_DATA_SCHEMA_NAME=documentdb_data
|
|
API_ADMIN_ROLE=documentdb_admin_role
|
|
API_READONLY_ROLE=documentdb_readonly_role
|
|
API_BG_WORKER_ROLE=documentdb_bg_worker_role
|
|
POSTGIS_SCHEMA_NAME=public
|
|
EXTENSION_OBJECT_PREFIX=documentdb
|
|
API_GUC_PREFIX=documentdb
|
|
API_GUC_PREFIX_V2=documentdb
|
|
|
|
# TODO: Need to remove this with PG16 and expose only valid exports
|
|
ALLOW_DEFAULT_VISIBILITY=yes
|
|
|
|
USE_DOCUMENTDB_CORE = 1
|
|
include $(OSS_SRC_DIR)/Makefile.cflags
|
|
SOURCES = $(wildcard src/*.c) $(wildcard src/**/*.c)
|
|
|
|
OBJS = $(patsubst %.c,%.o,$(SOURCES))
|
|
|
|
# Update to notify roaring to use the C atomics implementation (as opposed to c++): See roaring.h CROARING_ATOMIC_IMPL_C
|
|
PG_CFLAGS += -DCROARING_ATOMIC_IMPL=3
|
|
PG_CPPFLAGS += -DCROARING_ATOMIC_IMPL=3
|
|
|
|
DEBUG ?= no
|
|
ifeq ($(DEBUG),yes)
|
|
PG_CPPFLAGS += -ggdb -O0 -g
|
|
PG_CFLAGS += -ggdb -O0 -g
|
|
endif
|
|
|
|
SHLIB_LINK = $(libpq)
|
|
|
|
include $(OSS_SRC_DIR)/Makefile.global
|
|
|
|
clean-sql:
|
|
rm -rf .deps/ build/
|
|
|
|
check:
|
|
$(MAKE) -C src/test all
|
|
|
|
check-extended-rum:
|
|
$(MAKE) -C src/test/extended_rum_tests all
|
|
|
|
check-minimal:
|
|
$(MAKE) -C src/test/regress check-minimal
|
|
|
|
check-documentdb-minimal: check-minimal
|
|
|
|
check-docdb-rum-minimal:
|
|
$(MAKE) -C src/test/extended_rum_tests check-minimal
|
|
|
|
citus-indent:
|
|
citus_indent
|
|
|
|
analysis: citus-indent
|
|
|
|
check-regress:
|
|
$(MAKE) -C src/test check-regress
|
|
|
|
# Before installing, trim any files extension*.sql files in the target install directory
|
|
install: trim_installed_data_files
|
|
|
|
trim_installed_data_files:
|
|
rm -f $(DESTDIR)$(datadir)/$(datamoduledir)/$(EXTENSION)--*.sql
|
|
|
|
build-sql: $(generated_sql_files)
|
|
|
|
$(generated_sql_files): build/%: %
|
|
@mkdir -p $(SQL_DEPDIR) $(SQL_BUILDDIR)
|
|
@# -MF is used to store dependency files(.Po) in another directory for separation
|
|
@# -MT is used to change the target of the rule emitted by dependency generation.
|
|
@# -P is used to inhibit generation of linemarkers in the output from the preprocessor.
|
|
@# -undef is used to not predefine any system-specific or GCC-specific macros.
|
|
@# -imacros is used to specify a file that defines macros for the global context but its output is thrown away.
|
|
@# `man cpp` for further information
|
|
cpp -undef -w $(SQL_DEFINES) -imacros $(OSS_COMMON_SQL_HEADER) -P -MMD -MP -MF$(SQL_DEPDIR)/$(*F).Po -MT$@ $< > $@
|
|
|
|
include $(OSS_SRC_DIR)/Makefile.versions
|
|
|
|
src/documentdb_extension_version.o : build/include/metadata/documentdb_extension_version.h |