forked from rarias/nixos-riscv
21 lines
481 B
Awk
21 lines
481 B
Awk
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}
|
|
|