Context:
When a cpp suite fails, the flow is a bit different than for any other test in our evergreen.yml file, see the cppsuite test task.
Problem:
As part of WT-9948, the script print_stack_trace.py is executed to dump the stack trace using the generate core dump, however, there is a step missing: the stack trace of each thread is not uploaded to Evergreen.
Suggested solution:
In the task dump stacktraces defined in the evergreen.yml file, the second step is s3.put which uploads the different stack traces to Evergreen and this is what we are missing.
The simple solution would be to add this s3.pu step as part of the cppsuite test task but this would lead to duplicate code. Instead, we could create a function and call it wherever we need it, i.e whenever the print_stack_trace.py is executed.