#!/bin/sh 

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

echo '---setup principals'
./setup.py 1>id.log 2>&1

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

#echo '---run id_ctxt ' -- not in RT0
#env keystore=`pwd` ./id_ctxt.py >> id.out 2>&1

good=`grep adding id.out |wc -l`
bad=`grep "terminate called" id.out |wc -l`
if [ "$good" = "6" -a "$bad" = "1" ]; then
    echo "   PASSED"
else
    echo "   ERROR:basic_id test result differs!!!"
fi

