abac0-leak
Last change
on this file since b838398 was
b838398,
checked in by Ted Faber <faber@…>, 11 years ago
|
Make sure that python can find test_util module
|
-
Property mode set to
100755
|
File size:
1.6 KB
|
Rev | Line | |
---|
[4f79997] | 1 | #!/usr/bin/env sh |
---|
[7e3f5e2] | 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 | |
---|
[b838398] | 23 | # MY_ENV is an env command that sets the environment up so (among other things) |
---|
| 24 | # query can find the test_util module. MY_ENV is set in the testing makefile |
---|
| 25 | # and abac.mk |
---|
| 26 | $MY_ENV keystore=`pwd` ABAC_CN=1 ./query.py 1>likes.tmp 2> likes.time |
---|
[7e3f5e2] | 27 | |
---|
| 28 | if [ $noise -eq 0 ] ; then |
---|
[3c30b59] | 29 | result=`egrep -c "GOOD" likes.tmp 2>/dev/null` |
---|
[7e3f5e2] | 30 | if [ $result -eq 202 ]; then |
---|
[3c30b59] | 31 | echo "GOOD:scaling_tests/daisychain/likes_python:$noise:query result matched" |
---|
[7e3f5e2] | 32 | ## zap out all those fake BADs |
---|
| 33 | sed -ibak 's/BAD_/fakebad_/g' likes.time |
---|
| 34 | exit 0 |
---|
| 35 | else |
---|
[3c30b59] | 36 | echo "BAD:scaling_tests/daisychain/likes_python:$noise:number of successful query is not right" |
---|
[7e3f5e2] | 37 | exit 1 |
---|
| 38 | fi |
---|
| 39 | fi |
---|
| 40 | |
---|
| 41 | s=`grep -c "success" likes.tmp 2>/dev/null` |
---|
| 42 | f=`grep -c "failure" likes.tmp 2>/dev/null ` |
---|
| 43 | if [ $s -ne 101 ] ; then |
---|
[3c30b59] | 44 | echo "BAD:scaling_tests/daisychain/likes_python:$noise:number of success is not right" |
---|
[7e3f5e2] | 45 | exit 1 |
---|
| 46 | fi |
---|
| 47 | |
---|
| 48 | if [ $f -ne 101 ] ; then |
---|
[3c30b59] | 49 | echo "BAD:scaling_tests/daisychain/likes_python:$noise:number of expeceted failure is not right" |
---|
[7e3f5e2] | 50 | exit 1 |
---|
| 51 | fi |
---|
| 52 | |
---|
[3c30b59] | 53 | echo "GOOD:scaling_tests/daisychain/likes_python:$noise:expected result" |
---|
[7e3f5e2] | 54 | |
---|
Note: See
TracBrowser
for help on using the repository browser.