Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions configuration/builders/sequences/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,102 @@ def get_mtr_normal_steps(
return steps


def get_mtr_cursor_steps(
jobs,
path_to_test_runner: PurePath,
halt_on_failure: bool = True,
step_wrapping_fn=lambda step: step,
additional_mtr_options: list[MTROption] = [],
env_vars: list[tuple] = [],
):
steps = []
steps.append(
step_wrapping_fn(
ShellStep(
MTRTest(
name="cursor",
save_logs_path=MTR_PATH_TO_SAVE_LOGS / "cursor",
workdir=path_to_test_runner,
testcase=MTRGenerator(
flags=[
MTROption(MTR.VERBOSE_RESTART, True),
MTROption(MTR.FORCE, True),
MTROption(MTR.CURSOR_PROTOCOL, True),
MTROption(MTR.MAX_SAVE_CORE, 2),
MTROption(MTR.MAX_SAVE_DATADIR, 1),
MTROption(MTR.MAX_TEST_FAIL, 20),
MTROption(MTR.PARALLEL, jobs * 2),
MTROption(MTR.VARDIR, "/dev/shm/cursor"),
MTROption(
MTR.XML_REPORT, MTR_PATH_TO_SAVE_LOGS / "cursor.xml"
),
]
+ additional_mtr_options,
suite_collection=TestSuiteCollection(
[
SUITE.MAIN,
]
),
),
),
options=StepOptions(
haltOnFailure=halt_on_failure, descriptionDone="MTR cursor"
),
env_vars=env_vars,
)
)
)
return steps


def get_mtr_view_steps(
jobs,
path_to_test_runner: PurePath,
halt_on_failure: bool = True,
step_wrapping_fn=lambda step: step,
additional_mtr_options: list[MTROption] = [],
env_vars: list[tuple] = [],
):
steps = []
steps.append(
step_wrapping_fn(
ShellStep(
MTRTest(
name="view",
save_logs_path=MTR_PATH_TO_SAVE_LOGS / "view",
workdir=path_to_test_runner,
testcase=MTRGenerator(
flags=[
MTROption(MTR.VERBOSE_RESTART, True),
MTROption(MTR.FORCE, True),
MTROption(MTR.VIEW_PROTOCOL, True),
MTROption(MTR.MAX_SAVE_CORE, 2),
MTROption(MTR.MAX_SAVE_DATADIR, 1),
MTROption(MTR.MAX_TEST_FAIL, 20),
MTROption(MTR.PARALLEL, jobs * 2),
MTROption(MTR.VARDIR, "/dev/shm/view"),
MTROption(
MTR.XML_REPORT, MTR_PATH_TO_SAVE_LOGS / "view.xml"
),
]
+ additional_mtr_options,
suite_collection=TestSuiteCollection(
[
SUITE.MAIN,
]
),
),
),
options=StepOptions(
haltOnFailure=halt_on_failure, descriptionDone="MTR view"
),
env_vars=env_vars,
)
)
)
return steps


def get_mtr_rocksdb_steps(
jobs,
path_to_test_runner: PurePath,
Expand Down
78 changes: 60 additions & 18 deletions configuration/builders/sequences/sanitizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
InContainer,
)
from configuration.builders.sequences.helpers import (
get_mtr_cursor_steps,
get_mtr_normal_steps,
get_mtr_s3_steps,
get_mtr_spider_steps,
get_mtr_view_steps,
mtr_reporter,
save_mtr_logs,
)
Expand All @@ -34,6 +36,7 @@ def asan_ubsan(
config: DockerConfig,
jobs: int,
isDebugBuildType: bool,
isExperimental: bool,
):
sequence = BuildSequence()

Expand Down Expand Up @@ -73,10 +76,17 @@ def asan_ubsan(
CMakeOption(WITH.UBSAN, True),
CMakeOption(WITH.UNIT_TESTS, False),
CMakeOption(PLUGIN.COLUMNSTORE_STORAGE_ENGINE, False),
CMakeOption(PLUGIN.DUCKDB_STORAGE_ENGINE, False),
]
if isDebugBuildType:
flags.append(CMakeOption(CMAKE.BUILD_TYPE, BuildType.DEBUG))
flags.append(CMakeOption(WITH.DBUG_TRACE, False))
flags.extend(
[
CMakeOption(CMAKE.BUILD_TYPE, BuildType.DEBUG),
CMakeOption(WITH.DBUG_TRACE, False),
CMakeOption(CMAKE.C_FLAGS, "-Og"),
CMakeOption(CMAKE.CXX_FLAGS, "-Og"),
]
)

sequence.add_step(
InContainer(
Expand Down Expand Up @@ -164,28 +174,33 @@ def asan_ubsan(
docker_environment=config, step=step
),
)
+ [
save_mtr_logs(
step_wrapping_fn=lambda step: InContainer(
docker_environment=config, step=step
),
),
mtr_reporter(
step_wrapping_fn=lambda step: InContainer(
docker_environment=config, step=step
),
),
]
):
sequence.add_step(step)

sequence.add_step(
save_mtr_logs(
step_wrapping_fn=lambda step: InContainer(
docker_environment=config, step=step
),
)
)

sequence.add_step(
mtr_reporter(
step_wrapping_fn=lambda step: InContainer(
docker_environment=config, step=step
),
),
)

return sequence


def msan(
config: DockerConfig,
jobs: int,
isDebugBuildType: bool,
isExperimental: bool,
):
sequence = BuildSequence()

Expand Down Expand Up @@ -214,13 +229,20 @@ def msan(
CMakeOption(WITH.ZLIB, "bundled"),
CMakeOption(WITH.SYSTEMD, "no"),
CMakeOption(PLUGIN.COLUMNSTORE_STORAGE_ENGINE, False),
CMakeOption(PLUGIN.SPIDER_STORAGE_ENGINE, isDebugBuildType),
CMakeOption(PLUGIN.SPIDER_STORAGE_ENGINE, isDebugBuildType or isExperimental),
CMakeOption(PLUGIN.ROCKSDB_STORAGE_ENGINE, False),
CMakeOption(PLUGIN.OQGRAPH_STORAGE_ENGINE, False),
CMakeOption(PLUGIN.DUCKDB_STORAGE_ENGINE, False),
]
if isDebugBuildType:
flags.append(CMakeOption(CMAKE.BUILD_TYPE, BuildType.DEBUG))
flags.append(CMakeOption(WITH.DBUG_TRACE, False))
flags.extend(
[
CMakeOption(CMAKE.BUILD_TYPE, BuildType.DEBUG),
CMakeOption(WITH.DBUG_TRACE, False),
CMakeOption(CMAKE.C_FLAGS, "-Og"),
CMakeOption(CMAKE.CXX_FLAGS, "-Og"),
]
)

sequence.add_step(
InContainer(
Expand Down Expand Up @@ -279,7 +301,7 @@ def msan(
path_to_test_runner=PurePath("bld", "mysql-test"),
step_wrapping_fn=lambda step: InContainer(docker_environment=config, step=step),
)
if isDebugBuildType:
if isDebugBuildType or isExperimental:
steps += get_mtr_spider_steps(
jobs=jobs,
env_vars=env_vars,
Expand All @@ -290,6 +312,26 @@ def msan(
docker_environment=config, step=step
),
)
if isExperimental and not isDebugBuildType:
steps += get_mtr_cursor_steps(
jobs=jobs,
env_vars=env_vars,
halt_on_failure=False,
path_to_test_runner=PurePath("bld", "mysql-test"),
step_wrapping_fn=lambda step: InContainer(
docker_environment=config, step=step
),
)
steps += get_mtr_view_steps(
jobs=jobs,
env_vars=env_vars,
halt_on_failure=False,
path_to_test_runner=PurePath("bld", "mysql-test"),
step_wrapping_fn=lambda step: InContainer(
docker_environment=config, step=step
),
)
# Save results
steps += [
save_mtr_logs(
step_wrapping_fn=lambda step: InContainer(
Expand Down
1 change: 1 addition & 0 deletions configuration/steps/generators/cmake/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class PLUGIN(StrEnum):
ARCHIVE_STORAGE_ENGINE = "ARCHIVE"
COLUMNSTORE_STORAGE_ENGINE = "COLUMNSTORE"
CONNECT_STORAGE_ENGINE = "CONNECT"
DUCKDB_STORAGE_ENGINE = "DUCKDB"
FEDERATED_STORAGE_ENGINE = "FEDERATED"
FEDERATEDX_STORAGE_ENGINE = "FEDERATEDX"
FEEDBACK = "FEEDBACK"
Expand Down
6 changes: 3 additions & 3 deletions constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
"amd64-fedora-44-valgrind",
"amd64-freebsd-14",
"amd64-msan-clang-20",
"amd64-msan-clang-22",
"amd64-openeuler-2403",
"amd64-openssl3-fips",
"amd64-rhel-7",
Expand Down Expand Up @@ -181,10 +182,9 @@
"amd64-debian-12",
"amd64-debian-12-deb-autobake-migration",
"amd64-debian-12-debug-embedded",
"amd64-msan-clang-20-debug",
"amd64-rhel-10",
"amd64-ubasan-clang-20",
"amd64-ubasan-clang-20-debug",
"amd64-ubasan-clang-22",
"amd64-ubasan-clang-22-debug",
"amd64-ubuntu-2404",
"ppc64le-centos-stream10",
"ppc64le-rhel-10",
Expand Down
Loading