source: examples/scaling_tests/daisychain/likes_python/run_one @ 8798f04

mei_rt2mei_rt2_fix_1
Last change on this file since 8798f04 was 373bf68, checked in by Mei <mei@…>, 12 years ago

1) add the scaling test suite

  • Property mode set to 100755
File size: 936 bytes
Line 
1#!/bin/sh
2
3noise=$1
4
5rm -rf likes_$noise
6mkdir likes_$noise
7sed "s/#VAL#/$noise/" base/SETUP.py > likes_$noise/setup.py
8sed "s/#VAL#/$noise/" base/QUERY.py > likes_$noise/query.py
9sed "s/#VAL#/$noise/" base/BQUERY.py > likes_$noise/bquery.py
10sed "s/#VAL#/$noise/" base/ATTR.py > likes_$noise/attr.py
11
12cp base/RESULT likes_$noise/likes.save
13
14cd likes_$noise
15chmod +x setup.py attr.py query.py bquery.py
16./setup.py 1>/dev/null 2>& 1
17env keystore=`pwd` ./attr.py 1>/dev/null 2>& 1
18
19echo "  forward.."
20time env keystore=`pwd` ABAC_CN=1 ./query.py 1>likes.tmp 2> likes.time
21result=`grep "YAP query succeed" likes.tmp 2>/dev/null`
22if [ "$result" = "" ]; then
23   echo "   ERROR"
24else   
25   echo "   PASSED"
26fi
27
28echo "  backward.."
29time env keystore=`pwd` ABAC_CN=1 ./bquery.py 1>likes_b.tmp 2> likes_b.time
30result=`grep "YAP query failed" likes_b.tmp 2>/dev/null`
31if [ "$result" = "" ]; then
32   echo "   ERROR"
33else   
34   echo "   PASSED"
35fi
Note: See TracBrowser for help on using the repository browser.