mei_rt2mei_rt2_fix_1
Last change
on this file since d9c3886 was
5110d42,
checked in by Mei <mei@…>, 12 years ago
|
1) reorganized the test directory to include python tests
2) attribute via api and principal via api from python scripts is
working (although there is a annoying seg fault at the very end
that must be related to something not been dup()ed.. need to wait
for c example to debug it)
3) able to query via api
4) replicated access_rt2 example in python and the query result matches
5) expanded api to make it easier to generate rt2 structure
|
-
Property mode set to
100755
|
File size:
931 bytes
|
Rev | Line | |
---|
[5110d42] | 1 | #!/bin/sh |
---|
| 2 | |
---|
| 3 | ABAC_PROVER_PATH="/home/mei/Deter/abac/libabac" |
---|
| 4 | export ABAC_PROVER_PATH |
---|
| 5 | |
---|
| 6 | echo '---setup principals' |
---|
| 7 | # Two pre-existing id credentials are generated using separate python |
---|
| 8 | # script (just to show we can) |
---|
| 9 | env keystore=`pwd` ./setup.py 1>/dev/null 2>& 1 |
---|
| 10 | |
---|
| 11 | # Add policy attribute credentials along with a new id credential |
---|
| 12 | echo '---setup attributes' |
---|
| 13 | env keystore=`pwd` ./attr.py 1>/dev/null 2>& 1 |
---|
| 14 | |
---|
| 15 | echo '---run queries' |
---|
| 16 | |
---|
| 17 | # Make prover queries |
---|
| 18 | g_cmd_sha=`grep "cmd1:" query.py |sed "s/cmd1://g" ` |
---|
| 19 | g_cmd_cn=`grep "cmd2:" query.py |sed "s/cmd2://g" ` |
---|
| 20 | |
---|
| 21 | echo '...with sha' |
---|
| 22 | eval $g_cmd_sha 2>/dev/null 1 > access.sha |
---|
| 23 | |
---|
| 24 | echo '...with cn' |
---|
| 25 | eval $g_cmd_cn 1>access.cn 2>&1 |
---|
| 26 | |
---|
| 27 | result=`diff access.cn access.save 2>/dev/null` |
---|
| 28 | if [ $? -eq 0 ]; then |
---|
| 29 | if [ "$result" = "" ]; then |
---|
| 30 | echo " PASSED" |
---|
| 31 | else |
---|
| 32 | echo " ERROR:access_rt2 test result differs!!!" |
---|
| 33 | fi |
---|
| 34 | else |
---|
| 35 | echo " ERROR:access_rt2 test result differs!!!" |
---|
| 36 | fi |
---|
| 37 | |
---|
| 38 | |
---|
Note: See
TracBrowser
for help on using the repository browser.