abac0-leakabac0-mei
Last change
on this file since 2be12d2 was
2d56f83,
checked in by Mei <mei@…>, 11 years ago
|
1) overhaul the tests directory that now we can regression test against
a build directory or a installed setup
|
-
Property mode set to
100644
|
File size:
1.6 KB
|
Line | |
---|
1 | # |
---|
2 | # example_scripts/perl |
---|
3 | # |
---|
4 | |
---|
5 | include ${TESTDIR}/abac.mk |
---|
6 | |
---|
7 | .PHONY: clean-local |
---|
8 | |
---|
9 | all: run bad prove |
---|
10 | |
---|
11 | clean-local: |
---|
12 | @rm -rf *.pem *.xml |
---|
13 | |
---|
14 | run: |
---|
15 | echo '---running (perl) id script' |
---|
16 | make clean |
---|
17 | $(MY_ENV) ./setup.sh 1>/dev/null 2>&1 |
---|
18 | (rc=`$(MY_ENV) ./abac_keyid.pl IceCream_ID.pem | grep OKAY` ; \ |
---|
19 | if [ -z "$$rc" ]; then \ |
---|
20 | echo "BAD:example_scripts/perl/abac_keyid.pl:using libabac perl to make principal"; \ |
---|
21 | else \ |
---|
22 | echo "GOOD:example_scripts/perl/abac_keyid.pl:using libabac perl to make principal"; \ |
---|
23 | fi) |
---|
24 | |
---|
25 | bad: |
---|
26 | echo '---running (perl) id2 script, expected failure' |
---|
27 | make clean |
---|
28 | $(MY_ENV) ./setup.sh 1>/dev/null 2>&1 |
---|
29 | (rc=`$(MY_ENV) ./abac_keyid.pl IceCream_private.pem | grep "std::invalid_argument"`; \ |
---|
30 | if [ -z "$$rc" ]; then \ |
---|
31 | echo "BAD:example_scripts/perl/abac_keyid.pl:supplied with just privkey"; \ |
---|
32 | else \ |
---|
33 | echo "GOOD:example_scripts/perl/abac_keyid.pl:supplied with just privkey"; \ |
---|
34 | fi) |
---|
35 | |
---|
36 | attr: |
---|
37 | echo '---running (perl) attr script' |
---|
38 | make clean |
---|
39 | $(MY_ENV) ./setup.sh 1>/dev/null 2>&1 |
---|
40 | (rc=`$(MY_ENV) ./run_attr | grep chocolate` ; \ |
---|
41 | if [ -z "$$rc" ]; then \ |
---|
42 | echo "BAD:example_scripts/perl/abac_attr.pl:creating attribute"; \ |
---|
43 | else \ |
---|
44 | echo "GOOD:example_scripts/perl/abac_keyid.pl:creating attribute"; \ |
---|
45 | fi) |
---|
46 | |
---|
47 | prove: |
---|
48 | echo '---running (perl) attr script' |
---|
49 | make clean |
---|
50 | $(MY_ENV) ./setup.sh 1>/dev/null 2>&1 |
---|
51 | $(MY_ENV) ./run_attr 1>/dev/null 2>&1 |
---|
52 | (rc=`$(MY_ENV) ./run_prover | grep Success` ; \ |
---|
53 | if [ -z "$$rc" ]; then \ |
---|
54 | echo "BAD:example_scripts/perl/abac_prover.pl:prover in perl"; \ |
---|
55 | else \ |
---|
56 | echo "GOOD:example_scripts/perl/abac_prover.pl:prover in perl"; \ |
---|
57 | fi) |
---|
58 | |
---|
59 | |
---|
Note: See
TracBrowser
for help on using the repository browser.