2024-12-16 10:50:09 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
2025-05-24 17:24:19 +03:00
|
|
|
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
|
|
|
|
|
|
2025-03-03 00:13:19 +03:00
|
|
|
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
|
2025-04-07 01:11:26 +03:00
|
|
|
test_path="${test%.*}"
|
|
|
|
|
test_file="${test_path##*/}"
|
|
|
|
|
echo $test_path: $test_file
|
2025-04-12 17:09:02 +03:00
|
|
|
# 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
|
2025-04-07 01:11:26 +03:00
|
|
|
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
|
|
|
|
|
|
2025-04-07 01:11:26 +03:00
|
|
|
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
|