Skip to content

Document build and test targets, and make local test runs self-contained by default (.test-data) - #2288

Merged
katiewasnothere merged 3 commits into
apple:mainfrom
michaelzhang114:docs/building-test-options
Oct 2, 2026
Merged

katiewasnothere merged 3 commits into
apple:mainfrom
michaelzhang114:docs/building-test-options

Conversation

@michaelzhang114

@michaelzhang114 michaelzhang114 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

Fixes #2287

A new contributor following BUILDING.md won't know what the targets do, what APP_ROOT controls, or that make integration stops the reader's running container services. They would have had to read the Makefile to get this info.

This PR expands BUILDING.md, following review feedback, fixes the underlying Makefile rough edges rather than documenting around them.

Documentation:

  • Build and test targets table, and an APP_ROOT section covering the isolated default and the erase-before-each-run behavior
  • Integration test options: PRESERVE_KERNELS, LOG_ROOT
  • A recommended iteration loop, and a note that make integration stops your services and leaves them stopped

Makefile:

  • integration now depends on container init-block, so the dependency is explicit rather than
    documented.
  • APP_ROOT defaults to an in-repo .test-data, following the existing SCRATCH_ROOT pattern, so
    test runs don't touch an installation you're using.
  • clean split into cleanbuild (the previous clean that cleans the build) and cleantest (stops services, removes
    APP_ROOT and SCRATCH_ROOT)
  • New verify target: all test integration.

Behavior changes for contributors:

  • make integration with no arguments now runs against .test-data instead of ~/Library/Application Support/com.apple.container, and erases that directory before each run. APP_ROOT= (empty) preserves the previous behavior.
  • make clean now also stops the container services and removes the test directories. Use make cleanbuild for build outputs only.
  • CI shouldn't be affected

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

Verified on macOS 26.6.2 / Xcode 27 / Swift 6.4

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 18, 2026
Comment thread BUILDING.md Resolved
Comment thread BUILDING.md Resolved
Comment thread BUILDING.md Resolved
@github-actions

github-actions Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

Code Coverage

Tier Line Coverage
Unit 25.35%
Integration 66.3%
Combined 75.79%

@michaelzhang114 michaelzhang114 changed the title docs: added details around build, test, app_root to BUILDING.md Document build and test targets, and make local test runs self-contained by default (.test-data) Sep 22, 2026
- Make the integration target's dependency on the built binaries explicit
- Default APP_ROOT to an in-repo .test-data directory
- Split clean into cleanbuild and cleantest; add a verify aggregate
- Document the new targets and variables, and gitignore the defaults
@michaelzhang114
michaelzhang114 force-pushed the docs/building-test-options branch from b42471c to b88ea84 Compare October 1, 2026 23:04
@katiewasnothere
katiewasnothere merged commit 1cd4cb3 into apple:main Oct 2, 2026
3 checks passed
@michaelzhang114
michaelzhang114 deleted the docs/building-test-options branch October 5, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: BUILDING.md does not explain the test targets, APP_ROOT, or the effects of running the integration tests

3 participants