#!/usr/bin/env bash

# inifortest - compiles a test build of INIFOR and runs integration test

#------------------------------------------------------------------------------#
# This file is part of the PALM model system.
#
# PALM is free software: you can redistribute it and/or modify it under the terms
# of the GNU General Public License as published by the Free Software Foundation,
# either version 3 of the License, or (at your option) any later version.
#
# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# PALM. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright 2017-2020  Leibniz Universitaet Hannover
# Copyright 2017-2020  Deutscher Wetterdienst, Offenbach
#------------------------------------------------------------------------------#
#
# Current revisions:
# ------------------
#
#
# Former revisions:
# -----------------
#
# Initial revision
#
#
# 
#------------------------------------------------------------------------------#

TEST_DIR="$(cd "$(dirname "$0")/../UTIL/inifor/tests" >/dev/null 2>&1 ; pwd -P)"
MAKE_FILE="$TEST_DIR/builds/Makefile.gnu_debug"

cd $TEST_DIR/..
make -f $MAKE_FILE clean BIN_PATH=$TEST_DIR
make -f $MAKE_FILE BIN_PATH=$TEST_DIR
python $TEST_DIR/inifor_test.py
