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
tests: Add testing for xdsl_opt_main #290
Conversation
Codecov ReportBase: 86.60% // Head: 88.77% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #290 +/- ##
==========================================
+ Coverage 86.60% 88.77% +2.16%
==========================================
Files 47 48 +1
Lines 6586 6600 +14
Branches 1107 1108 +1
==========================================
+ Hits 5704 5859 +155
+ Misses 650 505 -145
- Partials 232 236 +4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This manages to get the cov for the python files through these tests.
Was that intentional?
Yes, it is the main intention of this PR to get the coverage for the |
Cool, I just couldn't directly infer by the title and the description. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I am happy; just some improvement on the doc side of the usability of these files?
Trying to think as someone that has no idea why we need this driver for.
tests/xdsl_opt/substitute_ops.xdsl
Outdated
@@ -0,0 +1,7 @@ | |||
builtin.module() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add some comments/dosctring at the start of the file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's actually impossible/hacky because I compare to this file later on.
Do you think a README in this folder would be enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
eaf2795
to
180ed6f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect! Thanks!
This PR hacks together a way to test xdsl_opt_main through some functionality of the arg parser.
Overall, I am feeling like the split of execution models (in a python interpreter vs from command line) will always come back to haunt us. I am not sure whether we actually can build something cleanly without reimplementing lit essentially.