source:
examples/scaling_tests/daisychain/likes_python/run_one
@
646e57e
Last change on this file since 646e57e was 1e51e1b, checked in by , 12 years ago | |
---|---|
|
|
File size: 1.1 KB |
Rev | Line | |
---|---|---|
[373bf68] | 1 | #!/bin/sh |
2 | ||
3 | noise=$1 | |
4 | ||
[08b8da7] | 5 | if [ -z "$noise" ]; then |
6 | exit | |
7 | fi | |
8 | ||
9 | echo "---running daisychain likes_python $noise scaling" | |
10 | ||
[373bf68] | 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 | ||
17 | cd likes_$noise | |
[08b8da7] | 18 | chmod +x setup.py attr.py query.py |
[2b4e740] | 19 | ./setup.py 1> /dev/null 2>&1 |
20 | env keystore=`pwd` ./attr.py 1> attr.log 2>& 1 | |
[373bf68] | 21 | |
[08b8da7] | 22 | env keystore=`pwd` ABAC_CN=1 ./query.py 1>likes.tmp 2> likes.time |
23 | ||
24 | if [ $noise -eq 0 ] ; then | |
25 | result=`egrep -c "YAP query succeed" likes.tmp 2>/dev/null` | |
[1e51e1b] | 26 | if [ $result -eq 202 ]; then |
[08b8da7] | 27 | echo " PASSED" |
[2b4e740] | 28 | ## zap out all those fake BADs |
29 | sed -i 's/BAD_/fakebad_/g' likes.time | |
[08b8da7] | 30 | exit 0 |
31 | else | |
32 | echo " ERROR" | |
33 | exit 1 | |
34 | fi | |
[373bf68] | 35 | fi |
36 | ||
[08b8da7] | 37 | s=`grep -c "YAP query succeed" likes.tmp 2>/dev/null` |
38 | f=`grep -c "YAP query failed" likes.tmp 2>/dev/null ` | |
[1e51e1b] | 39 | if [ $s -ne 101 ] ; then |
[08b8da7] | 40 | echo " ERROR" |
41 | exit 1 | |
[373bf68] | 42 | fi |
[08b8da7] | 43 | |
[1e51e1b] | 44 | if [ $f -ne 101 ] ; then |
[08b8da7] | 45 | echo " ERROR" |
46 | exit 1 | |
47 | fi | |
48 | ||
49 | echo " PASSED" | |
50 |
Note: See TracBrowser
for help on using the repository browser.