diff --git a/obn-run-tests.sh b/obn-run-tests.sh
index 70a1ea639fa66156b76136ee13d8fe1a3ae4b05d..88b5c6d36d66c0d2ce7a434b87809fa27e7a79df 100755 (executable)
--- a/obn-run-tests.sh
+++ b/obn-run-tests.sh
set -e
set -e
+TEST_DIR=tests
+
# Тест: компиляция и исполнение
maketest()
{
local OK=1
local LOG=""
# Тест: компиляция и исполнение
maketest()
{
local OK=1
local LOG=""
- if ! LOG="$(./obn-compile.sh $1)"; then
+ if ! LOG="$(./obn-compile.sh -I $TEST_DIR $1)"; then
OK=0;
echo "=============================="
echo "Test fail: $1 compile-time $?:"
OK=0;
echo "=============================="
echo "Test fail: $1 compile-time $?:"
if [ $OK = 1 ]; then
if ! ./obn-run.sh $1; then
OK=0
if [ $OK = 1 ]; then
if ! ./obn-run.sh $1; then
OK=0
- echo "=============================="
- echo "Test fail: $1 run-time $?:"
- echo "$LOG"
- echo "=============================="
- echo
fi
fi
if [ $OK = 1 ]; then
fi
fi
if [ $OK = 1 ]; then
makecomp()
{
local LOG=""
makecomp()
{
local LOG=""
- if ! LOG="$(./obn-compile.sh $1)"; then
+ if ! LOG="$(./obn-compile.sh -I $TEST_DIR $1)"; then
echo "=============================="
echo "Test fail: $1 compile-time $?:"
echo "$LOG"
echo "=============================="
echo "Test fail: $1 compile-time $?:"
echo "$LOG"
makefail()
{
local LOG=""
makefail()
{
local LOG=""
- if ! LOG="$(./obn-compile.sh $1)"; then
+ if ! LOG="$(./obn-compile.sh -I $TEST_DIR $1)"; then
echo "Test ok: $1"
else
echo "=============================="
echo "Test ok: $1"
else
echo "=============================="
makecomp Test18A
makefail Test18B
makefail Test18C
makecomp Test18A
makefail Test18B
makefail Test18C
+
+maketest Test19
+maketest Test20
+maketest Test21
+maketest Test22
+
+makecomp Test23A
+makefail Test23B
+
+maketest Test24
+maketest Test25
+maketest Test26
+maketest Test27