2021-03-11 06:45:45 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
check_test () {
|
|
|
|
output=$(./$1)
|
|
|
|
found=$(echo $output | grep -c "$2")
|
|
|
|
echo "$found"
|
|
|
|
}
|
2021-03-11 07:32:31 +00:00
|
|
|
echo "checking verilator"
|
|
|
|
verilator_out=$(cd ..; ./lint-wally 2>&1)
|
|
|
|
[[ -z $verilator_out ]] && echo "verilator passed" || echo "verilator failed"
|
2021-03-11 06:45:45 +00:00
|
|
|
echo "starting Imperas rv64ic"
|
2021-03-11 06:59:50 +00:00
|
|
|
sleep 1
|
2021-03-11 17:25:20 +00:00
|
|
|
exec 3< <(check_test "sim-wally-batch" "All tests ran without failures.")
|
2021-03-11 06:45:45 +00:00
|
|
|
echo "starting busybear"
|
2021-03-11 06:59:50 +00:00
|
|
|
sleep 1
|
2021-03-11 17:25:20 +00:00
|
|
|
exec 4< <(check_test "sim-busybear-batch" "loaded 100000 instructions")
|
|
|
|
rv64_out=$(cat <&3)
|
2021-03-11 06:45:45 +00:00
|
|
|
[[ $rv64_out -eq 1 ]] && echo "rv64ic passed" || echo "rv64ic failed"
|
2021-03-11 17:25:20 +00:00
|
|
|
busybear_out=$(cat <&4)
|
2021-03-11 06:45:45 +00:00
|
|
|
[[ $busybear_out -eq 1 ]] && echo "busybear passed" || echo "busybear failed"
|
|
|
|
|
|
|
|
#wait $(jobs -p)
|
2021-03-11 07:32:31 +00:00
|
|
|
[[ -z $verilator_out && $rv64_out -eq 1 && $busybear_out -eq 1 ]] && echo "all passed" || echo "not all passed"
|