1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-21 15:46:17 +04:00
rCore/tests/test.sh
2019-05-03 15:17:06 +08:00

22 lines
474 B
Bash
Executable File

#!/bin/bash
cd ../kernel && make sfsimg arch=riscv32 && cd ../tests
for f in *.cmd
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
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
done