Thanks to visit codestin.com
Credit goes to github.com

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
5 changes: 5 additions & 0 deletions test/helpers/test_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ static const TestConfigOption test_config_options[] = {
{"skip_error_messages", "Skip compiled tests", LogicalType::LIST(LogicalType::VARCHAR), nullptr},
{"statically_loaded_extensions", "Extensions to be loaded (from the statically available one)",
LogicalType::LIST(LogicalType::VARCHAR), nullptr},
{"storage_version", "Database storage version to use by default", LogicalType::VARCHAR, nullptr},
{nullptr, nullptr, LogicalType::INVALID, nullptr},
};

Expand Down Expand Up @@ -310,6 +311,10 @@ bool TestConfiguration::GetSkipCompiledTests() {
return GetOptionOrDefault("skip_compiled", false);
}

string TestConfiguration::GetStorageVersion() {
return GetOptionOrDefault("storage_version", string());
}

DebugVectorVerification TestConfiguration::GetVectorVerification() {
return EnumUtil::FromString<DebugVectorVerification>(GetOptionOrDefault<string>("verify_vector", "NONE"));
}
Expand Down
4 changes: 4 additions & 0 deletions test/helpers/test_helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ unique_ptr<DBConfig> GetTestConfig() {
result->options.trim_free_blocks = true;
#endif
result->options.allow_unsigned_extensions = true;
auto storage_version = test_config.GetStorageVersion();
if (!storage_version.empty()) {
result->options.serialization_compatibility = SerializationCompatibility::FromString(storage_version);
}

auto max_threads = test_config.GetMaxThreads();
if (max_threads.IsValid()) {
Expand Down
1 change: 1 addition & 0 deletions test/include/test_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class TestConfiguration {
string OnConnectionCommand();
vector<string> ExtensionToBeLoadedOnLoad();
vector<string> ErrorMessagesToBeSkipped();
string GetStorageVersion();

static bool TestForceStorage();
static bool TestForceReload();
Expand Down
Loading