Update mechanism to kill the desired QEMU process.

This commit is contained in:
Dylan Bautista 2025-02-19 12:55:57 +01:00
parent c04f8c1234
commit 10a6806fad

20
verify-bench2.awk Normal file
View File

@ -0,0 +1,20 @@
BEGIN {
bench_success_flag = 0
}
function terminate_qemu() {
system("kill $(cat qemu.pid)");
if (bench_success_flag) {
print "Benchmark execution has finished successfully. \n"
exit 0;
} else {
print "Benchmark execution has been interrupted by an error. \n"
exit 1;
}
}
/^BENCHMARK-SUCESS-STATE/ { bench_success_flag = 1; terminate_qemu()}
/^BENCHMARK-ERROR-STATE/ { bench_success_flag = 0; terminate_qemu()}
{print $0}