-
Notifications
You must be signed in to change notification settings - Fork 0
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
Replace criterion with our test runner on x86 #448
base: main
Are you sure you want to change the base?
Conversation
CI is failing because the (existing) |
We should probably also use |
0a41a32
to
2904db0
Compare
2904db0
to
83a08cc
Compare
* signal handlers. This file must be included exactly once from a source file | ||
* in the main binary with IA2_DEFINE_TEST_HANDLER defined by the preprocessor. | ||
* This will define the functions and variables used by the test handler, ensure | ||
* it is initialized before main and provide access to the LOG and | ||
* CHECK_VIOLATION macros. Other files which need CHECK_VIOLATION or LOG may | ||
* include the header without defining IA2_DEFINE_TEST_HANDLER. Using |
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.
Is this still true? Do we need to define IA2_DEFINE_TEST_HANDLER
?
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.
oh right, I forgot to update the comments
auto annotation = fn_ptr_expr->getDecl()->getAttr<clang::AnnotateAttr>(); | ||
if (annotation && annotation->getAnnotation() == SKIP_WRAP_ATTR) { | ||
return; | ||
} |
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.
Is this needed for this change? Just wanted to make sure it was related and not accidental.
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.
yeah, but it's not obvious why so I should've update the documentation in ia2.h. The attribute is added to the function declaration in the Test
macro and this branch makes it so that expressions that refer to that dec (e.g. the RHS in .test = fake_criterion_##suite##_##name,
) are not rewritten. In the case of Test
it wasn't being rewritten since it's expanded from a macro, but the rewriter was printing out warnings about needing to manually rewrite that spot.
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.
Ideally I would've like to have IA2_{BEGIN,END}_NO_WRAP
apply to only things between those macros but I don't think we can annotate expressions so I don't see an obvious way to do this.
This PR also moves the test_fault_handler.h functionality into the test runner. Closes #439