Skip to content

build_and_test: --run, NOT RUN for test-runner failures, --no-parallel - #121

Merged
conorluddy merged 2 commits into
mainfrom
feat/build-run-and-test-runner-failures
Nov 5, 2026
Merged

conorluddy merged 2 commits into
mainfrom
feat/build-run-and-test-runner-failures

Conversation

@conorluddy

Copy link
Copy Markdown
Owner

Why

Measuring the skill for the promo video found three gaps in build_and_test.py:

  1. Getting from build to a running app took 3-4 calls plus digging through DerivedData.
  2. Parallel test clones that failed to boot printed Tests: FAIL (0/2 passed), which looks like the tests themselves are broken (Principle 2).
  3. Hints suggested --simulator 'iPhone 16 Pro', which isn't available on current Xcode.

Changes

  • --run (build mode only; refused in one line with --test): BuildRunner.get_built_app() reads -showBuildSettings -json and takes the .app target. get_destination_udid() matches name and OS against simctl; the runtime loop is now shared with _find_simulator_os. Then it calls SimulatorBooter.boot(wait_ready), AppLauncher.install/launch. Prints Launched: <bundle> on <device> (pid N). Each failure is one line naming the step that failed and exits 1. --json adds run.
  • NOT RUN: is_runner_failure() returns true when 0 tests passed and every error is a runner-start message. Output: Tests: NOT RUN (test runner couldn't start on the simulator) + hint --no-parallel. --json adds "status": "not_run".
  • --no-parallel → -parallel-testing-enabled NO.
  • Hints use --simulator '<name>' and point to sim_list.py.
  • Docs: SKILL.md, README.

Verification

  • pytest tests/: 339 passed (new test_build_run.py, test_build_reporter.py); black and ruff clean on scripts/.
  • Live on a copy of a real app with iPhone 17 Pro: --run printed Launched: … (pid N) on both a booted and a shut-down simulator; --run --json includes run; --run --test was refused in one line; --test and --test --no-parallel both passed 5/5.
  • Not reproduced: the clone-boot failure didn't happen this time, so NOT RUN is covered by unit tests using the real messages. The first --run returned "launch failed" once and I couldn't reproduce it after that; no retry added.

@conorluddy
conorluddy merged commit 30d2ea4 into main Nov 5, 2026
1 check passed
@conorluddy
conorluddy deleted the feat/build-run-and-test-runner-failures branch November 5, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant