Browse Source

Fixed runtest scripts

Yann Weber 7 years ago
parent
commit
63ca38b370
2 changed files with 9 additions and 4 deletions
  1. 2
    2
      Makefile.am
  2. 7
    2
      runtest.sh

+ 2
- 2
Makefile.am View File

@@ -48,10 +48,10 @@ dyncode: examples/em_test.pickle
48 48
 	$(python) scripts/refreshdyn.py examples/em_test.pickle $(dyncode_filename) && echo -e "\n\nCode generated in $(dyncode_filename)"
49 49
 
50 50
 # run tests
51
-checks:
51
+checks: runtest
52 52
 	./runtest -v
53 53
 
54
-unittest: check
54
+unittest: checks
55 55
 
56 56
 #Cleaning documentation and dyncode
57 57
 clean-local: cleandoc

+ 7
- 2
runtest.sh View File

@@ -53,9 +53,14 @@ then
53 53
 fi
54 54
 
55 55
 PYTHON='env python3'
56
-testdir=$(mktemp -d)
56
+testdir=$(mktemp -td "lodel2_unittest_instance_XXXXXXXX")
57
+install_model_dir="[@]INSTALLMODEL_DIR[@]"
58
+if [ ! -d "$install_model_dir" ]
59
+then
60
+	install_model_dir="$(dirname $0)/progs/slim/install_model/"
61
+fi
57 62
 rmdir $testdir
58
-./progs/create_instance test_instance $testdir "[@]INSTALLMODEL_DIR[@]" ./examples/em_file.pickle $(dirname $0)
63
+./progs/create_instance test_instance $testdir "$install_model_dir" ./examples/em_test.pickle $(dirname $0)
59 64
 cp -R examples $testdir
60 65
 cp -R tests $testdir
61 66
 cd $testdir

Loading…
Cancel
Save