source: tests/python_tests/Makefile.am @ 6cd69a0

abac0-leakabac0-mei
Last change on this file since 6cd69a0 was 3c30b59, checked in by Mei <mei@…>, 11 years ago

1) add in new refactored regression testing directory
2) undo the abac.hh/ABAC.hh api changes
3) merged with Ted's changes to attribute format/nickname/issuer processing

  • Property mode set to 100644
File size: 1.8 KB
Line 
1#
2# python_tests
3#
4
5INCLUDES = -I$(abs_top_srcdir)/libabac
6LDADD = $(abs_top_builddir)/libabac/libabac.la
7CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
8PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
9TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
10PYTHON_ENV = PYTHONPATH=$(abs_top_builddir)/swig/python:$(abs_top_builddir)/swig/python/.libs:$(abs_top_builddir)/tests
11MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(TEST_ENV) $(PYTHON_ENV)
12
13DIRECTORY= acme_rockets_intersection_rt0 acme_rockets_rt0 experiment_create_rt0
14OTHER=basic_attribute basic_id
15
16.PHONY : clean-local runcheck clean
17all: runcheck
18
19clean :
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
30runcheck :
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
54ids:
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
61attrs:
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
68clean-local:
69        @rm -rf result error
Note: See TracBrowser for help on using the repository browser.