1 | # |
---|
2 | # python_tests |
---|
3 | # |
---|
4 | |
---|
5 | INCLUDES = -I$(abs_top_srcdir)/libabac |
---|
6 | LDADD = $(abs_top_builddir)/libabac/libabac.la |
---|
7 | CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy |
---|
8 | PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac |
---|
9 | TEST_ENV = TESTDIR=$(abs_top_builddir)/tests |
---|
10 | PYTHON_ENV = PYTHONPATH=$(abs_top_builddir)/swig/python:$(abs_top_builddir)/swig/python/.libs:$(abs_top_builddir)/tests |
---|
11 | MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(TEST_ENV) $(PYTHON_ENV) |
---|
12 | |
---|
13 | DIRECTORY= acme_rockets_intersection_rt0 acme_rockets_rt0 experiment_create_rt0 |
---|
14 | OTHER=basic_attribute basic_id |
---|
15 | |
---|
16 | .PHONY : clean-local runcheck clean |
---|
17 | all: runcheck |
---|
18 | |
---|
19 | clean : |
---|
20 | @for i in $(DIRECTORY); do \ |
---|
21 | here=`pwd`; \ |
---|
22 | cd $$i; \ |
---|
23 | rm -rf *.pem *.xml; \ |
---|
24 | cd $$here; \ |
---|
25 | done |
---|
26 | @(cd basic_id; rm -rf *.pem *.xml) |
---|
27 | @(cd basic_attribute; rm -rf *.pem *.xml) |
---|
28 | @rm -rf result error |
---|
29 | |
---|
30 | runcheck : |
---|
31 | @touch error |
---|
32 | @echo 'running libabac PYTHON testing...' | tee result |
---|
33 | @make clean |
---|
34 | @for i in $(DIRECTORY); do \ |
---|
35 | here=`pwd`; \ |
---|
36 | cd $$i; \ |
---|
37 | printf "\n ==> RUN on %s\n" "$$i" >> $$here/result ; \ |
---|
38 | $(MY_ENV) ./setup.py 1>/dev/null 2>&1; \ |
---|
39 | $(MY_ENV) ./attr.py 1>/dev/null 2>&1; \ |
---|
40 | $(MY_ENV) ./query.py |tee -a $$here/result |grep BAD >> $$here/error; \ |
---|
41 | cd $$here; \ |
---|
42 | done |
---|
43 | make ids |
---|
44 | make attrs |
---|
45 | @if test -f error ; \ |
---|
46 | then \ |
---|
47 | (if test `cat error | wc -l ` -eq 0 ; \ |
---|
48 | then echo " PASSED"; \ |
---|
49 | else (echo " ERROR!!!"; cat error;) \ |
---|
50 | fi) \ |
---|
51 | else echo " PASSED"; \ |
---|
52 | fi |
---|
53 | |
---|
54 | ids: |
---|
55 | @printf "\n ==> RUN on basic_id\n" >> result |
---|
56 | @(cd basic_id; \ |
---|
57 | $(MY_ENV) ./setup.py 1>/dev/null 2>&1; \ |
---|
58 | $(MY_ENV) ./query.py |tee -a ../result |grep BAD >> ../error; \ |
---|
59 | cd ..) |
---|
60 | |
---|
61 | attrs: |
---|
62 | @printf "\n ==> RUN on basic_attr\n" >> result |
---|
63 | @(cd basic_attribute; \ |
---|
64 | $(MY_ENV) ./setup.py 1>/dev/null 2>&1; \ |
---|
65 | $(MY_ENV) ./query.py |tee -a ../result |grep BAD >> ../error; \ |
---|
66 | cd ..) |
---|
67 | |
---|
68 | clean-local: |
---|
69 | @rm -rf result error |
---|