nixos-riscv/fpga/verify.awk

21 lines
417 B
Awk
Raw Normal View History

2024-08-26 17:14:53 +02:00
BEGIN {
bootrom_ok = 0
opensbi_ok = 0
test_ok = 0
}
/RBOOTROM/ { bootrom_ok = 1 }
/^OpenSBI v/ { opensbi_ok = 1 }
/^TEST-RESULT-OK/ { test_ok = 1 }
{ printf "line> "; print }
END {
printf "Test summary:\n"
printf " Bootrom: %s\n", bootrom_ok ? "OK" : "FAIL";
printf " OpenSBI: %s\n", opensbi_ok ? "OK" : "FAIL";
2024-08-27 14:32:39 +02:00
printf " Result: %s\n", test_ok ? "OK" : "FAIL";
2024-08-26 17:14:53 +02:00
2024-08-27 14:32:39 +02:00
if (test_ok)
2024-08-26 17:14:53 +02:00
exit 0;
else
exit 1;
}