Skip to content

Commit 3434b20

Browse files
author
Michael Wilkerson-Barker
committed
Merge branch 'master' of github.com:realm/realm-core into release/14.6.0-again
2 parents 7a1cd23 + e91161d commit 3434b20

File tree

6 files changed

+40
-7
lines changed

6 files changed

+40
-7
lines changed

evergreen/config.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ functions:
137137
set_cmake_var realm_vars REALM_LLVM_COVERAGE BOOL On
138138
fi
139139
140-
set_cmake_var realm_vars REALM_BUILD_COMMANDLINE_TOOLS BOOL On
141-
set_cmake_var realm_vars REALM_ENABLE_ENCRYPTION BOOL On
140+
set_cmake_var realm_vars REALM_BUILD_COMMANDLINE_TOOLS BOOL "${build_command_line_tools|On}"
141+
set_cmake_var realm_vars REALM_ENABLE_ENCRYPTION BOOL "${enable_realm_encryption|On}"
142142
143143
if [[ -n "${fetch_missing_dependencies|}" ]]; then
144144
set_cmake_var realm_vars REALM_FETCH_MISSING_DEPENDENCIES BOOL On
@@ -1290,6 +1290,31 @@ buildvariants:
12901290
tasks:
12911291
- name: compile_test
12921292

1293+
- name: ubuntu-small-bpnode-size
1294+
display_name: "Ubuntu (Small BPNode size)"
1295+
run_on: ubuntu2204-arm64-large
1296+
expansions:
1297+
fetch_missing_dependencies: On
1298+
c_compiler: "/opt/clang+llvm/bin/clang"
1299+
cxx_compiler: "/opt/clang+llvm/bin/clang++"
1300+
extra_flags: -DREALM_MAX_BPNODE_SIZE=4
1301+
build_command_line_tools: Off
1302+
tasks:
1303+
- name: compile_local_tests
1304+
1305+
- name: ubuntu-no-encryption
1306+
display_name: "Ubuntu (No encryption support)"
1307+
run_on: ubuntu2204-arm64-large
1308+
expansions:
1309+
fetch_missing_dependencies: On
1310+
c_compiler: "/opt/clang+llvm/bin/clang"
1311+
cxx_compiler: "/opt/clang+llvm/bin/clang++"
1312+
enable_realm_encryption: Off
1313+
build_command_line_tools: Off
1314+
disable_tests_against_baas: On
1315+
tasks:
1316+
- name: compile_local_tests
1317+
12931318
- name: ubuntu-encryption-tsan
12941319
display_name: "Ubuntu (Encryption Enabled w/TSAN)"
12951320
run_on: ubuntu2204-arm64-small

src/realm/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ if(REALM_HAVE_BACKTRACE AND NOT CMAKE_GENERATOR STREQUAL Xcode)
387387
target_link_libraries(Storage PUBLIC ${Backtrace_LIBRARIES})
388388
endif()
389389

390-
if(REALM_ENABLE_ENCRYPTION AND REALM_HAVE_OPENSSL AND (UNIX OR WIN32))
390+
if(REALM_HAVE_OPENSSL AND (UNIX OR WIN32))
391391
target_link_libraries(Storage PUBLIC OpenSSL::Crypto)
392392
endif()
393393

src/realm/util/encrypted_file_mapping.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
#include <realm/util/file_mapper.hpp>
2222

23+
#include <sstream>
24+
2325
#if REALM_ENABLE_ENCRYPTION
2426
#include <realm/util/aes_cryptor.hpp>
2527
#include <realm/util/errno.hpp>
@@ -30,7 +32,6 @@
3032
#include <cstdlib>
3133
#include <algorithm>
3234
#include <chrono>
33-
#include <sstream>
3435
#include <stdexcept>
3536
#include <string_view>
3637
#include <system_error>

test/object-store/sync/metadata.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ std::shared_ptr<Realm> get_metadata_realm()
5959
using realm::util::adoptCF;
6060
using realm::util::CFPtr;
6161

62+
#if REALM_ENABLE_ENCRYPTION
6263
constexpr const char* access_group = "";
6364
bool can_access_keychain()
6465
{
@@ -74,6 +75,7 @@ bool can_access_keychain()
7475
}();
7576
return can_access_keychain;
7677
}
78+
#endif
7779

7880
CFPtr<CFMutableDictionaryRef> build_search_dictionary(CFStringRef account, CFStringRef service)
7981
{
@@ -607,6 +609,7 @@ TEST_CASE("app metadata: persisted", "[sync][metadata]") {
607609
}
608610
}
609611

612+
#if REALM_ENABLE_ENCRYPTION
610613
TEST_CASE("app metadata: encryption", "[sync][metadata]") {
611614
test_util::TestDirGuard test_dir(base_path);
612615

@@ -732,6 +735,8 @@ TEST_CASE("app metadata: encryption", "[sync][metadata]") {
732735
#endif // REALM_PLATFORM_APPLE
733736
}
734737

738+
#endif
739+
735740
#ifndef SWIFT_PACKAGE // The SPM build currently doesn't copy resource files
736741
TEST_CASE("sync metadata: can open old metadata realms", "[sync][metadata]") {
737742
test_util::TestDirGuard test_dir(base_path);
@@ -890,7 +895,7 @@ TEST_CASE("sync metadata: can open old metadata realms", "[sync][metadata]") {
890895
}
891896
#endif // SWIFT_PACKAGE
892897

893-
#if REALM_PLATFORM_APPLE
898+
#if REALM_PLATFORM_APPLE && REALM_ENABLE_ENCRYPTION
894899
TEST_CASE("keychain", "[sync][metadata]") {
895900
if (!can_access_keychain()) {
896901
return;

test/test_sync_history_migration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ using namespace realm::test_util;
4848
namespace {
4949

5050
#if !REALM_MOBILE
51-
TEST(Sync_HistoryMigration)
51+
TEST_IF(Sync_HistoryMigration, REALM_MAX_BPNODE_SIZE == 1000)
5252
{
5353
// Set to true to produce new versions of client and server-side files in
5454
// `resources/history_migration/` as needed. This should be done whenever

test/test_sync_subscriptions.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,9 @@ TEST(Sync_SubscriptionStoreRefreshSubscriptionSetInvalid)
399399
CHECK_THROW(latest->refresh(), RuntimeError);
400400
}
401401

402-
TEST(Sync_SubscriptionStoreInternalSchemaMigration)
402+
// Only runs if REALM_MAX_BPNODE_SIZE is 1000 since that's what the pre-created
403+
// test realm files were created with
404+
TEST_IF(Sync_SubscriptionStoreInternalSchemaMigration, REALM_MAX_BPNODE_SIZE == 1000)
403405
{
404406
SHARED_GROUP_TEST_PATH(sub_store_path)
405407

0 commit comments

Comments
 (0)