Skip to content

Commit d8f2989

Browse files
committed
Split SQLCipher clear/encrypted tests
1 parent 2854310 commit d8f2989

File tree

6 files changed

+185
-51
lines changed

6 files changed

+185
-51
lines changed

.github/workflows/CI.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,22 @@ jobs:
9393
- uses: actions/checkout@v2
9494
- name: ${{ matrix.name }}
9595
run: make test_SPM test_install_SPM
96+
SQLCipher3:
97+
name: SQLCipher3
98+
runs-on: ${{ matrix.runsOn }}
99+
timeout-minutes: 60
100+
strategy:
101+
fail-fast: false
102+
matrix:
103+
include:
104+
- xcode: "Xcode_13.3.1.app"
105+
runsOn: macOS-12
106+
name: "macOS 12, Xcode 13.3.1, Swift 5.6"
107+
shell: "/bin/zsh {0}"
108+
steps:
109+
- uses: actions/checkout@v2
110+
- name: ${{ matrix.name }}
111+
run: make test_framework_SQLCipher3Encrypted
96112
SQLCipher4:
97113
name: SQLCipher4
98114
runs-on: ${{ matrix.runsOn }}
@@ -112,7 +128,7 @@ jobs:
112128
steps:
113129
- uses: actions/checkout@v2
114130
- name: ${{ matrix.name }}
115-
run: make test_framework_SQLCipher4
131+
run: make test_framework_SQLCipher4Encrypted
116132
CustomSQLite:
117133
name: CustomSQLite
118134
runs-on: ${{ matrix.runsOn }}

Makefile

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# make distclean - Restore repository to a pristine state
99

1010
default: test
11-
smokeTest: test_framework_GRDBiOS_maxTarget test_framework_GRDBiOS_minTarget test_framework_SQLCipher4 test_framework_GRDBCustomSQLiteiOS_maxTarget test_SPM
11+
smokeTest: test_framework_GRDBiOS_maxTarget test_framework_GRDBiOS_minTarget test_framework_SQLCipher4Encrypted test_framework_GRDBCustomSQLiteiOS_maxTarget test_SPM
1212

1313
# Requirements
1414
# ============
@@ -180,7 +180,7 @@ test_framework: test_framework_darwin
180180
test_framework_darwin: test_framework_GRDB test_framework_GRDBCustom test_framework_SQLCipher test_SPM
181181
test_framework_GRDB: test_framework_GRDBOSX test_framework_GRDBWatchOS test_framework_GRDBiOS test_framework_GRDBtvOS
182182
test_framework_GRDBCustom: test_framework_GRDBCustomSQLiteOSX test_framework_GRDBCustomSQLiteiOS
183-
test_framework_SQLCipher: test_framework_SQLCipher3 test_framework_SQLCipher4
183+
test_framework_SQLCipher: test_framework_SQLCipher3 test_framework_SQLCipher3Encrypted test_framework_SQLCipher4 test_framework_SQLCipher4Encrypted
184184
test_archive: test_archive_GRDBOSX_xcframework
185185
test_install: test_install_manual test_install_SPM test_install_customSQLite test_install_GRDB_CocoaPods test_CocoaPodsLint
186186
test_CocoaPodsLint: test_CocoaPodsLint_GRDB
@@ -348,6 +348,21 @@ else
348348
@exit 1
349349
endif
350350

351+
test_framework_SQLCipher3Encrypted:
352+
ifdef POD
353+
cd Tests/CocoaPods/SQLCipher3 && \
354+
$(POD) install && \
355+
$(XCODEBUILD) \
356+
-workspace GRDBTests.xcworkspace \
357+
-scheme GRDBEncryptedTests \
358+
SWIFT_VERSION=$(MAX_SWIFT_VERSION) \
359+
build-for-testing test-without-building \
360+
$(XCPRETTY)
361+
else
362+
@echo CocoaPods must be installed for test_framework_SQLCipher3Encrypted
363+
@exit 1
364+
endif
365+
351366
test_framework_SQLCipher4:
352367
ifdef POD
353368
cd Tests/CocoaPods/SQLCipher4 && \
@@ -363,6 +378,21 @@ else
363378
@exit 1
364379
endif
365380

381+
test_framework_SQLCipher4Encrypted:
382+
ifdef POD
383+
cd Tests/CocoaPods/SQLCipher4 && \
384+
$(POD) install && \
385+
$(XCODEBUILD) \
386+
-workspace GRDBTests.xcworkspace \
387+
-scheme GRDBEncryptedTests \
388+
SWIFT_VERSION=$(MAX_SWIFT_VERSION) \
389+
build-for-testing test-without-building \
390+
$(XCPRETTY)
391+
else
392+
@echo CocoaPods must be installed for test_framework_SQLCipher4Encrypted
393+
@exit 1
394+
endif
395+
366396
test_SPM:
367397
# Add sanitizers when available: https://twitter.com/simjp/status/929140877540278272
368398
$(SWIFT) package clean
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1340"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "NO"
12+
buildForProfiling = "NO"
13+
buildForArchiving = "NO"
14+
buildForAnalyzing = "NO">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "564A2095226B8E18001F64F1"
18+
BuildableName = "GRDBTestsEncrypted.xctest"
19+
BlueprintName = "GRDBTestsEncrypted"
20+
ReferencedContainer = "container:GRDBTests.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
<TestableReference
32+
skipped = "NO">
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "564A2095226B8E18001F64F1"
36+
BuildableName = "GRDBTestsEncrypted.xctest"
37+
BlueprintName = "GRDBTestsEncrypted"
38+
ReferencedContainer = "container:GRDBTests.xcodeproj">
39+
</BuildableReference>
40+
</TestableReference>
41+
</Testables>
42+
</TestAction>
43+
<LaunchAction
44+
buildConfiguration = "Debug"
45+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
46+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
47+
launchStyle = "0"
48+
useCustomWorkingDirectory = "NO"
49+
ignoresPersistentStateOnLaunch = "NO"
50+
debugDocumentVersioning = "YES"
51+
debugServiceExtension = "internal"
52+
allowLocationSimulation = "YES">
53+
</LaunchAction>
54+
<ProfileAction
55+
buildConfiguration = "Release"
56+
shouldUseLaunchSchemeArgsEnv = "YES"
57+
savedToolIdentifier = ""
58+
useCustomWorkingDirectory = "NO"
59+
debugDocumentVersioning = "YES">
60+
</ProfileAction>
61+
<AnalyzeAction
62+
buildConfiguration = "Debug">
63+
</AnalyzeAction>
64+
<ArchiveAction
65+
buildConfiguration = "Release"
66+
revealArchiveInOrganizer = "YES">
67+
</ArchiveAction>
68+
</Scheme>

Tests/CocoaPods/SQLCipher3/GRDBTests.xcodeproj/xcshareddata/xcschemes/GRDBTests.xcscheme

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,6 @@
2020
ReferencedContainer = "container:GRDBTests.xcodeproj">
2121
</BuildableReference>
2222
</BuildActionEntry>
23-
<BuildActionEntry
24-
buildForTesting = "YES"
25-
buildForRunning = "NO"
26-
buildForProfiling = "NO"
27-
buildForArchiving = "NO"
28-
buildForAnalyzing = "NO">
29-
<BuildableReference
30-
BuildableIdentifier = "primary"
31-
BlueprintIdentifier = "564A2095226B8E18001F64F1"
32-
BuildableName = "GRDBTestsEncrypted.xctest"
33-
BlueprintName = "GRDBTestsEncrypted"
34-
ReferencedContainer = "container:GRDBTests.xcodeproj">
35-
</BuildableReference>
36-
</BuildActionEntry>
3723
</BuildActionEntries>
3824
</BuildAction>
3925
<TestAction
@@ -61,16 +47,6 @@
6147
ReferencedContainer = "container:GRDBTests.xcodeproj">
6248
</BuildableReference>
6349
</TestableReference>
64-
<TestableReference
65-
skipped = "NO">
66-
<BuildableReference
67-
BuildableIdentifier = "primary"
68-
BlueprintIdentifier = "564A2095226B8E18001F64F1"
69-
BuildableName = "GRDBTestsEncrypted.xctest"
70-
BlueprintName = "GRDBTestsEncrypted"
71-
ReferencedContainer = "container:GRDBTests.xcodeproj">
72-
</BuildableReference>
73-
</TestableReference>
7450
</Testables>
7551
</TestAction>
7652
<LaunchAction
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1340"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "NO"
12+
buildForProfiling = "NO"
13+
buildForArchiving = "NO"
14+
buildForAnalyzing = "NO">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "564A2095226B8E18001F64F1"
18+
BuildableName = "GRDBTestsEncrypted.xctest"
19+
BlueprintName = "GRDBTestsEncrypted"
20+
ReferencedContainer = "container:GRDBTests.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
<TestableReference
32+
skipped = "NO">
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "564A2095226B8E18001F64F1"
36+
BuildableName = "GRDBTestsEncrypted.xctest"
37+
BlueprintName = "GRDBTestsEncrypted"
38+
ReferencedContainer = "container:GRDBTests.xcodeproj">
39+
</BuildableReference>
40+
</TestableReference>
41+
</Testables>
42+
</TestAction>
43+
<LaunchAction
44+
buildConfiguration = "Debug"
45+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
46+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
47+
launchStyle = "0"
48+
useCustomWorkingDirectory = "NO"
49+
ignoresPersistentStateOnLaunch = "NO"
50+
debugDocumentVersioning = "YES"
51+
debugServiceExtension = "internal"
52+
allowLocationSimulation = "YES">
53+
</LaunchAction>
54+
<ProfileAction
55+
buildConfiguration = "Release"
56+
shouldUseLaunchSchemeArgsEnv = "YES"
57+
savedToolIdentifier = ""
58+
useCustomWorkingDirectory = "NO"
59+
debugDocumentVersioning = "YES">
60+
</ProfileAction>
61+
<AnalyzeAction
62+
buildConfiguration = "Debug">
63+
</AnalyzeAction>
64+
<ArchiveAction
65+
buildConfiguration = "Release"
66+
revealArchiveInOrganizer = "YES">
67+
</ArchiveAction>
68+
</Scheme>

Tests/CocoaPods/SQLCipher4/GRDBTests.xcodeproj/xcshareddata/xcschemes/GRDBTests.xcscheme

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,6 @@
2020
ReferencedContainer = "container:GRDBTests.xcodeproj">
2121
</BuildableReference>
2222
</BuildActionEntry>
23-
<BuildActionEntry
24-
buildForTesting = "YES"
25-
buildForRunning = "NO"
26-
buildForProfiling = "NO"
27-
buildForArchiving = "NO"
28-
buildForAnalyzing = "NO">
29-
<BuildableReference
30-
BuildableIdentifier = "primary"
31-
BlueprintIdentifier = "564A2095226B8E18001F64F1"
32-
BuildableName = "GRDBTestsEncrypted.xctest"
33-
BlueprintName = "GRDBTestsEncrypted"
34-
ReferencedContainer = "container:GRDBTests.xcodeproj">
35-
</BuildableReference>
36-
</BuildActionEntry>
3723
</BuildActionEntries>
3824
</BuildAction>
3925
<TestAction
@@ -61,16 +47,6 @@
6147
ReferencedContainer = "container:GRDBTests.xcodeproj">
6248
</BuildableReference>
6349
</TestableReference>
64-
<TestableReference
65-
skipped = "NO">
66-
<BuildableReference
67-
BuildableIdentifier = "primary"
68-
BlueprintIdentifier = "564A2095226B8E18001F64F1"
69-
BuildableName = "GRDBTestsEncrypted.xctest"
70-
BlueprintName = "GRDBTestsEncrypted"
71-
ReferencedContainer = "container:GRDBTests.xcodeproj">
72-
</BuildableReference>
73-
</TestableReference>
7450
</Testables>
7551
</TestAction>
7652
<LaunchAction

0 commit comments

Comments
 (0)