[lldb/Utils] Serialize exit code in lldb-repro.py
authorJonas Devlieghere <jonas@devlieghere.com>
Tue, 5 May 2020 22:59:43 +0000 (15:59 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 5 May 2020 23:05:49 +0000 (16:05 -0700)
commit0274c797c65a720010aee7f40cff621cd993ba15
tree16633d6288badff274dadb38d231918e9f36a452
parentb0eb7cd2be849f0551e9b05a0cbf2d59d8c9f50d
[lldb/Utils] Serialize exit code in lldb-repro.py

After 61d5b0e66394 more shell test are expected to exit with a non-zero
status code. Because the exit status is computed in the driver and not
behind the SB API layer, reproducers don't know about it and always
return 0 unless replay failed.

This discrepancy means that these tests don't work with lldb-repro.py
and skipping them for this reason would be a pity. To solve this
problem, the script now serializes the exit code during capture and
returns that during replay.

These is an assert that ensures that replay exits with a zero exit
status to prevent replay failures from being silently ignored.
lldb/utils/lldb-repro/lldb-repro.py