diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-04-17 12:29:41 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-04-17 12:54:47 +0200 |
commit | 0019fb5f4621c8bd37b54665689d52f87b5dd239 (patch) | |
tree | 2358c6c91439b69e374b5e0a0f77af59df475ab4 /test/end-to-end/with_serve_test_runner.py | |
parent | 112ff1861873de1eb2c40b521346ddb3db8b2fd3 (diff) | |
download | justbuild-0019fb5f4621c8bd37b54665689d52f87b5dd239.tar.gz |
main: ensure --profile is also honored for failed builds
We use a pointer to the actual Profile object to handle profiling,
if requested. For this to work, actual object needs to stay in
scope. However, we handle most of the operations, including parsing
of arguments, in a global try-catch block. In order to be able to
also correctly write a profile file outside this block, move the
scope of the Profile object to top-level in main.
While there, also improve the signature of the Profile class. That
class is only meaningful, if a profile should eventually be writting
to disk. So reflect this in the constructur. Also, once we know the
file name to write the profile to (if any), we have already parsed
the command line; so the making available of the command line to the
profile can be enforced by adding this to the constructor as well.
Co-authored-by: Denisov Maksim <denisov.maksim@huawei.com>
Diffstat (limited to 'test/end-to-end/with_serve_test_runner.py')
0 files changed, 0 insertions, 0 deletions