#!/bin/sh 

rm -rf *.pem *.xml *.log *.out

echo '---setup principals'
./setup.py 1>/dev/null 2>& 1

echo '---setup attributes'
./attr.py 1>rocket.log 2>& 1

echo '---run queries'
env keystore=`pwd` ./query.py 1>rocket.out 2>& 1

good=`grep success rocket.out |wc -l`
bad=`grep failure rocket.out |wc -l`
if [ $good -eq 3 -a $bad -eq 1 ]; then
    echo "   PASSED"
else
    echo "   ERROR:acme_rockets_rt0 test result differs!!!"
fi


