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

Add file support for incremental compile error tests #11417

Merged
merged 2 commits into from
Apr 12, 2022

Conversation

topolarity
Copy link
Contributor

Compile error test cases can now be given as a sequence of files: foo.1.zig, foo.2.zig, foo.3.zig, etc...

As recommended in #11288, "foo.zig" may not co-exist with "foo.X.zig", and no numbers may be skipped in the test sequence. This implementation also has a couple of slight differences:

  • Test indices are 1-indexed
  • A suffix of ".X.zig" is used instead of "_X.zig"

1-indexing was chosen so that it will match update progress number "[x/N]" reported in the log. I've also updated a few other places where we report the update number, to make sure it is consistently 1-indexed.

If you'd prefer to make this 0-indexed or to use the original _ suffix, let me know and I'm happy to update the changes 👍

Compile error test cases can now be given as a sequence of files:
  - "foo.1.zig"
  - "foo.2.zig"
  - "foo.3.zig"
  - etc.

This sequence of files is tested as incremental compilation updates to a
single "foo.zig" source file.

To help avoid mistakes, we enforce strict ordering for these files.
"foo.zig" cannot co-exist with "foo.X.zig", the sequence must include
"foo.1.zig", and no numbers may be skipped.
@andrewrk
Copy link
Member

Looks great!

I would like to take you on your offer to make them zero-indexed. Mind if I hit merge and then that can be a follow-up PR along with (I'm guessing) migration of existing incremental compilation test cases to this new system?

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.

2 participants