From c8bec67bb9fe14442a543f6ea5416e8f6f15858d Mon Sep 17 00:00:00 2001 From: ProgramSnail Date: Sun, 12 Jan 2025 21:40:22 +0300 Subject: [PATCH] script to run dep tests --- byterun/dep_check.sh | 26 +++++++++++++++++++ byterun/regression/dep_test001.input | 0 .../{Test.lama => dep_test001.lama} | 0 byterun/regression_check.sh | 8 ++++-- 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100755 byterun/dep_check.sh create mode 100644 byterun/regression/dep_test001.input rename byterun/regression/{Test.lama => dep_test001.lama} (100%) diff --git a/byterun/dep_check.sh b/byterun/dep_check.sh new file mode 100755 index 000000000..76fad74d1 --- /dev/null +++ b/byterun/dep_check.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +dune build > /dev/null + +prefix="../regression/" +suffix=".lama" + +compiler=../_build/default/src/Driver.exe + +echo "Used compiler path:" +echo $compiler + +$compiler -b regression/Dep.lama > /dev/null + +for test in regression/dep_test*.lama; do + echo $test + $compiler -b $test -I regression/ > /dev/null + test_file="${test%.*}" + echo $test_file + cat $test_file.input | ./byterun.exe -vi dep_test*.bc > /dev/null + rm dep_test*.bc + echo "done" +done + +rm Dep.bc +rm *.o diff --git a/byterun/regression/dep_test001.input b/byterun/regression/dep_test001.input new file mode 100644 index 000000000..e69de29bb diff --git a/byterun/regression/Test.lama b/byterun/regression/dep_test001.lama similarity index 100% rename from byterun/regression/Test.lama rename to byterun/regression/dep_test001.lama diff --git a/byterun/regression_check.sh b/byterun/regression_check.sh index f7c8f9da1..2fc1c31bc 100755 --- a/byterun/regression_check.sh +++ b/byterun/regression_check.sh @@ -5,9 +5,14 @@ dune build > /dev/null prefix="../regression/" suffix=".lama" +compiler=../_build/default/src/Driver.exe + +echo "Used compiler path:" +echo $compiler + for test in ../regression/*.lama; do echo $test - ../_build/default/src/Driver.exe -b $test > /dev/null + $compiler -b $test > /dev/null test_file="${test%.*}" echo $test_file cat $test_file.input | ./byterun.exe -vi test*.bc > /dev/null @@ -16,4 +21,3 @@ for test in ../regression/*.lama; do done rm *.o -