Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rework tests #157

Merged
merged 1 commit into from
Dec 15, 2024
Merged

rework tests #157

merged 1 commit into from
Dec 15, 2024

Conversation

marler8997
Copy link
Owner

@marler8997 marler8997 commented Dec 15, 2024

Before this PR, the zigup tests were a single program that ran from start to finish. There was no isolation between tests and no way to start anywhere other than the beginning. This change turns all the tests into steps in Zig's build system. This allows us to leverage things like the cache to prevent re-running the same steps, zig's build parallelism and the build's error-reporting mechanisms.

The general technique I've used here is that every test has its own output directory in the cache to store its results (i.e. any zig compilers that were fetched). In addition, every test can also be given an "input environment", which would be an output directory from a previously executed test. This allows you to branch multiple tests from the same state/filesystem and prevents re-executing the same steps.

@marler8997 marler8997 force-pushed the tests branch 16 times, most recently from 3e83fbe to 19153ca Compare December 15, 2024 22:53
@marler8997 marler8997 marked this pull request as ready for review December 15, 2024 22:55
@marler8997 marler8997 merged commit a1226e6 into master Dec 15, 2024
3 checks passed
@marler8997 marler8997 deleted the tests branch December 16, 2024 06:08
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