mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 03:12:27 +00:00
Rather than using a credible TestBlock to capture the test assertions instead use a catch_unwind block to catch the panic and turn it into a Result<>. If block panicked or the child binary had non-zero exit then, and only then, print out the child output. This results in a clearer test output with no interleaving. Currently only test_counters is ported to this methodology to demonstrate its use. Signed-off-by: Rob Bradford <robert.bradford@intel.com>