Skip to content

Commit c04c5ec

Browse files
committed
chore: wip
1 parent 5342b0e commit c04c5ec

File tree

5 files changed

+49
-87
lines changed

5 files changed

+49
-87
lines changed

.env.sample

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ export AVD_MANAGER_FULL_PATH=/home/yougotthis/Android/Sdk/cmdline-tools/latest/b
77
export EMULATOR_FULL_PATH=/home/yougotthis/Android/Sdk/emulator/emulator
88
export ANDROID_SYSTEM_IMAGE="system-images;android-35;google_atd;x86_64"
99
export IOS_APP_PATH_PREFIX=just_not_empty
10-
export IOS_FIRST_SIMULATOR=just_not_empty
11-
export IOS_SECOND_SIMULATOR=just_not_empty
12-
export IOS_THIRD_SIMULATOR=just_not_empty
13-
export IOS_FOURTH_SIMULATOR=just_not_empty
14-
export IOS_FIFTH_SIMULATOR=just_not_empty
15-
export IOS_SIXTH_SIMULATOR=just_not_empty
16-
export IOS_SEVENTH_SIMULATOR=just_not_empty
17-
export IOS_EIGHTH_SIMULATOR=just_not_empty
18-
export IOS_NINTH_SIMULATOR=just_not_empty
19-
export IOS_TENTH_SIMULATOR=just_not_empty
20-
export IOS_ELEVENTH_SIMULATOR=just_not_empty
21-
export IOS_TWELFTH_SIMULATOR=just_not_empty
10+
export IOS_1_SIMULATOR=just_not_empty
11+
export IOS_2_SIMULATOR=just_not_empty
12+
export IOS_3_SIMULATOR=just_not_empty
13+
export IOS_4_SIMULATOR=just_not_empty
14+
export IOS_5_SIMULATOR=just_not_empty
15+
export IOS_6_SIMULATOR=just_not_empty
16+
export IOS_7_SIMULATOR=just_not_empty
17+
export IOS_8_SIMULATOR=just_not_empty
18+
export IOS_9_SIMULATOR=just_not_empty
19+
export IOS_10_SIMULATOR=just_not_empty
20+
export IOS_11_SIMULATOR=just_not_empty
21+
export IOS_12_SIMULATOR=just_not_empty

.github/workflows/ios-regression.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
description: 'ipa url to test'
99
required: true
1010
type: string
11-
default: https://oxen.rocks/session-foundation/session-ios/master/session-ios-20250122T233019Z-55779b062-sim.tar.xz
11+
default: https://oxen.rocks/session-foundation/session-ios/dev/session-ios-20250403T021527Z-c1d2ffbc4-sim.tar.xz
1212

1313
RISK:
1414
description: 'risks to target'
@@ -34,7 +34,7 @@ on:
3434
description: 'branch to checkout'
3535
required: true
3636
type: string
37-
default: ci-ios
37+
default: kick-member-test
3838

3939
# SHARD_NUMBER:
4040
# description: 'shard number'
@@ -113,18 +113,18 @@ jobs:
113113
AVD_MANAGER_FULL_PATH: '/Users/emilyburton/Library/Android/sdk/cmdline-tools/latest/bin/avdmanager'
114114
ANDROID_SYSTEM_IMAGE: 'system-images;android-35;google_atd;x86_64'
115115
EMULATOR_FULL_PATH: '/Users/emilyburton/Library/Android/sdk/emulator/emulator'
116-
IOS_FIRST_SIMULATOR: '49651A15-3E14-4BAF-8B8E-0C630C35B8DD'
117-
IOS_SECOND_SIMULATOR: '7CA21E47-56AC-4B76-82A4-1D5199515F38'
118-
IOS_THIRD_SIMULATOR: 'FE1DEDC7-D530-41E7-9B38-86ED2DDB97CD'
119-
IOS_FOURTH_SIMULATOR: '561C621C-2CEF-4FCC-87B7-E6221718D15C'
120-
IOS_FIFTH_SIMULATOR: '5AA87E03-5831-4209-87A0-21E5ECDC490F'
121-
IOS_SIXTH_SIMULATOR: '6FB10AF3-3970-46BA-B414-1206AA4E726D'
122-
IOS_SEVENTH_SIMULATOR: '0BDA36C0-83F4-46DF-ADC9-FF30E969D4BD'
123-
IOS_EIGHTH_SIMULATOR: '1C61A0B6-3085-46B6-9B2E-6E9A1B594944'
124-
IOS_NINTH_SIMULATOR: '7C69D129-BD40-4BC0-9A0D-6A7E990F23E8'
125-
IOS_TENTH_SIMULATOR: '275E0C5B-2458-4490-831D-4CE86C8EC704'
126-
IOS_ELEVENTH_SIMULATOR: 'EA5C5BCB-1E3E-4FFC-88BB-8D1DE354BC3B'
127-
IOS_TWELFTH_SIMULATOR: '41514F87-DC49-4C81-B60C-03D1F8653A42'
116+
IOS_1_SIMULATOR: '4A75A0E1-9EDE-4169-93C3-DCE0F0C7664F'
117+
IOS_2_SIMULATOR: 'ACB6A587-8556-4EA0-87CF-4326A9A22051'
118+
IOS_3_SIMULATOR: 'D90B2AE2-FF30-49BE-9370-B789BAEED3BB'
119+
IOS_4_SIMULATOR: '59BD1CA4-7A8D-40FB-BAC7-CC99500644E0'
120+
IOS_5_SIMULATOR: '064F4F80-B81C-4B72-9715-43CD18975139'
121+
IOS_6_SIMULATOR: '56D8BA2F-BA0C-4D8F-8E5B-FD928E2C7C66'
122+
IOS_7_SIMULATOR: '012D6656-D6DE-4932-A460-72F5629EB2E0'
123+
IOS_8_SIMULATOR: 'D66CBD9C-7550-4055-8504-95F0AE700617'
124+
IOS_9_SIMULATOR: '84884861-F8EF-4481-A001-B403F2649FCF'
125+
IOS_10_SIMULATOR: 'C0EE6A21-044D-4B6E-B9A5-7AB977ADF305'
126+
IOS_11_SIMULATOR: 'B8E78B21-1432-41F3-A398-DE4FF8CF9DED'
127+
IOS_12_SIMULATOR: '8214A3A2-D4E1-4AA8-BB0F-394E3A49BCFA'
128128
# echo "SHARD_NUMBER ${{ github.event.inputs.SHARD_NUMBER }}"
129129
# echo "SHARD_COUNT ${{ github.event.inputs.SHARD_COUNT }}"
130130

@@ -203,7 +203,7 @@ jobs:
203203
shell: bash
204204
run: |
205205
source ./scripts/ci.sh
206-
start_simulators_from_env_iOS
206+
stop_simulators_from_env_iOS
207207
- name: List all tests
208208
run: |
209209
cd forked-session-appium

run/test/specs/utils/capabilities_ios.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ const sharediOSCapabilities: AppiumXCUITestCapabilities = {
3333
} as AppiumXCUITestCapabilities;
3434

3535
const envVars = [
36-
'IOS_FIRST_SIMULATOR',
37-
'IOS_SECOND_SIMULATOR',
38-
'IOS_THIRD_SIMULATOR',
39-
'IOS_FOURTH_SIMULATOR',
40-
'IOS_FIFTH_SIMULATOR',
41-
'IOS_SIXTH_SIMULATOR',
42-
'IOS_SEVENTH_SIMULATOR',
43-
'IOS_EIGHTH_SIMULATOR',
44-
'IOS_NINTH_SIMULATOR',
45-
'IOS_TENTH_SIMULATOR',
46-
'IOS_ELEVENTH_SIMULATOR',
47-
'IOS_TWELFTH_SIMULATOR',
36+
'IOS_1_SIMULATOR',
37+
'IOS_2_SIMULATOR',
38+
'IOS_3_SIMULATOR',
39+
'IOS_4_SIMULATOR',
40+
'IOS_5_SIMULATOR',
41+
'IOS_6_SIMULATOR',
42+
'IOS_7_SIMULATOR',
43+
'IOS_8_SIMULATOR',
44+
'IOS_9_SIMULATOR',
45+
'IOS_10_SIMULATOR',
46+
'IOS_11_SIMULATOR',
47+
'IOS_12_SIMULATOR',
4848
] as const;
4949

5050
function getIOSSimulatorUUIDFromEnv(index: CapabilitiesIndexType): string {

run/test/specs/utils/test_setup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ cd ~/Library/Android/sdk
2121
./emulator/emulator -avd Pixel_4_API_30_2
2222
2323
IOS
24-
open -a simulator --args -IOS_FIRST_SIMULATOR -no-boot-anim
25-
open -a simulator --args -IOS_SECOND_SIMULATOR -no-boot-anim
24+
open -a simulator --args -IOS_1_SIMULATOR -no-boot-anim
25+
open -a simulator --args -IOS_2_SIMULATOR -no-boot-anim
2626
2727
run branch on emulator one
2828
run branch on emulator two

scripts/ci.sh

Lines changed: 8 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
2+
set -x
33
# Android functions
44

55
ARCH="x86_64"
@@ -103,67 +103,46 @@ function start_with_snapshots() {
103103
SIMULATOR_DEVICE="iPhone 15 Pro Max"
104104
SIMULATOR_OS="18.2"
105105

106-
# Define an array of uppercase words for simulator names
107-
NUMBER_WORDS=("FIRST" "SECOND" "THIRD" "FOURTH" "FIFTH" "SIXTH" "SEVENTH" "EIGHTH" "NINTH" "TENTH" "ELEVENTH" "TWELFTH")
108-
109106
# Function to boot simulators from environment variables
110107
function start_simulators_from_env_iOS() {
111108
echo "Starting iOS simulators from environment variables"
112109

113-
set -x
114110

115111
for i in {1..12}; do
116-
simulator_label=${NUMBER_WORDS[$((i - 1))]}
112+
simulator_label=$i
117113
env_var="IOS_${simulator_label}_SIMULATOR"
118114
simulator_udid=$(printenv "$env_var")
119115

120116
echo "Iteration $i: Label: $simulator_label, Env var: $env_var, UDID: $simulator_udid"
121117

122118
if [[ -n "$simulator_udid" ]]; then
123-
# Check if the simulator is already booted
124-
booted=$(xcrun simctl list devices booted | grep "$simulator_udid")
125-
echo "Current booted status for $simulator_udid: $booted"
126-
127-
if [[ -n "$booted" ]]; then
128-
echo "$simulator_label simulator ($simulator_udid) is already booted. Attempting shutdown..."
129-
shutdown_output=$(xcrun simctl shutdown "$simulator_udid" 2>&1)
130-
shutdown_status=$?
131-
echo "Shutdown command output: $shutdown_output"
132-
echo "Shutdown command exit code: $shutdown_status"
133-
if [[ $shutdown_status -ne 0 ]]; then
134-
echo "Error: Shutdown command failed for $simulator_udid"
135-
exit 100
136-
fi
137-
sleep 5
138-
fi
139-
119+
140120
echo "Booting $simulator_label simulator: $simulator_udid"
141121
boot_output=$(xcrun simctl boot "$simulator_udid" 2>&1)
142122
boot_status=$?
143123
echo "Boot command output: $boot_output"
144124
echo "Boot command exit code: $boot_status"
145125
if [[ $boot_status -ne 0 ]]; then
146126
echo "Error: Boot command failed for $simulator_udid"
147-
exit 101
127+
return 101
148128
fi
149129
sleep 5
150130

151131
booted=$(xcrun simctl list devices booted | grep "$simulator_udid")
152132
echo "Post-boot status for $simulator_udid: $booted"
153133
if [[ -z "$booted" ]]; then
154134
echo "Error: Simulator $simulator_udid did not boot successfully."
155-
exit 102
135+
return 102
156136
fi
157137
else
158138
echo "Error: $simulator_label simulator (env var $env_var) is not set"
159-
exit 104
139+
return 104
160140
fi
161141
done
162142

163143
echo "Opening iOS Simulator app..."
164144
open -a Simulator
165145

166-
set +x
167146
}
168147

169148

@@ -173,30 +152,13 @@ function start_simulators_from_env_iOS() {
173152
# Function to start the Appium server
174153
function start_appium_server() {
175154
echo "Starting Appium server..."
176-
cd forked-session-appium || exit 110
155+
cd forked-session-appium || return 110
177156
start-server
178157
}
179158

180159
# Function to stop running simulators
181160
function stop_simulators_from_env_iOS() {
182161
echo "Stopping iOS simulators from environment variables..."
162+
xcrun simctl shutdown all
183163

184-
for i in {1..12}; do
185-
simulator_label=${NUMBER_WORDS[$((i - 1))]}
186-
env_var="IOS_${simulator_label}_SIMULATOR"
187-
simulator_udid=$(printenv "$env_var")
188-
189-
if [[ -n "$simulator_udid" ]]; then
190-
# Check if the simulator is running
191-
if xcrun simctl list devices booted | grep -q "$simulator_udid"; then
192-
echo "Stopping $simulator_label simulator: $simulator_udid"
193-
xcrun simctl shutdown "$simulator_udid"
194-
else
195-
echo "$simulator_label simulator is not running or does not exist."
196-
exit 120
197-
fi
198-
else
199-
echo "Skipping $simulator_label simulator (not set)"
200-
fi
201-
done
202164
}

0 commit comments

Comments
 (0)