abac0-leakabac0-meimei-idmei-rt0-nmei_rt0tvf-new-xml
Last change
on this file since bc7133b was
7e3f5e2,
checked in by Mei <mei@…>, 12 years ago
|
1) converted daisychain scaling tests
|
-
Property mode set to
100755
|
File size:
1.1 KB
|
Rev | Line | |
---|
[7e3f5e2] | 1 | #!/bin/sh |
---|
| 2 | |
---|
| 3 | noise=$1 |
---|
| 4 | |
---|
| 5 | if [ -z "$noise" ]; then |
---|
| 6 | exit |
---|
| 7 | fi |
---|
| 8 | |
---|
| 9 | echo "---running daisychain likes_python $noise scaling" |
---|
| 10 | |
---|
| 11 | rm -rf likes_$noise |
---|
| 12 | mkdir likes_$noise |
---|
| 13 | sed "s/#VAL#/$noise/" base/SETUP.py > likes_$noise/setup.py |
---|
| 14 | sed "s/#VAL#/$noise/" base/QUERY.py > likes_$noise/query.py |
---|
| 15 | sed "s/#VAL#/$noise/" base/ATTR.py > likes_$noise/attr.py |
---|
| 16 | sed "s/#VAL#/$noise/" base/PROVE.sh > likes_$noise/prove.sh |
---|
| 17 | |
---|
| 18 | cd likes_$noise |
---|
| 19 | chmod +x setup.py attr.py query.py |
---|
| 20 | ./setup.py 1> /dev/null 2>&1 |
---|
| 21 | env keystore=`pwd` ./attr.py 1> attr.log 2>& 1 |
---|
| 22 | |
---|
| 23 | env keystore=`pwd` ABAC_CN=1 ./query.py 1>likes.tmp 2> likes.time |
---|
| 24 | |
---|
| 25 | if [ $noise -eq 0 ] ; then |
---|
| 26 | result=`egrep -c "success" likes.tmp 2>/dev/null` |
---|
| 27 | if [ $result -eq 202 ]; then |
---|
| 28 | echo " PASSED" |
---|
| 29 | ## zap out all those fake BADs |
---|
| 30 | sed -ibak 's/BAD_/fakebad_/g' likes.time |
---|
| 31 | exit 0 |
---|
| 32 | else |
---|
| 33 | echo " ERROR" |
---|
| 34 | exit 1 |
---|
| 35 | fi |
---|
| 36 | fi |
---|
| 37 | |
---|
| 38 | s=`grep -c "success" likes.tmp 2>/dev/null` |
---|
| 39 | f=`grep -c "failure" likes.tmp 2>/dev/null ` |
---|
| 40 | if [ $s -ne 101 ] ; then |
---|
| 41 | echo " ERROR" |
---|
| 42 | exit 1 |
---|
| 43 | fi |
---|
| 44 | |
---|
| 45 | if [ $f -ne 101 ] ; then |
---|
| 46 | echo " ERROR" |
---|
| 47 | exit 1 |
---|
| 48 | fi |
---|
| 49 | |
---|
| 50 | echo " PASSED" |
---|
| 51 | |
---|
Note: See
TracBrowser
for help on using the repository browser.