-
Notifications
You must be signed in to change notification settings - Fork 14
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
Generate a shared library linked to integration_test_target #124
base: main
Are you sure you want to change the base?
Conversation
390f0fc
to
59db4f7
Compare
from textwrap import dedent | ||
|
||
for config in test_configs: | ||
ns = config["suite"] |
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.
ns = config["suite"] | |
ns = get_namespace(config["suite"]) |
headers.update(config.get("includes_shlib", [])) | ||
add_headers(f, custom_headers=headers, thrift_headers=[]) | ||
|
||
from textwrap import dedent |
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.
👀
nice
with open(output_target_name, "w") as f: | ||
headers = set() | ||
for config in test_configs: | ||
headers.update(config.get("includes_shlib", [])) |
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.
Shall we just use the same "includes" for the shared lib? It'd simplify writing the test configs and the worst that'll happen is that we'll get unnecessary includes
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.
Otherwise, "includes_shlib" should be documented too
I had to deal with a similar issue this week for testing Split DWARF (dwp). The approach I went with was to create a target executable independently from the test framework, and then just tell the test framework to probe this custom binary. My change to the test framework is here: #140 |
Summary
Extend our integration test suite by linking a generated shared library to the integration_test_target. This enable us testing and validating that
oid
handles shared libraries. We can add definitions in the shared library using the keysdefinitions_shlib
andraw_definitions_shlib
.Test plan
There are no tests using the new shlib definitions, yet. However, we can see this PR is not affecting our existing tests: