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

testing: don't cd to git root dir in lit #3953

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

superlopuh
Copy link
Member

This change in configuration was motivated by the lack of detection of missing __init__.py files in the project. We now have a ruff check for this (#3945), but in my changing the config, I found a number of other issues stemming from the cd ../.. in the preamble to the tests. One is that for some reason files with no RUN lines aren't detected with the preamble. I fixed the broken tests that weren't run in a separate PR (#3944), so this is just about making the config change and making minor fixes to remaining files.

@superlopuh superlopuh added the testing PRs that modify tests label Feb 24, 2025
@superlopuh superlopuh self-assigned this Feb 24, 2025
Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -19,7 +21,9 @@
ctx.register_dialect(n, f)

# Open the IRDL description of cmath, parse it
f = open("tests/filecheck/dialects/irdl/cmath.irdl.mlir")

file_path = Path(__file__).parent / "cmath.irdl.mlir"
Copy link
Member Author

Choose a reason for hiding this comment

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

a bit more resilient to where this is called from, just do relative paths

@superlopuh
Copy link
Member Author

I'm a bit stumped by this, it looks like coverage becomes flaky, and occasionally doesn't print anything to either of stdout or stderr, about once per test run. I can reproduce this locally, but it's a different file every time.

@compor
Copy link
Collaborator

compor commented Feb 24, 2025

coverage has a debug option, maybe it's worth a try? this sounds like a lock or ordering issue due to the parallel runs (might be off though)

@superlopuh superlopuh marked this pull request as draft February 24, 2025 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing PRs that modify tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants