source: tests/Makefile.am @ 1bf0f03

abac0-leakabac0-mei
Last change on this file since 1bf0f03 was 1bf0f03, checked in by Mei <mei@…>, 11 years ago

1) save a copy before fixup of tests directory

  • Property mode set to 100644
File size: 2.1 KB
Line 
1
2#
3# tests directory for libabac
4#
5# default, executable/lib are accessed from build directory but
6# in case where rpm/debian binary packages were used, only access
7# to install directory is available..
8# In that case, the call,
9#    env TEST_INSTALL=true make testing
10# will force the test to be run with install directory
11#
12
13INCLUDES = -I$(abs_top_srcdir)/libabac
14LDADD = $(abs_top_builddir)/libabac/libabac.la
15
16CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
17PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
18PYTHON_ENV = PYTHONPATH=$(abs_top_builddir)/swig/python:$(abs_top_builddir)/swig/python/.libs:$(abs_top_builddir)/tests
19PERL_ENV = PERLLIB=$(abs_top_builddir)/swig/perl:$(abs_top_builddir)/swig/perl/.libs
20TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
21
22MY_SH_ENV = env $(CREDDY_ENV) $(PROVER_ENV)
23MY_PY_ENV = env $(PROVER_ENV) $(PYTHON_ENV)
24MY_PL_ENV = env $(PERL_ENV)
25
26DIRECTORY = example_scripts python_tests scaling_tests \
27          creddy_tests creddy_prover_tests attr_tests
28
29SUBDIRS = $(DIRECTORY)
30
31.PHONY: clean clean-local check_sh_env check_py_env tests
32all: check_pl_env check_sh_env check_py_env tests
33
34tests:
35        @touch result
36        @for i in $(DIRECTORY); do \
37          here=`pwd`; \
38          cd $$i; \
39          make -s runcheck | tee -a $$here/result; \
40          cd $$here; \
41        done
42
43check_sh_env:
44        @rc=`$(MY_SH_ENV) ./test_util.sh`; \
45        if [ $$? -eq 0 ]; then \
46          echo "sh_env, okay"; \
47        else \
48          echo "sh_env, not okay"; \
49          echo "perhap you did not configure&build libabac's c api??"; \
50        fi
51
52check_py_env:
53        @rc=`$(MY_PY_ENV) ./test_util.py`; \
54        if [ $$? -eq 0 ]; then \
55          echo "py_env, okay"; \
56        else \
57          echo "py_env, not okay"; \
58          echo "perhap you did not configure&build libabac's swig/python api??"; \
59        fi
60
61check_pl_env:
62        @rc=`$(MY_PL_ENV) ./test_util.pl`; \
63        if [ $$? -eq 0 ]; then \
64          echo "pl_env, okay"; \
65        else \
66          echo "pl_env, not okay"; \
67          echo "perhap you did not configure&build libabac's swig/perl api??"; \
68        fi
69       
70       
71clean:
72        for i in $(DIRECTORY); do \
73          here=`pwd`; \
74          cd $$i; \
75          make clean; \
76          cd $$here; \
77        done
78        rm -rf result error
79        rm -rf test_util.pyc
80
81clean-local:
82        rm -rf result error
83        rm -rf test_util.pyc
Note: See TracBrowser for help on using the repository browser.