1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-23 00:16:17 +04:00
rCore/tests/test.sh

22 lines
474 B
Bash
Raw Normal View History

#!/bin/bash
cd ../kernel && make sfsimg arch=riscv32 && cd ../tests
for f in *.cmd
2019-03-11 17:15:27 +04:00
do
echo testing $f begin
(
cd ../kernel
make build arch=riscv32 init=$(cat ../tests/$f)
exec timeout 10s make justruntest arch=riscv32 init=$(cat ../tests/$f)
) &
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; }
echo testing $f pass
2019-03-11 17:15:27 +04:00
done