#!/bin/sh
#########
# run_test
#

rm -rf *.pem  *.out *.xml
# a_run type
a_run()
{
    echo "---running (wiki) $1 script"
    ./$1.py 1 >> $1.out 2>& 1
    ./$1.ck
    if [ $? -eq 0 ]; then
       echo "   PASSED"
    else
       echo "   FAILED"
    fi
    rm -rf *.pem *.xml
}

a_run id1
creddy --generate --cn newGuy
mv newGuy_ID.pem newGuy.pem
a_run id2
a_run id3
a_run id4
a_run id5
a_run attr1
a_run attr2
a_run ctxtQuery1
a_run ctxtQuery2
