diff --git a/Makefile.am b/Makefile.am index 919a8b6..695c618 100644 --- a/Makefile.am +++ b/Makefile.am @@ -48,10 +48,10 @@ dyncode: examples/em_test.pickle $(python) scripts/refreshdyn.py examples/em_test.pickle $(dyncode_filename) && echo -e "\n\nCode generated in $(dyncode_filename)" # run tests -checks: +checks: runtest ./runtest -v -unittest: check +unittest: checks #Cleaning documentation and dyncode clean-local: cleandoc diff --git a/runtest.sh b/runtest.sh index cf914fd..55892e9 100755 --- a/runtest.sh +++ b/runtest.sh @@ -53,9 +53,14 @@ then fi PYTHON='env python3' -testdir=$(mktemp -d) +testdir=$(mktemp -td "lodel2_unittest_instance_XXXXXXXX") +install_model_dir="[@]INSTALLMODEL_DIR[@]" +if [ ! -d "$install_model_dir" ] +then + install_model_dir="$(dirname $0)/progs/slim/install_model/" +fi rmdir $testdir -./progs/create_instance test_instance $testdir "[@]INSTALLMODEL_DIR[@]" ./examples/em_file.pickle $(dirname $0) +./progs/create_instance test_instance $testdir "$install_model_dir" ./examples/em_test.pickle $(dirname $0) cp -R examples $testdir cp -R tests $testdir cd $testdir