Skip to content

Fix the tests under a Dev.xcconfig, and add smoke-test and map - #596

Merged
hannesa2 merged 3 commits into
gitx:masterfrom
goneng:fix-tests-under-a-dev-xcconfig
Sep 8, 2026
Merged

hannesa2 merged 3 commits into
gitx:masterfrom
goneng:fix-tests-under-a-dev-xcconfig

Conversation

@goneng

@goneng goneng commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

Three Makefile changes: the test targets could not run with a Dev.xcconfig present,
nothing covered the signing configuration that ships, and
the target list gave no hint which target to run.

  • Pair the hardened runtime with the ad-hoc identity the test targets pin
  • Add smoke-test, running the packaged gitx tool from a release archive
  • Add map, graphing the target dependencies from make's own rule database

Test plan:

Pair the hardened runtime with the code-signing identity the three test
targets already pin, so that the two settings cannot disagree.

The targets pass CODE_SIGN_IDENTITY="-" but leave the hardened runtime
to the xcconfig. A Dev.xcconfig turns it on for every configuration, and
the hardened runtime refuses to map an ad-hoc signed framework into the
test host, so the run aborted on MGScopeBar before reaching a test.
Without a Dev.xcconfig the project turns it on for Release only, which
the tests never build, so this is the configuration CI already runs.

- Add TEST_SETTINGS, pinning the ad-hoc identity and the hardened
  runtime off together
- Point unit-test, ui-test and all-tests at it
Run the packaged gitx tool out of a release archive, so that a bundle
whose helper cannot load the frameworks beside it fails a target here
rather than on a user's machine.

The hardened runtime is turned on for Release only, and the team
mismatch that trips library validation needs a real signing identity.
The test targets build Debug and sign ad-hoc, so nothing in the suite
assembles the configuration that ships, which is how the tool reached
users unable to load ObjectiveGit until gitx#595.

- Add smoke-test, running Contents/Resources/gitx from the archive
- Read the tool's output rather than its exit status, since it exits 1
  after printing the version either way
- Refuse a bundle without the hardened runtime, which asking for `dmg`
  in the same invocation would otherwise leave the check passing on
Read the edges out of make's own rule database, so that the answer to
which target pulls in which comes from the rules themselves and cannot
drift from them.

The help text lists eighteen targets in file order with nothing to say
which of them produces a running application, and a hand-drawn graph
would only be right until the next target arrives.

- Add scripts/make-target-map.sh, extracting the edges from `make -pnr`
  and printing each target with what it pulls in beneath it
- Add the `map` target that runs it
- Label the nodes with the help text, which stays a label rather than
  the source of the graph
@goneng
goneng marked this pull request as ready for review September 7, 2026 22:19
@hannesa2
hannesa2 merged commit 067b964 into gitx:master Sep 8, 2026
3 checks passed
@goneng
goneng deleted the fix-tests-under-a-dev-xcconfig branch September 8, 2026 05:47
@hannesa2

Copy link
Copy Markdown
Contributor

I make right now a new release. Keep finger crossed 🤞 that we don't introduce new issues
@goneng

@goneng

goneng commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator Author

I make right now a new release. Keep finger crossed 🤞 that we don't introduce new issues @goneng

Sure, sure - "what could possibly g..."

@hannesa2 hannesa2 added the test Test related label Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants