-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add generator to generate tests that service client headers are buildable #3391
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
Conversation
2e09fd8
to
8d965af
Compare
45fef39
to
3c54f1c
Compare
cfgInit.shouldDisableIMDS = true; | ||
Aws::Client::ClientConfiguration config(cfgInit); | ||
AWS_UNREFERENCED_PARAM(config); | ||
// auto pClient = Aws::MakeUnique<{{ t_namespace }}::{{ t_cpp_name }}>("{{ t_test_name }}", config); |
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.
commented out because CodeCatalyst client is not default constructible.
TODO: fix that client or this test generation.
3c54f1c
to
b3704c6
Compare
|
||
for root, dirs, files in os.walk(service_client_include_dir): | ||
for filename in files: | ||
if filename.endswith(".h") or filename.endswith(".hpp"): |
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.
do any of our files actually end with .hpp?
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.
nope, but if ever anyone is going to add an .hpp - this generator will pick them up.
with open(f"{test_file_path}", mode="w", encoding="utf-8") as rendered_test_f: | ||
rendered_test_f.write(rendered_test) | ||
|
||
return 0 |
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.
nit: why return 0 if we dont return any other value? maybe prefer void
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.
just following the pattern of "generator return 0" on success, and throws an exception on error (and something such as return -1 in the middle).
b3704c6
to
109dde0
Compare
Issue #, if available:
#3389
Description of changes:
Prevent such issues by a include all headers test.
Check all that applies:
Check which platforms you have built SDK on to verify the correctness of this PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.