2019-03-11 12:09:15 +04:00
|
|
|
#!/bin/bash
|
2019-03-27 03:28:18 +04:00
|
|
|
cd ../kernel && make sfsimg arch=riscv32 && cd ../tests
|
2019-03-26 12:03:32 +04:00
|
|
|
for f in *.cmd
|
2019-03-11 17:15:27 +04:00
|
|
|
do
|
2019-03-26 12:03:32 +04:00
|
|
|
echo testing $f begin
|
|
|
|
(
|
|
|
|
cd ../kernel
|
2019-03-27 03:28:18 +04:00
|
|
|
make build arch=riscv32 init=$(cat ../tests/$f)
|
|
|
|
exec timeout 10s make justruntest arch=riscv32 init=$(cat ../tests/$f)
|
2019-03-26 12:03:32 +04:00
|
|
|
) &
|
|
|
|
|
|
|
|
pid=$!
|
|
|
|
|
|
|
|
wait $pid
|
|
|
|
|
2019-05-03 11:17:06 +04:00
|
|
|
awk 'NR > 25 { print }' < stdout > stdout.new
|
|
|
|
|
|
|
|
diff -u ${f%.cmd}.out stdout.new || { echo 'testing failed for' $f; exit 1; }
|
2019-03-26 12:03:32 +04:00
|
|
|
|
|
|
|
echo testing $f pass
|
2019-03-11 17:15:27 +04:00
|
|
|
done
|