diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8101096..7f5112bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -523,15 +523,18 @@ jobs: for attempt in 1 2; do cleanup 2>/dev/null || true - # Launch display helper from shell (non-sandboxed) + # Launch display helper from shell (non-sandboxed). + # Use --start-delay-ms instead of --start-path because the XCTest + # runner is sandboxed and can't write to /tmp/ for the start signal. + # 10s delay gives the test time to capture baseline render stats. "$HELPER_PATH" \ --modes "1920x1080,1728x1117,1600x900,1440x810" \ --ready-path "$DISPLAY_READY" \ --display-id-path "$DISPLAY_ID_PATH" \ - --start-path "$DISPLAY_START" \ --done-path "$DISPLAY_DONE" \ --iterations 40 \ --interval-ms 40 \ + --start-delay-ms 10000 \ > "$HELPER_LOG" 2>&1 & HELPER_PID=$! @@ -619,7 +622,7 @@ jobs: # Write manifests so test can find the pre-launched state MANIFEST_PATH="/tmp/cmux-ui-test-display-harness.json" cat >"$MANIFEST_PATH" < 0 ? intervalArgument.integerValue : 40; useconds_t intervalMicros = (useconds_t)(MAX(1, intervalMs) * 1000); + NSString *startDelayArgument = argumentValue(arguments, @"--start-delay-ms"); + NSInteger startDelayMs = startDelayArgument.length > 0 ? startDelayArgument.integerValue : 0; unsigned int width = 0; unsigned int height = 0; @@ -229,7 +231,9 @@ int main(int argc, const char *argv[]) { if (iterations > 0 && modeSpecs.count > 1) { dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{ - if (startPath.length > 0) { + if (startDelayMs > 0) { + usleep((useconds_t)(startDelayMs * 1000)); + } else if (startPath.length > 0) { while (![[NSFileManager defaultManager] fileExistsAtPath:startPath]) { usleep(20 * 1000); }