1 | |
---|
2 | # |
---|
3 | # tests directory for libabac |
---|
4 | # |
---|
5 | |
---|
6 | INCLUDES = -I$(abs_top_srcdir)/libabac |
---|
7 | LDADD = $(abs_top_builddir)/libabac/libabac.la |
---|
8 | |
---|
9 | CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy |
---|
10 | PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac |
---|
11 | PYTHON_ENV = PYTHONPATH=$(abs_top_builddir)/swig/python:$(abs_top_builddir)/swig/python/.libs:$(abs_top_builddir)/tests |
---|
12 | PERL_ENV = PERLLIB=$(abs_top_builddir)/swig/perl:$(abs_top_builddir)/swig/perl/.libs |
---|
13 | TEST_ENV = TESTDIR=$(abs_top_builddir)/tests |
---|
14 | |
---|
15 | MY_SH_ENV = env $(CREDDY_ENV) $(PROVER_ENV) |
---|
16 | MY_PY_ENV = env $(PROVER_ENV) $(PYTHON_ENV) |
---|
17 | MY_PL_ENV = env $(PERL_ENV) |
---|
18 | |
---|
19 | DIRECTORY = example_scripts python_tests scaling_tests \ |
---|
20 | creddy_tests creddy_prover_tests attr_tests |
---|
21 | |
---|
22 | SUBDIRS = $(DIRECTORY) |
---|
23 | |
---|
24 | .PHONY: clean clean-local check_sh_env check_py_env tests |
---|
25 | all: check_pl_env check_sh_env check_py_env tests |
---|
26 | |
---|
27 | tests: |
---|
28 | @touch result |
---|
29 | @for i in $(DIRECTORY); do \ |
---|
30 | here=`pwd`; \ |
---|
31 | cd $$i; \ |
---|
32 | make -s runcheck | tee -a $$here/result; \ |
---|
33 | cd $$here; \ |
---|
34 | done |
---|
35 | |
---|
36 | check_sh_env: |
---|
37 | @rc=`$(MY_SH_ENV) ./test_util.sh`; \ |
---|
38 | if [ $$? -eq 0 ]; then \ |
---|
39 | echo "sh_env, okay"; \ |
---|
40 | else \ |
---|
41 | echo "sh_env, not okay"; \ |
---|
42 | echo "perhap you did not configure&build libabac's c api??"; \ |
---|
43 | fi |
---|
44 | |
---|
45 | check_py_env: |
---|
46 | @rc=`$(MY_PY_ENV) ./test_util.py`; \ |
---|
47 | if [ $$? -eq 0 ]; then \ |
---|
48 | echo "py_env, okay"; \ |
---|
49 | else \ |
---|
50 | echo "py_env, not okay"; \ |
---|
51 | echo "perhap you did not configure&build libabac's swig/python api??"; \ |
---|
52 | fi |
---|
53 | |
---|
54 | check_pl_env: |
---|
55 | @rc=`$(MY_PL_ENV) ./test_util.pl`; \ |
---|
56 | if [ $$? -eq 0 ]; then \ |
---|
57 | echo "pl_env, okay"; \ |
---|
58 | else \ |
---|
59 | echo "pl_env, not okay"; \ |
---|
60 | echo "perhap you did not configure&build libabac's swig/perl api??"; \ |
---|
61 | fi |
---|
62 | |
---|
63 | |
---|
64 | clean: |
---|
65 | for i in $(DIRECTORY); do \ |
---|
66 | here=`pwd`; \ |
---|
67 | cd $$i; \ |
---|
68 | make clean; \ |
---|
69 | cd $$here; \ |
---|
70 | done |
---|
71 | rm -rf result error |
---|
72 | rm -rf test_util.pyc |
---|
73 | |
---|
74 | clean-local: |
---|
75 | rm -rf result error |
---|
76 | rm -rf test_util.pyc |
---|