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

Use lang tester's ignore-if to avoid encoding configuration in test names #953

Merged
merged 3 commits into from
Feb 5, 2024

Conversation

ltratt
Copy link
Contributor

@ltratt ltratt commented Feb 1, 2024

This PR, in three stages, removes the need to encode "only run this C test if X" using lang_tester's new ignore-if. Note that we have to use set_env so that the environment variables are available to ignore-if. Maybe lang_tester should grow the ability to have an environment just to run ignore-if commands in -- but that's a worry for another day.

We can now use -- with a suitably set environment variable --
lang_tester's `ignore_if` to avoid having to encode which tests we want
to run in filenames.
@@ -1,3 +1,4 @@
// ignore-if: test YK_JIT_COMPILER != "yk"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just pick up YKD_NEW_CODEGEN here?

https://ykjit.github.io/yk/dev/runtime_config.html#ykd_new_codegen

Copy link
Contributor Author

Choose a reason for hiding this comment

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

YKD_NEW_CODEGEN is like calling a road "new road" -- when you build another road should it be called "newer road"? The directory structure in ykrt/compiler gives these things names, so we should IMHO use those names and not a boolean NEW_CODEGEN env var.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why don't we push a commit to rename the existing YKD_NEW_CODEGEN env var and use that instead? I don't see any benefit to having two environment variables for the same purpose.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's probably a good idea, but the YK_ precedent is already present in the test infrastructure, so renaming YKD_NEW_CODEGEN feels like a separate PR to me (and best done by someone who knows exactly what YKD_NEW_CODEGEN does).

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree. So this PR should follow precedent, and a follow up PR can do the rename.

Copy link
Contributor

Choose a reason for hiding this comment

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

(I can do the rename)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you!

@vext01
Copy link
Contributor

vext01 commented Feb 2, 2024

Great. Simplifies a lot of stuff!

Just one small comment.

@ltratt
Copy link
Contributor Author

ltratt commented Feb 2, 2024

@vext01 I think this is OK to merge now?

@vext01
Copy link
Contributor

vext01 commented Feb 2, 2024

I meant this PR should use the existing env var in the interim, but don't worry, I'll sort it in a follow up PR :P

@vext01 vext01 added this pull request to the merge queue Feb 2, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 2, 2024
@vext01
Copy link
Contributor

vext01 commented Feb 2, 2024

Is it possible that some bad logic is causing all tests to be run if YKD_NEW_CODEGEN=1?

@vext01
Copy link
Contributor

vext01 commented Feb 2, 2024

Right, every non-new-codegen test needs to be ignored if YK_JIT_COMPILER == "yk", right?

@ltratt
Copy link
Contributor Author

ltratt commented Feb 2, 2024

Right, every non-new-codegen test needs to be ignored if YK_JIT_COMPILER == "yk", right?

Hmm, yeah. Of course I didn't shake that out in local testing because I didn't turn that feature flag on. Oops. Let me rethink.

@ltratt ltratt mentioned this pull request Feb 2, 2024
@ltratt
Copy link
Contributor Author

ltratt commented Feb 2, 2024

@vext01 Hopefully that new commit fixes things.

@vext01
Copy link
Contributor

vext01 commented Feb 5, 2024

I can live with it.

Please squash.

@ltratt ltratt force-pushed the use_lang_tester_ignore_if branch from a82a5af to 7abb8a6 Compare February 5, 2024 10:39
@ltratt
Copy link
Contributor Author

ltratt commented Feb 5, 2024

Squashed.

@vext01 vext01 added this pull request to the merge queue Feb 5, 2024
Merged via the queue into ykjit:master with commit 4127721 Feb 5, 2024
2 checks passed
@ltratt ltratt deleted the use_lang_tester_ignore_if branch March 30, 2024 09:15
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