Skip to content

Commit 64e7277

Browse files
committed
chore: enable debug logging for iOS e2e runs
1 parent 827ef0a commit 64e7277

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/e2e-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ jobs:
110110
timeout-minutes: 30
111111
if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main') || (github.event_name == 'workflow_dispatch' && (github.event.inputs.platform == 'all' || github.event.inputs.platform == 'ios')) }}
112112
env:
113+
HARNESS_DEBUG: true
113114
DEBUG: 'Metro:*'
114115
steps:
115116
- name: Checkout code
@@ -349,6 +350,7 @@ jobs:
349350
timeout-minutes: 30
350351
if: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.platform == 'all' || github.event.inputs.platform == 'ios') }}
351352
env:
353+
HARNESS_DEBUG: true
352354
DEBUG: 'Metro:*'
353355
steps:
354356
- name: Checkout code

packages/platform-ios/src/instance.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ import {
2222
} from './app-monitor.js';
2323
import { assertLibimobiledeviceInstalled } from './libimobiledevice.js';
2424
import { HarnessAppPathError } from './errors.js';
25+
import { logger } from '@react-native-harness/tools';
2526
import fs from 'node:fs';
2627

28+
const iosInstanceLogger = logger.child('ios-instance');
29+
2730
const getHarnessAppPath = (): string => {
2831
const appPath = process.env.HARNESS_APP_PATH;
2932

@@ -56,15 +59,30 @@ export const getAppleSimulatorPlatformInstance = async (
5659
const simulatorStatus = await simctl.getSimulatorStatus(udid);
5760
let startedByHarness = false;
5861

62+
iosInstanceLogger.debug(
63+
'resolved iOS simulator %s with status %s',
64+
udid,
65+
simulatorStatus
66+
);
67+
5968
if (
6069
!simctl.isBootedSimulatorStatus(simulatorStatus) &&
6170
!simctl.isBootingSimulatorStatus(simulatorStatus)
6271
) {
72+
iosInstanceLogger.debug(
73+
'booting iOS simulator %s from status %s',
74+
udid,
75+
simulatorStatus
76+
);
6377
await simctl.bootSimulator(udid);
6478
startedByHarness = true;
6579
}
6680

6781
if (!simctl.isBootedSimulatorStatus(simulatorStatus)) {
82+
iosInstanceLogger.debug(
83+
'waiting for iOS simulator %s to finish booting',
84+
udid
85+
);
6886
await simctl.waitForBoot(udid);
6987
}
7088

0 commit comments

Comments
 (0)