#!/bin/sh ABAC_PROVER_PATH="/home/mei/Deter/abac/libabac" export ABAC_PROVER_PATH rm -rf *der *pem echo '---setup principals' env keystore=`pwd` ./setup.py 1>/dev/null 2>& 1 echo '---setup attributes' env keystore=`pwd` ./attr.py 1>/dev/null 2>& 1 echo '---run queries' # Make prover queries g_cmd_sha=`grep "cmd1:" query.py |sed "s/cmd1://g" ` g_cmd_cn=`grep "cmd2:" query.py |sed "s/cmd2://g" ` echo '...with sha' eval $g_cmd_sha 2>/dev/null 1 > leader.sha echo '...with cn' eval $g_cmd_cn 1>leader.cn 2>&1 result=`diff leader.cn leader.save 2>/dev/null` if [ $? -eq 0 ]; then if [ "$result" = "" ]; then echo " PASSED" else echo " ERROR:leader_rt1 test result differs!!!" fi else echo " ERROR:leader_rt1 test result differs!!!" fi