lama_byterun/byterun/regression_check.sh

35 lines
820 B
Bash
Raw Normal View History

2024-12-16 10:50:09 +03:00
#!/usr/bin/env bash
xmake build
cp "build/linux/x86_64/release/byterun" byterun.exe
# dune build > /dev/null
2024-12-16 10:50:09 +03:00
prefix="../regression/"
suffix=".lama"
2025-01-12 21:40:22 +03:00
compiler=../_build/default/src/Driver.exe
echo "Used compiler path:"
echo $compiler
for test in ../regression/*.lama; do
2024-12-16 10:50:09 +03:00
echo $test
2025-01-12 21:40:22 +03:00
$compiler -b $test > /dev/null
test_path="${test%.*}"
test_file="${test_path##*/}"
echo $test_path: $test_file
# cat $test_path.input | ./byterun.exe -p $test_file.bc > test.bc.code
# cat $test_path.input | ./byterun.exe -p $test_file.bc
# cat $test_path.input | ./byterun.exe -vi $test_file.bc
cat $test_path.input | ./byterun.exe -vi $test_file.bc > test.log
sed '1d;s/^..//' $test_path.t > test_orig.log
2025-03-16 14:26:48 +03:00
diff test.log test_orig.log
rm $test_file.bc
2025-03-16 14:26:48 +03:00
rm test.log test_orig.log
2024-12-16 10:50:09 +03:00
echo "done"
done
rm *.o