Skip to content

Conversation

@plemarquand
Copy link
Contributor

We were checking the mtime of the <ProductName>.swift-testing binary to determine if it was produced by the latest build. The issue with this is that when you run tests over and over without making any code changes the binary is never rewritten because it is already up to date.

Instead of checking the mtime of the .swift-testing binary in the build folder to determine if it was produced, use the build description.json and check the builtTestProducts list to see if the legacy .swift-testing binary was produced by the latest build.

We were checking the `mtime` of the `<ProductName>.swift-testing` binary
to determine if it was produced by the latest build. The issue with this
is that when you run tests over and over without making any code changes
the binary is never rewritten because it is already up to date.

Instead of checking the `mtime` of the .swift-testing binary in the build
folder to determine if it was produced, use the build `description.json`
and check the builtTestProducts list to see if the legacy
`.swift-testing` binary was produced by the latest build.
Copy link
Contributor

@adam-fowler adam-fowler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@award999
Copy link
Contributor

award999 commented Aug 8, 2024

I tested this PR and confirm it fixes the issue I was seeing, and the unified binary approach still works too

@plemarquand plemarquand merged commit 9f8cf10 into swiftlang:main Aug 8, 2024
@plemarquand plemarquand deleted the build-description-to-check-unified-binary branch August 8, 2024 17:37
@award999
Copy link
Contributor

award999 commented Aug 8, 2024

Verified

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.

3 participants