Index: tests/Makefile
===================================================================
--- tests/Makefile	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/Makefile	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,28 +1,461 @@
-
-
-DIRECTORY=creddy_tests creddy_prover_tests example_scripts python_tests\
-scaling_tests attr_tests
-
-.PHONY : runcheck clean 
-
-all: runcheck
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# tests/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+#
+# tests directory for libabac
+#
+
+pkgdatadir = $(datadir)/abac
+pkgincludedir = $(includedir)/abac
+pkglibdir = $(libdir)/abac
+pkglibexecdir = $(libexecdir)/abac
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+subdir = tests
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_openssl.m4 \
+	$(top_srcdir)/m4/ax_check_xml2.m4 \
+	$(top_srcdir)/m4/ax_check_xmlsec1.m4 \
+	$(top_srcdir)/m4/ax_pkg_swig.m4 \
+	$(top_srcdir)/m4/ax_python_devel.m4 \
+	$(top_srcdir)/m4/ax_swig_enable_cxx.m4 \
+	$(top_srcdir)/m4/ax_swig_python.m4 $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/mei/Deter/abac0-master/missing --run aclocal-1.11
+AMTAR = ${SHELL} /home/mei/Deter/abac0-master/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/mei/Deter/abac0-master/missing --run automake-1.11
+AWK = gawk
+AX_SWIG_PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+AX_SWIG_PYTHON_OPT = -python
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DPACKAGE_NAME=\"ABAC\" -DPACKAGE_TARNAME=\"abac\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"ABAC\ 0.1.5\" -DPACKAGE_BUGREPORT=\"faber@ISI.EDU\" -DPACKAGE_URL=\"\" -DPACKAGE=\"abac\" -DVERSION=\"0.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PYTHON=\"2.7\" -DHAVE_INTTYPES_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_PATHS_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_PTRDIFF_T=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_ATEXIT=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1
+DEPDIR = .deps
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+FGREP = /bin/grep -F
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /home/mei/Deter/abac0-master/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_INCLUDES =  
+OPENSSL_LDFLAGS =  
+OPENSSL_LIBS = -lssl -lcrypto  
+OTOOL = 
+OTOOL64 = 
+PACKAGE = abac
+PACKAGE_BUGREPORT = faber@ISI.EDU
+PACKAGE_NAME = ABAC
+PACKAGE_STRING = ABAC 0.1.5
+PACKAGE_TARNAME = abac
+PACKAGE_URL = 
+PACKAGE_VERSION = 0.1.5
+PATH_SEPARATOR = :
+PERL = perl
+PKG_CONFIG = /usr/bin/pkg-config
+PYTHON = /usr/local/bin/python
+PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+PYTHON_EXEC_PREFIX = ${exec_prefix}
+PYTHON_EXTRA_LDFLAGS = -Xlinker -export-dynamic
+PYTHON_EXTRA_LIBS =  -lpthread -ldl  -lutil -lm
+PYTHON_LDFLAGS = -L/usr/local/lib/python2.7/config -lpython2.7
+PYTHON_PLATFORM = linux2
+PYTHON_PREFIX = ${prefix}
+PYTHON_SITE_PKG = /usr/local/lib/python2.7/site-packages
+PYTHON_VERSION = 2.7
+RANLIB = ranlib
+SED = /bin/sed
+SET_MAKE = 
+SHELL = /bin/bash
+SITE_PERL = /usr/local/lib/site_perl
+STRIP = strip
+SWIG = /usr/local/bin/swig -c++
+SWIG_LIB = /usr/local/share/swig/2.0.4
+VERSION = 0.1.5
+XML2_CONFIG = /usr/bin/xml2-config
+XML2_INCLUDES = -I/usr/include/libxml2
+XML2_LDFLAGS = -lxml2
+XML2_LIBS = -lxml2
+XMLSEC1_CONFIG = /usr/bin/xmlsec1-config
+XMLSEC1_INCLUDES = -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\"openssl\"
+XMLSEC1_LDFLAGS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+XMLSEC1_LIBS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+abs_builddir = /home/mei/Deter/abac0-master/tests
+abs_srcdir = /home/mei/Deter/abac0-master/tests
+abs_top_builddir = /home/mei/Deter/abac0-master
+abs_top_srcdir = /home/mei/Deter/abac0-master
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/mei/Deter/abac0-master/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+lt_ECHO = echo
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+pkgpyexecdir = ${pyexecdir}/abac
+pkgpythondir = ${pythondir}/abac
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+pyexecdir = ${exec_prefix}/lib/python2.7/site-packages
+pythondir = ${prefix}/lib/python2.7/site-packages
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias = 
+top_build_prefix = ../
+top_builddir = ..
+top_srcdir = ..
+INCLUDES = -I$(abs_top_srcdir)/libabac
+LDADD = $(abs_top_builddir)/libabac/libabac.la
+CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
+PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
+PYTHON_ENV = PYTHONPATH=$(abs_top_builddir)/swig/python:$(abs_top_builddir)/swig/python/.libs:$(abs_top_builddir)/tests
+PERL_ENV = PERLLIB=$(abs_top_builddir)/swig/perl:$(abs_top_builddir)/swig/perl/.libs
+TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
+MY_SH_ENV = env $(CREDDY_ENV) $(PROVER_ENV) 
+MY_PY_ENV = env $(PROVER_ENV) $(PYTHON_ENV)
+MY_PL_ENV = env $(PERL_ENV)
+DIRECTORY = example_scripts python_tests scaling_tests \
+          creddy_tests creddy_prover_tests attr_tests
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	clean-local distclean distclean-generic distclean-libtool \
+	distdir dvi dvi-am html html-am info info-am install \
+	install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	uninstall uninstall-am
+
+
+.PHONY: clean clean-local check_sh_env check_py_env tests
+all: check_pl_env check_sh_env check_py_env tests
+
+tests:
+	@touch result
+	@for i in $(DIRECTORY); do \
+	  here=`pwd`; \
+	  cd $$i; \
+	  make -s runcheck | tee -a $$here/result; \
+	  cd $$here; \
+	done
+
+check_sh_env:
+	@rc=`$(MY_SH_ENV) ./test_util.sh`; \
+	if [ $$? -eq 0 ]; then \
+	  echo "sh_env, okay"; \
+	else \
+	  echo "sh_env, not okay"; \
+	  echo "perhap you did not configure&build libabac's c api??"; \
+	fi
+
+check_py_env:
+	@rc=`$(MY_PY_ENV) ./test_util.py`; \
+	if [ $$? -eq 0 ]; then \
+	  echo "py_env, okay"; \
+	else \
+	  echo "py_env, not okay"; \
+	  echo "perhap you did not configure&build libabac's swig/python api??"; \
+	fi
+
+check_pl_env:
+	@rc=`$(MY_PL_ENV) ./test_util.pl`; \
+	if [ $$? -eq 0 ]; then \
+	  echo "pl_env, okay"; \
+	else \
+	  echo "pl_env, not okay"; \
+	  echo "perhap you did not configure&build libabac's swig/perl api??"; \
+	fi
 
 clean:
-	@printf "\n ==> make CLEAN \n" 
-	@for i in $(DIRECTORY); do \
-	here=`pwd`; \
-	cd $$i; \
-	make -s clean; \
-	cd $$here; \
-	done; 
-
-runcheck: 
-	@make -s clean
-	@printf "\n ==> make TESTS \n"
-	@for i in $(DIRECTORY); do \
-	here=`pwd`; \
-	cd $$i; \
-	make -s runcheck; \
-	cd $$here; \
-	done; 
-
+	for i in $(DIRECTORY); do \
+	  here=`pwd`; \
+	  cd $$i; \
+	  make clean; \
+	  cd $$here; \
+	done
+	rm -rf result error
+	rm -rf test_util.pyc
+
+clean-local:
+	rm -rf result error
+	rm -rf test_util.pyc
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: tests/Makefile.am
===================================================================
--- tests/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,74 @@
+
+#
+# tests directory for libabac
+#
+
+INCLUDES = -I$(abs_top_srcdir)/libabac
+LDADD = $(abs_top_builddir)/libabac/libabac.la
+
+CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
+PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
+PYTHON_ENV = PYTHONPATH=$(abs_top_builddir)/swig/python:$(abs_top_builddir)/swig/python/.libs:$(abs_top_builddir)/tests
+PERL_ENV = PERLLIB=$(abs_top_builddir)/swig/perl:$(abs_top_builddir)/swig/perl/.libs
+TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
+
+MY_SH_ENV = env $(CREDDY_ENV) $(PROVER_ENV) 
+MY_PY_ENV = env $(PROVER_ENV) $(PYTHON_ENV)
+MY_PL_ENV = env $(PERL_ENV)
+
+DIRECTORY = example_scripts python_tests scaling_tests \
+          creddy_tests creddy_prover_tests attr_tests
+
+.PHONY: clean clean-local check_sh_env check_py_env tests
+all: check_pl_env check_sh_env check_py_env tests
+
+tests:
+	@touch result
+	@for i in $(DIRECTORY); do \
+	  here=`pwd`; \
+	  cd $$i; \
+	  make -s runcheck | tee -a $$here/result; \
+	  cd $$here; \
+	done
+
+check_sh_env:
+	@rc=`$(MY_SH_ENV) ./test_util.sh`; \
+	if [ $$? -eq 0 ]; then \
+	  echo "sh_env, okay"; \
+	else \
+	  echo "sh_env, not okay"; \
+	  echo "perhap you did not configure&build libabac's c api??"; \
+	fi
+
+check_py_env:
+	@rc=`$(MY_PY_ENV) ./test_util.py`; \
+	if [ $$? -eq 0 ]; then \
+	  echo "py_env, okay"; \
+	else \
+	  echo "py_env, not okay"; \
+	  echo "perhap you did not configure&build libabac's swig/python api??"; \
+	fi
+
+check_pl_env:
+	@rc=`$(MY_PL_ENV) ./test_util.pl`; \
+	if [ $$? -eq 0 ]; then \
+	  echo "pl_env, okay"; \
+	else \
+	  echo "pl_env, not okay"; \
+	  echo "perhap you did not configure&build libabac's swig/perl api??"; \
+	fi
+	
+	
+clean:
+	for i in $(DIRECTORY); do \
+	  here=`pwd`; \
+	  cd $$i; \
+	  make clean; \
+	  cd $$here; \
+	done
+	rm -rf result error
+	rm -rf test_util.pyc
+
+clean-local:
+	rm -rf result error
+	rm -rf test_util.pyc
Index: tests/README
===================================================================
--- tests/README	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/README	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,26 @@
+
+This directory serves as a regression testing and performance testing
+platform for libabac.  It contains many actual valid RT0
+examples in C/python/perl. It also contain examples of Creddy in
+action.
+
+creddy_prover_tests : various RT examples using Creddy and abac_prover,
+                      a C implemenation of an ABAC prover
+python_tests: same RT examples as in creddy_prover_tests but in python scripts
+              using libabac ABAC
+example_scripts: small examples scripts in perl/python/C, wiki contains examples
+              used on libabac's wiki page
+scaling_tests: performance testing
+attr_tests: testing different types of attribute xml format
+creddy_tests : a comphrensive testing of creddy
+
+
+To run,
+
+   make tests
+
+if running on BSD,
+
+   make -i tests
+
+
Index: tests/attr_tests/Makefile
===================================================================
--- tests/attr_tests/Makefile	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/attr_tests/Makefile	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,15 +1,426 @@
-
-.PHONY : runcheck clean 
-runcheck: $(DIRECTORY)
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# tests/attr_tests/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+#
+# attr_tests
+#
+
+pkgdatadir = $(datadir)/abac
+pkgincludedir = $(includedir)/abac
+pkglibdir = $(libdir)/abac
+pkglibexecdir = $(libexecdir)/abac
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+subdir = tests/attr_tests
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_openssl.m4 \
+	$(top_srcdir)/m4/ax_check_xml2.m4 \
+	$(top_srcdir)/m4/ax_check_xmlsec1.m4 \
+	$(top_srcdir)/m4/ax_pkg_swig.m4 \
+	$(top_srcdir)/m4/ax_python_devel.m4 \
+	$(top_srcdir)/m4/ax_swig_enable_cxx.m4 \
+	$(top_srcdir)/m4/ax_swig_python.m4 $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/mei/Deter/abac0-master/missing --run aclocal-1.11
+AMTAR = ${SHELL} /home/mei/Deter/abac0-master/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/mei/Deter/abac0-master/missing --run automake-1.11
+AWK = gawk
+AX_SWIG_PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+AX_SWIG_PYTHON_OPT = -python
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DPACKAGE_NAME=\"ABAC\" -DPACKAGE_TARNAME=\"abac\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"ABAC\ 0.1.5\" -DPACKAGE_BUGREPORT=\"faber@ISI.EDU\" -DPACKAGE_URL=\"\" -DPACKAGE=\"abac\" -DVERSION=\"0.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PYTHON=\"2.7\" -DHAVE_INTTYPES_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_PATHS_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_PTRDIFF_T=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_ATEXIT=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1
+DEPDIR = .deps
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+FGREP = /bin/grep -F
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /home/mei/Deter/abac0-master/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_INCLUDES =  
+OPENSSL_LDFLAGS =  
+OPENSSL_LIBS = -lssl -lcrypto  
+OTOOL = 
+OTOOL64 = 
+PACKAGE = abac
+PACKAGE_BUGREPORT = faber@ISI.EDU
+PACKAGE_NAME = ABAC
+PACKAGE_STRING = ABAC 0.1.5
+PACKAGE_TARNAME = abac
+PACKAGE_URL = 
+PACKAGE_VERSION = 0.1.5
+PATH_SEPARATOR = :
+PERL = perl
+PKG_CONFIG = /usr/bin/pkg-config
+PYTHON = /usr/local/bin/python
+PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+PYTHON_EXEC_PREFIX = ${exec_prefix}
+PYTHON_EXTRA_LDFLAGS = -Xlinker -export-dynamic
+PYTHON_EXTRA_LIBS =  -lpthread -ldl  -lutil -lm
+PYTHON_LDFLAGS = -L/usr/local/lib/python2.7/config -lpython2.7
+PYTHON_PLATFORM = linux2
+PYTHON_PREFIX = ${prefix}
+PYTHON_SITE_PKG = /usr/local/lib/python2.7/site-packages
+PYTHON_VERSION = 2.7
+RANLIB = ranlib
+SED = /bin/sed
+SET_MAKE = 
+SHELL = /bin/bash
+SITE_PERL = /usr/local/lib/site_perl
+STRIP = strip
+SWIG = /usr/local/bin/swig -c++
+SWIG_LIB = /usr/local/share/swig/2.0.4
+VERSION = 0.1.5
+XML2_CONFIG = /usr/bin/xml2-config
+XML2_INCLUDES = -I/usr/include/libxml2
+XML2_LDFLAGS = -lxml2
+XML2_LIBS = -lxml2
+XMLSEC1_CONFIG = /usr/bin/xmlsec1-config
+XMLSEC1_INCLUDES = -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\"openssl\"
+XMLSEC1_LDFLAGS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+XMLSEC1_LIBS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+abs_builddir = /home/mei/Deter/abac0-master/tests/attr_tests
+abs_srcdir = /home/mei/Deter/abac0-master/tests/attr_tests
+abs_top_builddir = /home/mei/Deter/abac0-master
+abs_top_srcdir = /home/mei/Deter/abac0-master
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/mei/Deter/abac0-master/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+lt_ECHO = echo
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+pkgpyexecdir = ${pyexecdir}/abac
+pkgpythondir = ${pythondir}/abac
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+pyexecdir = ${exec_prefix}/lib/python2.7/site-packages
+pythondir = ${prefix}/lib/python2.7/site-packages
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias = 
+top_build_prefix = ../../
+top_builddir = ../..
+top_srcdir = ../..
+INCLUDES = -I$(abs_top_srcdir)/libabac
+LDADD = $(abs_top_builddir)/libabac/libabac.la
+CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
+PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
+TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
+MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(TEST_ENV)
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/attr_tests/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign tests/attr_tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	clean-local distclean distclean-generic distclean-libtool \
+	distdir dvi dvi-am html html-am info info-am install \
+	install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	uninstall uninstall-am
+
+
+.PHONY: runcheck clean-local setup
+
+all:runcheck
+
+runcheck: setup.sh
+	@make clean
+	@echo 'running libabac ATTRS testing...' | tee result
+	@touch error
+	@$(MY_ENV) ./setup.sh 
+	@($(MY_ENV) ./show.sh |tee -a result |grep BAD >> ../error; cd .)
+	@if test -f error ; \
+	  then \
+	    (if test `cat error | wc -l ` -eq 0 ; \
+	      then echo "   PASSED"; \
+	      else (echo "   ERROR!!!"; cat error;); \
+	    fi); \
+	  else echo "   PASSED"; \
+	fi
 
 clean:
-	rm -rf *.out *.xml
-	rm -rf result
-
-runcheck: 
-	@echo 'running libabac ATTRS testing...' 
-	@./run_test > result 2>/dev/null; \
-	if test -f result && test `diff -q result.save result |wc -l ` -eq 0 ; \
-	then echo "   PASSED"; \
-	else echo "   ERROR:got changes!!!"; \
-	fi
+	@rm -rf *.xml *.pem error result
+
+clean-local:
+	@rm -rf *.xml *.pem error result
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: tests/attr_tests/Makefile.am
===================================================================
--- tests/attr_tests/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/attr_tests/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,37 @@
+#
+# attr_tests
+#
+
+.PHONY: runcheck clean-local setup
+
+INCLUDES = -I$(abs_top_srcdir)/libabac
+LDADD = $(abs_top_builddir)/libabac/libabac.la
+CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
+PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
+TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
+MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(TEST_ENV)
+
+all:runcheck
+
+runcheck: setup.sh
+	@make clean
+	@echo 'running libabac ATTRS testing...' | tee result
+	@touch error
+	@$(MY_ENV) ./setup.sh 
+	@($(MY_ENV) ./show.sh |tee -a result |grep BAD >> ../error; cd .)
+	@if test -f error ; \
+	  then \
+	    (if test `cat error | wc -l ` -eq 0 ; \
+	      then echo "   PASSED"; \
+	      else (echo "   ERROR!!!"; cat error;); \
+	    fi); \
+	  else echo "   PASSED"; \
+	fi
+
+clean:
+	@rm -rf *.xml *.pem error result
+
+clean-local:
+	@rm -rf *.xml *.pem error result
+
+
Index: tests/attr_tests/README
===================================================================
--- tests/attr_tests/README	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/attr_tests/README	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -3,8 +3,10 @@
 
 privilege_attr.xml,  a valid self-signed priviledge GENI attribute credential 
-                     with multiple attribute rules 
+                     with multiple(6) attribute rules 
 
 abac_attr.xml,  a valid self-signed abac attribute credential with a single 
                 attribute rule
 
+not_ss.xml, a valid none self-signed abac attribute credential with a single
+            attribute rule
 
Index: tests/attr_tests/not_ss.xml_save
===================================================================
--- tests/attr_tests/not_ss.xml_save	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/attr_tests/not_ss.xml_save	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<signed-credential>
+    <credential xml:id="ref0">
+	<type>abac</type>
+	<version>1.0</version>
+	<expires>2014-05-20T17:39:55Z</expires>
+	<rt0>0a778934b93d546406d195d18e4f208af11ea84a.test_attr&lt;-633aadf1753647ba60f28b7310f5a56cd32ab7e2</rt0>
+    </credential>
+    <signatures>
+	<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
+	    <SignedInfo>
+		<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
+		<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
+		<Reference URI="#ref0">
+		    <Transforms>
+			<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
+		    </Transforms>
+		    <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
+		    <DigestValue>PZhnlEVuQz0AEHrBFzEcuefhWB8=</DigestValue>
+		</Reference>
+	    </SignedInfo>
+	    <SignatureValue>wYIkXgDSnzeTVu/Cc2C2W5bib6w0SVzZcKSabls47Qr6rJMdNUKrO3YOV8fcHrbT
+9wsCrEq2v2d8kuueuzSjzXvZrgBBfXrMe83Z427F0todl5/IhQTgXtKyhYsKZEvU
+5C50FVKSs/spKCqcO95TYtzEZEAu6yCJV/Oa59TYt/4=</SignatureValue>
+	    <KeyInfo>
+	      <KeyValue>
+<RSAKeyValue>
+<Modulus>
+9+Qkp1j1gFuVflZuISN005C4uAuYAyJ/ntVD4tWTnTl2KEuCRlzbmpBMk5DXqxYW
+ouuXTjffiQwfMOYufvj9p/mvEPGKlJz5/Fd3dY1fbQ2cg/RckWX4ikC36Z4bmSya
+Kws7APsjDu6luAH2ggFXXoHIUej0jm7KpDTRI3kW+NU=
+</Modulus>
+<Exponent>
+AQAB
+</Exponent>
+</RSAKeyValue>
+</KeyValue>
+		<X509Data>
+		    
+		    
+		    
+		<X509Certificate>MIIC+DCCAmECAg2pMA0GCSqGSIb3DQEBBAUAMIHRMQswCQYDVQQGEwJVUzETMBEG
+A1UECBMKQ2FsaWZvcm5pYTEXMBUGA1UEBxMOTWFyaW5hIGRlbCBSZXkxJzAlBgNV
+BAoTHkRFVEVSIE5ldHdvcmsgU2VjdXJpdHkgVGVzdGJlZDEeMBwGA1UECxMVQ2Vy
+dGlmaWNhdGUgQXV0aG9yaXR5MR4wHAYDVQQDExVib3NzLmlzaS5kZXRlcmxhYi5u
+ZXQxKzApBgkqhkiG9w0BCQEWHHRlc3RiZWQtb3BzQGlzaS5kZXRlcmxhYi5uZXQw
+HhcNMTAxMTA1MjIzNTEyWhcNMTMwODAxMjIzNTEyWjCBtTELMAkGA1UEBhMCVVMx
+EzARBgNVBAgTCkNhbGlmb3JuaWExJzAlBgNVBAoTHkRFVEVSIE5ldHdvcmsgU2Vj
+dXJpdHkgVGVzdGJlZDESMBAGA1UECxMJc3NseG1scnBjMS0wKwYDVQQDEyQ3MGY0
+ZGI1Yy1jN2Y1LTExZGMtYTIwNC0wMDA0MjNjMjhlNzYxJTAjBgkqhkiG9w0BCQEW
+FmZhYmVyQGlzaS5kZXRlcmxhYi5uZXQwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJ
+AoGBAPfkJKdY9YBblX5WbiEjdNOQuLgLmAMif57VQ+LVk505dihLgkZc25qQTJOQ
+16sWFqLrl04334kMHzDmLn74/af5rxDxipSc+fxXd3WNX20NnIP0XJFl+IpAt+me
+G5ksmisLOwD7Iw7upbgB9oIBV16ByFHo9I5uyqQ00SN5FvjVAgMBAAEwDQYJKoZI
+hvcNAQEEBQADgYEAjGn3aZtem7Me+uGpPw6xEs8pwd3EtJ9yLofr2EMOkUKYNTHL
+fVV8cqybBCYF+RH8UYZPk3oIYH0XCfa1dzEeOcEBmYqlhcDgM8Y0Wpfh5t590ScI
+h7nN7kzGIN0wpUG6sASNqQdXA8YxwpPE/XjLrE0QKT69bU2rZnBGqSYcpzY=</X509Certificate>
+<X509SubjectName>emailAddress=faber@isi.deterlab.net,CN=70f4db5c-c7f5-11dc-a204-000423c28e76,OU=sslxmlrpc,O=DETER Network Security Testbed,ST=California,C=US</X509SubjectName>
+<X509IssuerSerial>
+<X509IssuerName>emailAddress=testbed-ops@isi.deterlab.net,CN=boss.isi.deterlab.net,OU=Certificate Authority,O=DETER Network Security Testbed,L=Marina del Rey,ST=California,C=US</X509IssuerName>
+<X509SerialNumber>3497</X509SerialNumber>
+</X509IssuerSerial>
+</X509Data>
+	    </KeyInfo>
+	</Signature>
+    </signatures>
+</signed-credential>
Index: tests/attr_tests/result.save
===================================================================
--- tests/attr_tests/result.save	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,2 +1,0 @@
-   attr_tests, privilege PASSED
-   attr_tests, abac PASSED
Index: tests/attr_tests/run_test
===================================================================
--- tests/attr_tests/run_test	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,21 +1,0 @@
-#!/bin/sh
-#########
-# run_test
-#
-rm -rf *.out *.xml
- 
-# a_run type #attr
-a_run()
-{
-    cp $1_attr.xml_save $1_attr.xml
-    ./show.sh $1_attr.xml 1> $1.out 2>& 1
-    result=`grep "<-" $1.out 2>/dev/null | wc -l`
-    if [ $result -eq $2 ]; then
-       echo "   attr_tests, $1 PASSED"
-    else
-       echo "   attr-tests, $1 FAILED"
-    fi
-}
-
-a_run privilege 6
-a_run abac 1
Index: tests/attr_tests/setup.sh
===================================================================
--- tests/attr_tests/setup.sh	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/attr_tests/setup.sh	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+cp abac_attr.xml_save abac_attr.xml
+cp privilege_attr.xml_save privilege_attr.xml
+cp not_ss.xml_save not_ss.xml
+
Index: tests/attr_tests/show.sh
===================================================================
--- tests/attr_tests/show.sh	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/attr_tests/show.sh	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,10 +1,21 @@
 #!/bin/sh
+#show.sh
 
-pwd=`pwd`
-eloc=`which creddy | sed 's/\/creddy//'`
-if [ "$eloc" = "" ]; then
-  echo "ERROR: creddy is not in the search path!!!"
-  exit 1
-fi
+. ${TESTDIR}/test_util.sh
 
-$eloc/creddy --roles --cert $1
+#expect 1 rule
+runCTest "attr_tests/show.sh" "test1" \
+"$eloc/creddy --roles --cert abac_attr.xml" \
+0 "show a V0 abac attribute-1 rule" "<-" 1
+
+#expect 6 rule
+runCTest "attr_tests/show.sh" "test2" \
+"$eloc/creddy --roles --cert privilege_attr.xml" \
+0 "show a V0 GENI privilege attribute-6 rules" "<-" 6
+
+#expect 1 rule
+runCTest "attr_tests/show.sh" "test3" \
+"$eloc/creddy --roles --cert not_ss.xml" \
+0 "show a V0 abac not self signed attribute-1 rule" "<-" 1
+
+
Index: tests/creddy_prover_tests/Makefile
===================================================================
--- tests/creddy_prover_tests/Makefile	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/creddy_prover_tests/Makefile	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,32 +1,439 @@
-
-DIRECTORY= acme_rockets_intersection_rt0 acme_rockets_rt0 experiment_create_rt0 ice_cream_rt0
-
-.PHONY : setup runcheck clean 
-runcheck: $(DIRECTORY)
-
-clean:
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# tests/creddy_prover_tests/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+pkgdatadir = $(datadir)/abac
+pkgincludedir = $(includedir)/abac
+pkglibdir = $(libdir)/abac
+pkglibexecdir = $(libexecdir)/abac
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+subdir = tests/creddy_prover_tests
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_openssl.m4 \
+	$(top_srcdir)/m4/ax_check_xml2.m4 \
+	$(top_srcdir)/m4/ax_check_xmlsec1.m4 \
+	$(top_srcdir)/m4/ax_pkg_swig.m4 \
+	$(top_srcdir)/m4/ax_python_devel.m4 \
+	$(top_srcdir)/m4/ax_swig_enable_cxx.m4 \
+	$(top_srcdir)/m4/ax_swig_python.m4 $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/mei/Deter/abac0-master/missing --run aclocal-1.11
+AMTAR = ${SHELL} /home/mei/Deter/abac0-master/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/mei/Deter/abac0-master/missing --run automake-1.11
+AWK = gawk
+AX_SWIG_PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+AX_SWIG_PYTHON_OPT = -python
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DPACKAGE_NAME=\"ABAC\" -DPACKAGE_TARNAME=\"abac\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"ABAC\ 0.1.5\" -DPACKAGE_BUGREPORT=\"faber@ISI.EDU\" -DPACKAGE_URL=\"\" -DPACKAGE=\"abac\" -DVERSION=\"0.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PYTHON=\"2.7\" -DHAVE_INTTYPES_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_PATHS_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_PTRDIFF_T=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_ATEXIT=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1
+DEPDIR = .deps
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+FGREP = /bin/grep -F
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /home/mei/Deter/abac0-master/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_INCLUDES =  
+OPENSSL_LDFLAGS =  
+OPENSSL_LIBS = -lssl -lcrypto  
+OTOOL = 
+OTOOL64 = 
+PACKAGE = abac
+PACKAGE_BUGREPORT = faber@ISI.EDU
+PACKAGE_NAME = ABAC
+PACKAGE_STRING = ABAC 0.1.5
+PACKAGE_TARNAME = abac
+PACKAGE_URL = 
+PACKAGE_VERSION = 0.1.5
+PATH_SEPARATOR = :
+PERL = perl
+PKG_CONFIG = /usr/bin/pkg-config
+PYTHON = /usr/local/bin/python
+PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+PYTHON_EXEC_PREFIX = ${exec_prefix}
+PYTHON_EXTRA_LDFLAGS = -Xlinker -export-dynamic
+PYTHON_EXTRA_LIBS =  -lpthread -ldl  -lutil -lm
+PYTHON_LDFLAGS = -L/usr/local/lib/python2.7/config -lpython2.7
+PYTHON_PLATFORM = linux2
+PYTHON_PREFIX = ${prefix}
+PYTHON_SITE_PKG = /usr/local/lib/python2.7/site-packages
+PYTHON_VERSION = 2.7
+RANLIB = ranlib
+SED = /bin/sed
+SET_MAKE = 
+SHELL = /bin/bash
+SITE_PERL = /usr/local/lib/site_perl
+STRIP = strip
+SWIG = /usr/local/bin/swig -c++
+SWIG_LIB = /usr/local/share/swig/2.0.4
+VERSION = 0.1.5
+XML2_CONFIG = /usr/bin/xml2-config
+XML2_INCLUDES = -I/usr/include/libxml2
+XML2_LDFLAGS = -lxml2
+XML2_LIBS = -lxml2
+XMLSEC1_CONFIG = /usr/bin/xmlsec1-config
+XMLSEC1_INCLUDES = -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\"openssl\"
+XMLSEC1_LDFLAGS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+XMLSEC1_LIBS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+abs_builddir = /home/mei/Deter/abac0-master/tests/creddy_prover_tests
+abs_srcdir = /home/mei/Deter/abac0-master/tests/creddy_prover_tests
+abs_top_builddir = /home/mei/Deter/abac0-master
+abs_top_srcdir = /home/mei/Deter/abac0-master
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/mei/Deter/abac0-master/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+lt_ECHO = echo
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+pkgpyexecdir = ${pyexecdir}/abac
+pkgpythondir = ${pythondir}/abac
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+pyexecdir = ${exec_prefix}/lib/python2.7/site-packages
+pythondir = ${prefix}/lib/python2.7/site-packages
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias = 
+top_build_prefix = ../../
+top_builddir = ../..
+top_srcdir = ../..
+
+#
+# creddy_prover_tests
+#
+INCLUDES = -I$(abs_top_srcdir)/libabac
+LDADD = $(abs_top_builddir)/libabac/libabac.la
+CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
+PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
+TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
+MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(TEST_ENV)
+DIRECTORY = acme_rockets_intersection_rt0 acme_rockets_rt0 \
+          experiment_create_rt0 ice_cream_rt0
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/creddy_prover_tests/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign tests/creddy_prover_tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	clean-local distclean distclean-generic distclean-libtool \
+	distdir dvi dvi-am html html-am info info-am install \
+	install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	uninstall uninstall-am
+
+
+.PHONY : clean clean-local runcheck
+all: runcheck
+
+runcheck :
+	@echo 'running libabac CREDDY_PROVER testing...' | tee result
+	@touch error
 	@for i in $(DIRECTORY); do \
-	here=`pwd`; \
-	cd $$i; \
-	rm -rf *.xml *.pem *.out *.log; \
-	cd $$here; \
-	done 
-	@rm -rf result
-
-runcheck: 
-	@echo 'running libabac CREDDY/ABAC_PROVER testing...' 
-	@rm -rf result
+	  here=`pwd`; \
+	  cd $$i; \
+	  printf "\n ==> RUN on %s\n" "$$i" >> $$here/result ; \
+	  $(MY_ENV) ./README 1>/dev/null 2>&1; \
+	  $(MY_ENV) ./run_query |tee -a $$here/result |grep BAD >> $$here/error; \
+	  cd $$here; \
+	done
+	@if test -f error ; \
+	  then \
+	    (if test `cat error | wc -l ` -eq 0 ; \
+	      then echo "   PASSED"; \
+	      else (echo "   ERROR!!!"; cat error;) \
+	    fi) \
+	  else echo "   PASSED"; \
+	fi
+
+clean :
 	@for i in $(DIRECTORY); do \
-	here=`pwd`; \
-	cd $$i; \
-	printf "\n ==> RUN on %s\n" "$$i" >> ../result; \
-	./README >> ../result 2>/dev/null; \
-	./run_query >> ../result 2>/dev/null; \
-	cd $$here; \
+	  here=`pwd`; \
+	  cd $$i; \
+	  rm -rf *.pem *.xml; \
+	  cd $$here; \
 	done
-## since can not check the everchanging keyid values, we just do a char count check..
-	@if test -f result && test `cat result|wc -c` -eq 6112 ; \
-	then echo "   PASSED"; \
-	else echo "   ERROR:got changes!!!"; \
-	fi
-
+	@rm -rf result error
+
+clean-local: 
+	@rm -rf result error
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: tests/creddy_prover_tests/Makefile.am
===================================================================
--- tests/creddy_prover_tests/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/creddy_prover_tests/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,48 @@
+#
+# creddy_prover_tests
+#
+INCLUDES = -I$(abs_top_srcdir)/libabac
+LDADD = $(abs_top_builddir)/libabac/libabac.la
+CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
+PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
+TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
+MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(TEST_ENV)
+
+DIRECTORY=acme_rockets_intersection_rt0 acme_rockets_rt0 \
+          experiment_create_rt0 ice_cream_rt0
+
+.PHONY : clean clean-local runcheck
+all: runcheck
+
+runcheck :
+	@echo 'running libabac CREDDY_PROVER testing...' | tee result
+	@touch error
+	@for i in $(DIRECTORY); do \
+	  here=`pwd`; \
+	  cd $$i; \
+	  printf "\n ==> RUN on %s\n" "$$i" >> $$here/result ; \
+	  $(MY_ENV) ./README 1>/dev/null 2>&1; \
+	  $(MY_ENV) ./run_query |tee -a $$here/result |grep BAD >> $$here/error; \
+	  cd $$here; \
+	done
+	@if test -f error ; \
+	  then \
+	    (if test `cat error | wc -l ` -eq 0 ; \
+	      then echo "   PASSED"; \
+	      else (echo "   ERROR!!!"; cat error;) \
+	    fi) \
+	  else echo "   PASSED"; \
+	fi
+
+
+clean :
+	@for i in $(DIRECTORY); do \
+	  here=`pwd`; \
+	  cd $$i; \
+	  rm -rf *.pem *.xml; \
+	  cd $$here; \
+	done
+	@rm -rf result error
+
+clean-local: 
+	@rm -rf result error
Index: tests/creddy_prover_tests/acme_rockets_intersection_rt0/README
===================================================================
--- tests/creddy_prover_tests/acme_rockets_intersection_rt0/README	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/creddy_prover_tests/acme_rockets_intersection_rt0/README	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -34,13 +34,15 @@
 rm -rf *.xml *.pem
 
-creddy --generate --cn Acme
+. ${TESTDIR}/test_util.sh
 
-creddy --generate --cn WarnerBros
+$eloc/creddy --generate --cn Acme
 
-creddy --generate --cn Coyote
+$eloc/creddy --generate --cn WarnerBros
 
-creddy --generate --cn Batman
+$eloc/creddy --generate --cn Coyote
 
-creddy --attribute \
+$eloc/creddy --generate --cn Batman
+
+$eloc/creddy --attribute \
        --issuer Acme_ID.pem --key Acme_private.pem --role buy_rockets \
        --subject-cert Acme_ID.pem --subject-role preferred_customer \
@@ -48,15 +50,15 @@
        --out Acme_buy_rockets__Acme_preferred_customer_and_WarnerBros_character_attr.xml
 
-creddy --attribute \
+$eloc/creddy --attribute \
        --issuer Acme_ID.pem --key Acme_private.pem --role preferred_customer \
        --subject-cert Coyote_ID.pem \
        --out Acme_preferred_customer__Coyote_attr.xml
 
-creddy --attribute \
+$eloc/creddy --attribute \
        --issuer Acme_ID.pem --key Acme_private.pem --role preferred_customer \
        --subject-cert Batman_ID.pem \
        --out Acme_preferred_customer__Batman_attr.xml
 
-creddy --attribute \
+$eloc/creddy --attribute \
        --issuer WarnerBros_ID.pem --key WarnerBros_private.pem --role character \
        --subject-cert Coyote_ID.pem \
Index: tests/creddy_prover_tests/acme_rockets_intersection_rt0/run_query
===================================================================
--- tests/creddy_prover_tests/acme_rockets_intersection_rt0/run_query	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/creddy_prover_tests/acme_rockets_intersection_rt0/run_query	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,17 +1,10 @@
 #!/bin/sh
-# acme_rockets_intersection
 
-pwd=`pwd`
+. ${TESTDIR}/test_util.sh
+keyloc=`pwd`
 
-eloc=`which abac_prover | sed 's/\/abac_prover//'`
-if [ "$eloc" = "" ]; then
-  echo "ERROR: abac_prover is not in the search path!!!"
-  exit 1
-fi
-keyloc=$pwd
-
-acme=`creddy --keyid --cert $keyloc/Acme_ID.pem`
-batman=`creddy --keyid --cert $keyloc/Batman_ID.pem`
-coyote=`creddy --keyid --cert $keyloc/Coyote_ID.pem`
+acme=`$eloc/creddy --keyid --cert $keyloc/Acme_ID.pem`
+batman=`$eloc/creddy --keyid --cert $keyloc/Batman_ID.pem`
+coyote=`$eloc/creddy --keyid --cert $keyloc/Coyote_ID.pem`
 
 buy_rockets="$acme.buy_rockets"
@@ -21,23 +14,26 @@
 bad_buy_rockets2="99$acme.buy_rockets"
 
-echo "  "
 echo "===good============ Acme.buy_rockets <- Coyote"
-$eloc/abac_prover  --keystore $keyloc \
-              --role "$buy_rockets" --principal "$coyote_prin"
+runTest creddy_prover_test/acme_rockets_intersection_rt0 test1 \
+  "$ploc/abac_prover --keystore $keyloc --role $buy_rockets --principal $coyote_prin" \
+  0 \
+  "simple rt0 query"
 
-echo "  "
 echo "===bad============ Acme.bad_buy_rockets <- Coyote"
-$eloc/abac_prover  --keystore $keyloc \
-              --role "$bad_buy_rockets" --principal "$coyote_prin"
+runTest creddy_prover_test/acme_rockets_intersection_rt0 test2 \
+  "$ploc/abac_prover  --keystore $keyloc --role $bad_buy_rockets --principal $coyote_prin" \
+  1 \
+  "expected failure, query fail with unfound role but should return with partial proof"
 
-echo "  "
 echo "===bad============ 99Acme.buy_rockets <- Coyote"
-$eloc/abac_prover  --keystore $keyloc \
-              --role "$bad_buy_rockets2" --principal "$coyote_prin"
+runTest creddy_prover_test/acme_rockets_intersection_rt0 test3 \
+  "$ploc/abac_prover  --keystore $keyloc --role $bad_buy_rockets2 --principal $coyote_prin" \
+  1 \
+  "expected failure, query fail with none existing issuer principal"
 
-echo "  "
 echo "===bad=============== Acme.buy_rockets <- Batman"
-$eloc/abac_prover  --keystore $keyloc \
-              --role "$buy_rockets" --principal "$batman_prin"
+runTest creddy_prover_test/acme_rockets_intersection_rt0 test4 \
+  "$ploc/abac_prover  --keystore $keyloc --role $buy_rockets --principal $batman_prin" \
+  1 \
+  "expected failure, query fail with none existing target principal"
 
-
Index: tests/creddy_prover_tests/acme_rockets_rt0/README
===================================================================
--- tests/creddy_prover_tests/acme_rockets_rt0/README	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/creddy_prover_tests/acme_rockets_rt0/README	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -20,11 +20,5 @@
 
 rm -rf *.pem *.xml
-
-pwd=`pwd`
-eloc=`which creddy | sed 's/\/creddy//'`
-if [ "$eloc" = "" ]; then
-  echo "ERROR: creddy is not in the search path!!!"
-  exit 1
-fi
+. ${TESTDIR}/test_util.sh
 
 $eloc/creddy --generate --cn Acme
Index: tests/creddy_prover_tests/acme_rockets_rt0/run_query
===================================================================
--- tests/creddy_prover_tests/acme_rockets_rt0/run_query	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/creddy_prover_tests/acme_rockets_rt0/run_query	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,15 +1,9 @@
 #!/bin/sh
 
-pwd=`pwd`
-eloc=`which abac_prover | sed 's/\/abac_prover//'`
-if [ "$eloc" = "" ]; then
-  echo "ERROR: abac_prover is not in the search path!!!"
-  exit 1
-fi
+. ${TESTDIR}/test_util.sh
+keyloc=`pwd`
 
-keyloc=$pwd
-
-acme=`creddy --keyid --cert $keyloc/Acme_ID.pem`
-coyote=`creddy --keyid --cert $keyloc/Coyote_ID.pem`
+acme=`$eloc/creddy --keyid --cert $keyloc/Acme_ID.pem`
+coyote=`$eloc/creddy --keyid --cert $keyloc/Coyote_ID.pem`
 
 preferred_customer="$acme.preferred_customer"
@@ -21,28 +15,31 @@
 #[keyid:Acme].role:preferred_customer <-?- [keyid:Coyote]
 #isMember(pCoyote, role(pAcme,preferred_customer), C).
-echo "  "
 echo "===good============ Acme.preferred_customer <- Coyote"
-$eloc/abac_prover  --keystore $keyloc \
-      --role "$preferred_customer" --principal "$coyote_prin"
+runTest creddy_prover_test/acme_rockets_rt0 test1 \
+  "$ploc/abac_prover  --keystore $keyloc --role $preferred_customer --principal $coyote_prin" \
+  0 \
+  "simple rt0 query with 1 matched rule"
 
 #[keyid:Acme].role:buy_rockets <-?- [keyid:Coyote]
 #isMember(pCoyote, role(pAcme,buy_rockets), C).
-echo "  "
 echo "===good=============== Acme.buy_rockets <- Coyote"
-$eloc/abac_prover  --keystore $keyloc \
-        --role "$buy_rockets" --principal "$coyote_prin"
+runTest creddy_prover_test/acme_rockets_rt0 test2 \
+  "$ploc/abac_prover  --keystore $keyloc --role $buy_rockets --principal $coyote_prin" \
+  0 \
+  "rt0 query that returns 2 rules"
 
 ## this is not suppose to work
 #[keyid:Acme].role:buy_rockets <-?- [keyid:Acme].role:preferred_customer
-echo "  "
 echo "===bad=============== Acme.buy_rockets <- Acme.preferred_customer"
-$eloc/abac_prover  --keystore $keyloc \
-        --role "$buy_rockets" --principal "$preferred_customer"
+runTest creddy_prover_test/acme_rockets_rt0 test3 \
+  "$ploc/abac_prover  --keystore $keyloc --role $buy_rockets --principal $preferred_customer" \
+  0 \
+  "this query is not suppose to work but alas did not block it, a.r1 <- b.r2"
 
 #[keyid:Coyote].role:friend <-?- [keyid:Acme]
 #isMember(pAcme, role(pCoyote,friend), C).
-echo "  "
 echo "===bad=============== Coyote.friend <- Acme"
-$eloc/abac_prover  --keystore $keyloc \
-        --role "$friend" --principal "$acme_prin"
-
+runTest creddy_prover_test/acme_rockets_rt0 test4 \
+  "$ploc/abac_prover  --keystore $keyloc --role $friend --principal $acme_prin" \
+  1 \
+  "the assumption is not supported by rules "
Index: tests/creddy_prover_tests/experiment_create_rt0/README
===================================================================
--- tests/creddy_prover_tests/experiment_create_rt0/README	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/creddy_prover_tests/experiment_create_rt0/README	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -28,33 +28,35 @@
 rm -rf *.pem *.xml
 
-creddy --generate --cn Acme
+. ${TESTDIR}/test_util.sh
 
-creddy --generate --cn Globotron
+$eloc/creddy --generate --cn Acme
 
-creddy --generate --cn Alice
+$eloc/creddy --generate --cn Globotron
 
-creddy --generate --cn Bob
+$eloc/creddy --generate --cn Alice
 
-creddy --attribute \
+$eloc/creddy --generate --cn Bob
+
+$eloc/creddy --attribute \
        --issuer Acme_ID.pem --key Acme_private.pem --role experiment_create \
        --subject-cert Acme_ID.pem --subject-role partner.experiment_create \
        --out Acme_experiment_create__Acme_partner_experiment_create_attr.xml
 
-creddy --attribute \
+$eloc/creddy --attribute \
        --issuer Acme_ID.pem --key Acme_private.pem --role partner \
        --subject-cert Globotron_ID.pem \
        --out Acme_partner__Globotron_attr.xml 
 
-creddy --attribute \
+$eloc/creddy --attribute \
        --issuer Globotron_ID.pem --key Globotron_private.pem --role experiment_create \
        --subject-cert Globotron_ID.pem --subject-role admin.power_user \
        --out Globotron_experiment_create__Globotron_admin_power_user_attr.xml
 
-creddy --attribute \
+$eloc/creddy --attribute \
        --issuer Globotron_ID.pem --key Globotron_private.pem --role admin \
        --subject-cert Alice_ID.pem \
        --out Globotron_admin__Alice_attr.xml
 
-creddy --attribute \
+$eloc/creddy --attribute \
        --issuer Alice_ID.pem --key Alice_private.pem --role power_user \
        --subject-cert Bob_ID.pem \
Index: tests/creddy_prover_tests/experiment_create_rt0/run_query
===================================================================
--- tests/creddy_prover_tests/experiment_create_rt0/run_query	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/creddy_prover_tests/experiment_create_rt0/run_query	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,16 +1,11 @@
 #!/bin/sh
 
-pwd=`pwd`
-eloc=`which abac_prover | sed 's/\/abac_prover//'`
-if [ "$eloc" = "" ]; then
-  echo "ERROR: abac_prover is not in the search path!!!"
-  exit 1
-fi
-keyloc=$pwd
+. ${TESTDIR}/test_util.sh
+keyloc=`pwd`
 
-acme=`creddy --keyid --cert $keyloc/Acme_ID.pem`
-alice=`creddy --keyid --cert $keyloc/Alice_ID.pem`
-bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
-globotron=`creddy --keyid --cert $keyloc/Globotron_ID.pem`
+acme=`$eloc/creddy --keyid --cert $keyloc/Acme_ID.pem`
+alice=`$eloc/creddy --keyid --cert $keyloc/Alice_ID.pem`
+bob=`$eloc/creddy --keyid --cert $keyloc/Bob_ID.pem`
+globotron=`$eloc/creddy --keyid --cert $keyloc/Globotron_ID.pem`
 
 glob_admin="$globotron.admin"
@@ -19,18 +14,24 @@
 experiment_create="$acme.experiment_create"
 
-echo " "
 echo "===good=============== Globotron.admin <- Alice"
-$eloc/abac_prover  --keystore $keyloc \
-             --role "$glob_admin" --principal "$alice_prin"
-
-echo " "
-echo "===bad=============== Globotron.admin <- Bob"
-$eloc/abac_prover  --keystore $keyloc \
-             --role "$glob_admin" --principal "$bob_prin"
-
-echo " "
-echo "===good=============== Acme.experiment_create <- Bob"
-$eloc/abac_prover  --keystore $keyloc \
-             --role "$experiment_create" --principal "$bob_prin"
+runTest creddy_prover_test/experiment_create_rt0 test1 \
+  "$ploc/abac_prover  --keystore $keyloc --role $glob_admin --principal $alice_prin" \
+  0 \
+  "simple query"
 
 
+echo "===bad=============== Globotron.admin <- Bob"
+runTest creddy_prover_test/experiment_create_rt0 test2 \
+  "$ploc/abac_prover  --keystore $keyloc --role $glob_admin --principal $bob_prin" \
+  1 \
+  "no rule support this, should get a partial proof"
+
+echo "===good=============== Acme.experiment_create <- Bob"
+runTest creddy_prover_test/experiment_create_rt0 test3 \
+  "$ploc/abac_prover  --keystore $keyloc  --role $experiment_create --principal $bob_prin" \
+  0 \
+  "mutilple rules intersection proof"
+
+
+
+
Index: tests/creddy_prover_tests/ice_cream_rt0/README
===================================================================
--- tests/creddy_prover_tests/ice_cream_rt0/README	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/creddy_prover_tests/ice_cream_rt0/README	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -15,10 +15,5 @@
 rm -rf *.pem *.xml
 
-pwd=`pwd`
-eloc=`which creddy | sed 's/\/creddy//'`
-if [ "$eloc" = "" ]; then
-  echo "ERROR: creddy is not in the search path!!!"
-  exit 1
-fi
+. ${TESTDIR}/test_util.sh
 
 $eloc/creddy --generate --cn IceCream
Index: tests/creddy_prover_tests/ice_cream_rt0/run_query
===================================================================
--- tests/creddy_prover_tests/ice_cream_rt0/run_query	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/creddy_prover_tests/ice_cream_rt0/run_query	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,35 +1,31 @@
 #!/bin/sh
 
-pwd=`pwd`
-eloc=`which abac_prover | sed 's/\/abac_prover//'`
-if [ "$eloc" = "" ]; then
-  echo "ERROR: abac_prover is not in the search path!!!"
-  exit 1
-fi
+. ${TESTDIR}/test_util.sh
+keyloc=`pwd`
 
-keyloc=$pwd
-
-ice=`creddy --keyid --cert $keyloc/IceCream_ID.pem`
-chocolate_prin=`creddy --keyid --cert $keyloc/Chocolate_ID.pem`
+ice=`$eloc/creddy --keyid --cert $keyloc/IceCream_ID.pem`
+chocolate_prin=`$eloc/creddy --keyid --cert $keyloc/Chocolate_ID.pem`
 
 delicious="$ice.delicious"
 
-echo "  "
 echo "===good============ IceCream.delicious <- Chocolate"
-$eloc/abac_prover  --keystore $keyloc \
-      --role "$delicious" --principal "$chocolate_prin"
+runTest creddy_prover_test/ice_cream_rt0 test1 \
+  "$ploc/abac_prover  --keystore $keyloc --role $delicious --principal $chocolate_prin" \
+  0 \
+  "very basic simple call"
+
+rm -rf IceCream*.pem
+echo "===good(no issuer)============ IceCream.delicious <- Chocolate"
+runTest creddy_prover_test/ice_cream_rt0 test2 \
+  "$ploc/abac_prover  --keystore $keyloc --role $delicious --principal $chocolate_prin" \
+  0 \
+  "basic simple call without the issuer's principal id in local keystore"
 
 
-rm -rf IceCream*.pem
-echo "  "
-echo "===good(no issuer)============ IceCream.delicious <- Chocolate"
-$eloc/abac_prover  --keystore $keyloc \
-      --role "$delicious" --principal "$chocolate_prin"
+rm -rf Chocolate*.pem
+echo "===good(no issuer & no principal)============ IceCream.delicious <- Chocolate"
+runTest creddy_prover_test/ice_cream_rt0 test1 \
+  "$ploc/abac_prover  --keystore $keyloc --role $delicious --principal $chocolate_prin" \
+  0 \
+  "basic simple call without the issuer's principal id nor principal id in local keystore"
 
-rm -rf Chocolate*.pem
-echo "  "
-echo "===good(no issuer & no principal)============ IceCream.delicious <- Chocolate"
-$eloc/abac_prover  --keystore $keyloc \
-      --role "$delicious" --principal "$chocolate_prin"
-
-
Index: tests/creddy_tests/Makefile
===================================================================
--- tests/creddy_tests/Makefile	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/creddy_tests/Makefile	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,15 +1,428 @@
-
-.PHONY : runcheck clean 
-runcheck: $(DIRECTORY)
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# tests/creddy_tests/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+#
+# creddy_tests
+#
+
+pkgdatadir = $(datadir)/abac
+pkgincludedir = $(includedir)/abac
+pkglibdir = $(libdir)/abac
+pkglibexecdir = $(libexecdir)/abac
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+subdir = tests/creddy_tests
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_openssl.m4 \
+	$(top_srcdir)/m4/ax_check_xml2.m4 \
+	$(top_srcdir)/m4/ax_check_xmlsec1.m4 \
+	$(top_srcdir)/m4/ax_pkg_swig.m4 \
+	$(top_srcdir)/m4/ax_python_devel.m4 \
+	$(top_srcdir)/m4/ax_swig_enable_cxx.m4 \
+	$(top_srcdir)/m4/ax_swig_python.m4 $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/mei/Deter/abac0-master/missing --run aclocal-1.11
+AMTAR = ${SHELL} /home/mei/Deter/abac0-master/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/mei/Deter/abac0-master/missing --run automake-1.11
+AWK = gawk
+AX_SWIG_PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+AX_SWIG_PYTHON_OPT = -python
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DPACKAGE_NAME=\"ABAC\" -DPACKAGE_TARNAME=\"abac\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"ABAC\ 0.1.5\" -DPACKAGE_BUGREPORT=\"faber@ISI.EDU\" -DPACKAGE_URL=\"\" -DPACKAGE=\"abac\" -DVERSION=\"0.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PYTHON=\"2.7\" -DHAVE_INTTYPES_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_PATHS_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_PTRDIFF_T=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_ATEXIT=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1
+DEPDIR = .deps
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+FGREP = /bin/grep -F
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /home/mei/Deter/abac0-master/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_INCLUDES =  
+OPENSSL_LDFLAGS =  
+OPENSSL_LIBS = -lssl -lcrypto  
+OTOOL = 
+OTOOL64 = 
+PACKAGE = abac
+PACKAGE_BUGREPORT = faber@ISI.EDU
+PACKAGE_NAME = ABAC
+PACKAGE_STRING = ABAC 0.1.5
+PACKAGE_TARNAME = abac
+PACKAGE_URL = 
+PACKAGE_VERSION = 0.1.5
+PATH_SEPARATOR = :
+PERL = perl
+PKG_CONFIG = /usr/bin/pkg-config
+PYTHON = /usr/local/bin/python
+PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+PYTHON_EXEC_PREFIX = ${exec_prefix}
+PYTHON_EXTRA_LDFLAGS = -Xlinker -export-dynamic
+PYTHON_EXTRA_LIBS =  -lpthread -ldl  -lutil -lm
+PYTHON_LDFLAGS = -L/usr/local/lib/python2.7/config -lpython2.7
+PYTHON_PLATFORM = linux2
+PYTHON_PREFIX = ${prefix}
+PYTHON_SITE_PKG = /usr/local/lib/python2.7/site-packages
+PYTHON_VERSION = 2.7
+RANLIB = ranlib
+SED = /bin/sed
+SET_MAKE = 
+SHELL = /bin/bash
+SITE_PERL = /usr/local/lib/site_perl
+STRIP = strip
+SWIG = /usr/local/bin/swig -c++
+SWIG_LIB = /usr/local/share/swig/2.0.4
+VERSION = 0.1.5
+XML2_CONFIG = /usr/bin/xml2-config
+XML2_INCLUDES = -I/usr/include/libxml2
+XML2_LDFLAGS = -lxml2
+XML2_LIBS = -lxml2
+XMLSEC1_CONFIG = /usr/bin/xmlsec1-config
+XMLSEC1_INCLUDES = -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\"openssl\"
+XMLSEC1_LDFLAGS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+XMLSEC1_LIBS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+abs_builddir = /home/mei/Deter/abac0-master/tests/creddy_tests
+abs_srcdir = /home/mei/Deter/abac0-master/tests/creddy_tests
+abs_top_builddir = /home/mei/Deter/abac0-master
+abs_top_srcdir = /home/mei/Deter/abac0-master
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/mei/Deter/abac0-master/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+lt_ECHO = echo
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+pkgpyexecdir = ${pyexecdir}/abac
+pkgpythondir = ${pythondir}/abac
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+pyexecdir = ${exec_prefix}/lib/python2.7/site-packages
+pythondir = ${prefix}/lib/python2.7/site-packages
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias = 
+top_build_prefix = ../../
+top_builddir = ../..
+top_srcdir = ../..
+INCLUDES = -I$(abs_top_srcdir)/libabac
+LDADD = $(abs_top_builddir)/libabac/libabac.la
+CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
+PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
+TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
+MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(TEST_ENV)
+SCRIPT = verify roles attribute keyid generate display attribute_rule 
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/creddy_tests/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign tests/creddy_tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	clean-local distclean distclean-generic distclean-libtool \
+	distdir dvi dvi-am html html-am info info-am install \
+	install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	uninstall uninstall-am
+
+
+.PHONY: runcheck clean-local setup
+
+runcheck: setup.sh
+	@echo 'running libabac CREDDY testing...' | tee result
+	@make clean
+	@$(MY_ENV) ./setup.sh
+	@touch error
+	@for i in $(SCRIPT); do \
+	  echo "---running $$i script"  >> result; \
+	  $(MY_ENV) ./$$i.sh | tee -a result |grep BAD >> error; cd .; \
+	done
+	@if test -f error ; \
+	  then \
+	    (if test `cat error | wc -l ` -eq 0 ; \
+	      then echo "   PASSED"; \
+	      else (echo "   ERROR!!!"; cat error;) \
+	    fi) \
+	  else echo "   PASSED"; \
+	fi
 
 clean:
-	rm -rf *.xml *.pem *.out
-	rm -rf result
-
-runcheck: 
-	@echo 'running libabac CREDDY testing...' 
-	@./run_test > result 2>/dev/null; \
-	if test -f result && test `diff -q result.save result |wc -l ` -eq 0 ; \
-	then echo "   PASSED"; \
-	else echo "   ERROR:got changes!!!"; \
-	fi
+	@rm -rf *.xml *.pem error result
+
+clean-local:
+	@rm -rf *.xml *.pem error result
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: tests/creddy_tests/Makefile.am
===================================================================
--- tests/creddy_tests/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/creddy_tests/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,40 @@
+#
+# creddy_tests
+#
+
+.PHONY: runcheck clean-local setup
+
+INCLUDES = -I$(abs_top_srcdir)/libabac
+LDADD = $(abs_top_builddir)/libabac/libabac.la
+CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
+PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
+TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
+MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(TEST_ENV)
+
+SCRIPT=verify roles attribute keyid generate display attribute_rule 
+
+runcheck: setup.sh
+	@echo 'running libabac CREDDY testing...' | tee result
+	@make clean
+	@$(MY_ENV) ./setup.sh
+	@touch error
+	@for i in $(SCRIPT); do \
+	  echo "---running $$i script"  >> result; \
+	  $(MY_ENV) ./$$i.sh | tee -a result |grep BAD >> error; cd .; \
+	done
+	@if test -f error ; \
+	  then \
+	    (if test `cat error | wc -l ` -eq 0 ; \
+	      then echo "   PASSED"; \
+	      else (echo "   ERROR!!!"; cat error;) \
+	    fi) \
+	  else echo "   PASSED"; \
+	fi
+
+clean:
+	@rm -rf *.xml *.pem error result
+
+clean-local:
+	@rm -rf *.xml *.pem error result
+
+
Index: tests/creddy_tests/ProtoGENI.xml_save
===================================================================
--- tests/creddy_tests/ProtoGENI.xml_save	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,125 +1,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<signed-credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.protogeni.net/resources/credential/credential.xsd" xsi:schemaLocation="http://www.protogeni.net/resources/credential/ext/policy/1 http://www.protogeni.net/resources/credential/ext/policy/1/policy.xsd">
-  <credential xml:id="refCB16DEE0B6F8507C">
- <type>privilege</type>
- <serial>15102</serial>
- <owner_gid>MIIEQTCCA6qgAwIBAgICBAcwDQYJKoZIhvcNAQEEBQAwgeMxCzAJBgNVBAYTAlVT
-MQ0wCwYDVQQIEwRVdGFoMRswGQYDVQQHExJTYWx0IExha2UgU2ltIENpdHkxITAf
-BgNVBAoTGFV0YWggTmV0d29yayBTZWNvbmQgTGlmZTEeMBwGA1UECxMVQ2VydGlm
-aWNhdGUgQXV0aG9yaXR5MSkwJwYDVQQDEyBteWJvc3Muam9ubGFiLnRlc3RiZWQu
-ZW11bGFiLm5ldDE6MDgGCSqGSIb3DQEJARYrdGVzdGJlZC1vcHNAbXlvcHMuam9u
-bGFiLnRlc3RiZWQuZW11bGFiLm5ldDAeFw0xMzA1MjkxMzU5MDFaFw0xNDA1Mjkx
-MzU5MDFaMIGzMQswCQYDVQQGEwJVUzENMAsGA1UECBMEVXRhaDEhMB8GA1UEChMY
-VXRhaCBOZXR3b3JrIFNlY29uZCBMaWZlMRQwEgYDVQQLEwtqb25sYWIudXNlcjEt
-MCsGA1UEAxMkNzcxZGUzY2EtYzg2Ny0xMWUyLWIwMDEtMDAyNGU4NzkyN2ViMS0w
-KwYJKoZIhvcNAQkBFh51c2VyQGpvbmxhYi50ZXN0YmVkLmVtdWxhYi5uZXQwgZ8w
-DQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAJwMbC6tGGlqcL5Jsm65uMQyyr9epUEJ
-MidAV5pMi5I2jlwy+xfI01OT+bmq/ZqB6yLgTERAXMx/xcjA3M9zRcO2h3gK6W2R
-5Jg1sZbocHaS6Qp8nrceXUdnWJxHPxwHlkGcNZisTNrB/jzUIZvzqpHKsHj8SKAF
-ByRXo7FgeEubAgMBAAGjggEwMIIBLDAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBQG
-0yIBzv5opmk6a6YDjdQb+jq09jCBkAYDVR0RBIGIMIGFhjR1cm46cHVibGljaWQ6
-SUROK2pvbmxhYi50ZXN0YmVkLmVtdWxhYi5uZXQrdXNlcit1c2VygR51c2VyQGpv
-bmxhYi50ZXN0YmVkLmVtdWxhYi5uZXSGLXVybjp1dWlkOjc3MWRlM2NhLWM4Njct
-MTFlMi1iMDAxLTAwMjRlODc5MjdlYjBqBggrBgEFBQcBAQReMFwwWgYUaYPMk4Co
-mMyox72xp4CAqq7XihuGQmh0dHBzOi8vbXlib3NzLmpvbmxhYi50ZXN0YmVkLmVt
-dWxhYi5uZXQ6MTIzNjkvcHJvdG9nZW5pL3htbHJwYy9zYTANBgkqhkiG9w0BAQQF
-AAOBgQBcdrf70YPbnIoQvlUdX/rBRh4Xxo55uqJ8kZEdnIKcN/OaiwYkVuPHWl/k
-qxmTnB707+e9uhhszNhQLuWnXuD+w08gcBUNQiUxF9MjW1nw1LrLQjvShetJKVs6
-Uut/UnbDbeS05LkhQw0I1Q75alZcY6r5qRZkmcbDisR8IRHjJg==
-</owner_gid>
- <owner_urn>urn:publicid:IDN+jonlab.testbed.emulab.net+user+user</owner_urn>
- <target_gid>MIID/jCCA2egAwIBAgICA/gwDQYJKoZIhvcNAQEEBQAwgeMxCzAJBgNVBAYTAlVT
-MQ0wCwYDVQQIEwRVdGFoMRswGQYDVQQHExJTYWx0IExha2UgU2ltIENpdHkxITAf
-BgNVBAoTGFV0YWggTmV0d29yayBTZWNvbmQgTGlmZTEeMBwGA1UECxMVQ2VydGlm
-aWNhdGUgQXV0aG9yaXR5MSkwJwYDVQQDEyBteWJvc3Muam9ubGFiLnRlc3RiZWQu
-ZW11bGFiLm5ldDE6MDgGCSqGSIb3DQEJARYrdGVzdGJlZC1vcHNAbXlvcHMuam9u
-bGFiLnRlc3RiZWQuZW11bGFiLm5ldDAeFw0xMzA0MjIxNTE1NDNaFw0xODEwMTMx
-NjE1NDNaMIG+MQswCQYDVQQGEwJVUzENMAsGA1UECBMEVXRhaDEhMB8GA1UEChMY
-VXRhaCBOZXR3b3JrIFNlY29uZCBMaWZlMRIwEAYDVQQLEwlqb25sYWIuc2ExLTAr
-BgNVBAMTJGUxYTIxMzNkLWFiNjctMTFlMi1iMDAxLTAwMjRlODc5MjdlYjE6MDgG
-CSqGSIb3DQEJARYrdGVzdGJlZC1vcHNAbXlvcHMuam9ubGFiLnRlc3RiZWQuZW11
-bGFiLm5ldDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAzYZo6Dq9Yo+LZ/Ah
-M2f6r/jkO/tJow5h6A4F4kqZfHIS1lyN/zICra47qjHpgrBC3npR5+ibr4AosC4m
-wDo09yFHbS0CUSIGuemt7Nnt/siD8ULqXwYMwHHDhr+wQnqgjiPoo0FT69lbfiQ3
-P1IH6TVn8j5vK/5i1PtolKqUg5MCAwEAAaOB4zCB4DAdBgNVHQ4EFgQUbXWxdwVR
-Ouopn6qnsRp9jaY9nBYwQgYDVR0RBDswOYY3dXJuOnB1YmxpY2lkOklETitqb25s
-YWIudGVzdGJlZC5lbXVsYWIubmV0K2F1dGhvcml0eStzYTAPBgNVHRMBAf8EBTAD
-AQH/MGoGCCsGAQUFBwEBBF4wXDBaBhRpg8yTgKiYzKjHvbGngICqrteKG4ZCaHR0
-cHM6Ly9teWJvc3Muam9ubGFiLnRlc3RiZWQuZW11bGFiLm5ldDoxMjM2OS9wcm90
-b2dlbmkveG1scnBjL3NhMA0GCSqGSIb3DQEBBAUAA4GBAHUtR537wn94Em+BJUS4
-lb6qQ/mDG49l1K12XJghyKU40pQCxRKlp4EWScghgtwcpBTaCcA3+ZOgkdwnHXLx
-pCabA69clBKdncqaaUzSCx4AGjGe9yMX6WliBvvh2dODQZeFlK7C9B7mTvkTFv4Z
-iMdQbxu/Fh8LdtU+ymuXekid
-</target_gid>
- <target_urn>urn:publicid:IDN+jonlab.testbed.emulab.net+authority+sa</target_urn>
- <uuid>9bc8ec4e-c869-11e2-b001-0024e87927eb</uuid>
- <expires>2013-05-30T14:11:08Z</expires>
-  <privileges>
-<privilege><name>*</name><can_delegate>1</can_delegate></privilege>
-</privileges></credential>
-  <signatures>
-    <Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xml:id="Sig_refCB16DEE0B6F8507C">
- <SignedInfo>
-  <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
-  <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
-  <Reference URI="#refCB16DEE0B6F8507C">
-    <Transforms>
-      <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
-    </Transforms>
-    <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
-    <DigestValue>9/uW8NR0sHZpLAPzxZ32SOLAZhY=</DigestValue>
-    </Reference>
- </SignedInfo>
- <SignatureValue>UfAUZ5RyncNw+YWJOAbmfnOYbpWxeyVLDZ9Kg7yw4idRUE0/CnL0bNkUAT5g2IYF
-W/kKxooWz/1P15/EOtDE+OYJCdnWwR1iEoWoxyQayP94bygAZ7WiLvrwhoTMQ01+
-lvnjClLyTAibpeWp2Uql1KRSX8TFrEKXsKqPt/vhOls=</SignatureValue>
- <KeyInfo>
-  <X509Data>
-   
-   
-   
-  <X509Certificate>MIID/jCCA2egAwIBAgICA/gwDQYJKoZIhvcNAQEEBQAwgeMxCzAJBgNVBAYTAlVT
-MQ0wCwYDVQQIEwRVdGFoMRswGQYDVQQHExJTYWx0IExha2UgU2ltIENpdHkxITAf
-BgNVBAoTGFV0YWggTmV0d29yayBTZWNvbmQgTGlmZTEeMBwGA1UECxMVQ2VydGlm
-aWNhdGUgQXV0aG9yaXR5MSkwJwYDVQQDEyBteWJvc3Muam9ubGFiLnRlc3RiZWQu
-ZW11bGFiLm5ldDE6MDgGCSqGSIb3DQEJARYrdGVzdGJlZC1vcHNAbXlvcHMuam9u
-bGFiLnRlc3RiZWQuZW11bGFiLm5ldDAeFw0xMzA0MjIxNTE1NDNaFw0xODEwMTMx
-NjE1NDNaMIG+MQswCQYDVQQGEwJVUzENMAsGA1UECBMEVXRhaDEhMB8GA1UEChMY
-VXRhaCBOZXR3b3JrIFNlY29uZCBMaWZlMRIwEAYDVQQLEwlqb25sYWIuc2ExLTAr
-BgNVBAMTJGUxYTIxMzNkLWFiNjctMTFlMi1iMDAxLTAwMjRlODc5MjdlYjE6MDgG
-CSqGSIb3DQEJARYrdGVzdGJlZC1vcHNAbXlvcHMuam9ubGFiLnRlc3RiZWQuZW11
-bGFiLm5ldDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAzYZo6Dq9Yo+LZ/Ah
-M2f6r/jkO/tJow5h6A4F4kqZfHIS1lyN/zICra47qjHpgrBC3npR5+ibr4AosC4m
-wDo09yFHbS0CUSIGuemt7Nnt/siD8ULqXwYMwHHDhr+wQnqgjiPoo0FT69lbfiQ3
-P1IH6TVn8j5vK/5i1PtolKqUg5MCAwEAAaOB4zCB4DAdBgNVHQ4EFgQUbXWxdwVR
-Ouopn6qnsRp9jaY9nBYwQgYDVR0RBDswOYY3dXJuOnB1YmxpY2lkOklETitqb25s
-YWIudGVzdGJlZC5lbXVsYWIubmV0K2F1dGhvcml0eStzYTAPBgNVHRMBAf8EBTAD
-AQH/MGoGCCsGAQUFBwEBBF4wXDBaBhRpg8yTgKiYzKjHvbGngICqrteKG4ZCaHR0
-cHM6Ly9teWJvc3Muam9ubGFiLnRlc3RiZWQuZW11bGFiLm5ldDoxMjM2OS9wcm90
-b2dlbmkveG1scnBjL3NhMA0GCSqGSIb3DQEBBAUAA4GBAHUtR537wn94Em+BJUS4
-lb6qQ/mDG49l1K12XJghyKU40pQCxRKlp4EWScghgtwcpBTaCcA3+ZOgkdwnHXLx
-pCabA69clBKdncqaaUzSCx4AGjGe9yMX6WliBvvh2dODQZeFlK7C9B7mTvkTFv4Z
-iMdQbxu/Fh8LdtU+ymuXekid</X509Certificate>
-<X509SubjectName>emailAddress=testbed-ops@myops.jonlab.testbed.emulab.net,CN=e1a2133d-ab67-11e2-b001-0024e87927eb,OU=jonlab.sa,O=Utah Network Second Life,ST=Utah,C=US</X509SubjectName>
-<X509IssuerSerial>
-<X509IssuerName>emailAddress=testbed-ops@myops.jonlab.testbed.emulab.net,CN=myboss.jonlab.testbed.emulab.net,OU=Certificate Authority,O=Utah Network Second Life,L=Salt Lake Sim City,ST=Utah,C=US</X509IssuerName>
-<X509SerialNumber>1016</X509SerialNumber>
-</X509IssuerSerial>
-</X509Data>
-  <KeyValue>
-<RSAKeyValue>
-<Modulus>
-zYZo6Dq9Yo+LZ/AhM2f6r/jkO/tJow5h6A4F4kqZfHIS1lyN/zICra47qjHpgrBC
-3npR5+ibr4AosC4mwDo09yFHbS0CUSIGuemt7Nnt/siD8ULqXwYMwHHDhr+wQnqg
-jiPoo0FT69lbfiQ3P1IH6TVn8j5vK/5i1PtolKqUg5M=
-</Modulus>
-<Exponent>
-AQAB
-</Exponent>
-</RSAKeyValue>
-</KeyValue>
- </KeyInfo>
-</Signature>
-  </signatures>
-</signed-credential>
-
Index: tests/creddy_tests/attribute.ck
===================================================================
--- tests/creddy_tests/attribute.ck	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#!/bin/sh
-
-# attribute.ck
-
-result=`diff attribute.out attribute.save 2>/dev/null`
-
-if [ "$result" = "" ]; then
-    return 0
-else
-    return 1
-fi
-
-
-# ignore
-#
-
Index: tests/creddy_tests/attribute.save
===================================================================
--- tests/creddy_tests/attribute.save	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,14 +1,0 @@
----running attribute 
-Usage: creddy --attribute \
-                --issuer <cert> --key <key> --role <role> \
-                [ --subject-cert <cert> | --subject-id <sha1> \
-                    [ --subject-role <role> ]  ... ] \
-                [ --validity <time> ] --out <file>
-    default validity: 365 days
-    provide exactly one of --subject-cert / --subject-id
-    give multiple --subject-{cert,id} / --subject-role pairs for intersection
-
-    time is specified with optional suffix: s m h d y
-    defaults to days if unspecified
-wrong private key for the cert!!
-creddy: Can't load private key from Coyote_private.pem
Index: tests/creddy_tests/attribute.sh
===================================================================
--- tests/creddy_tests/attribute.sh	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/creddy_tests/attribute.sh	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,30 +1,33 @@
 #!/bin/sh
+#attribute.sh
 
-pwd=`pwd`
-eloc=`which creddy | sed 's/\/creddy//'`
-if [ "$eloc" = "" ]; then
-  echo "ERROR: creddy is not in the search path!!!"
-  exit 1
-fi
+. ${TESTDIR}/test_util.sh
 
-$eloc/creddy --attribute \
+runTest "creddy_tests/attribute.sh" "test1"  \
+"$eloc/creddy --attribute \
        --issuer Acme_ID.pem --key Acme_private.pem --role roleOne \
        --subject-cert Acme_ID.pem --subject-role simple_subject_role \
-       --out Acme_roleOne__Acme_simple_subject_role_attr.xml
+       --out Acme_roleOne__Acme_simple_subject_role_attr.xml" \
+0  "simple role attribute creation with same issuer"
 
-$eloc/creddy --attribute \
+runTest "creddy_tests/attribute.sh" "test2"  \
+"$eloc/creddy --attribute \
        --issuer Acme_ID.pem --role roleTwo \
        --subject-cert Acme_ID.pem --subject-role simple_subject_role \
-       --out Acme_roleTwo__Acme_simple_subject_role_attr.xml
+       --out Acme_roleTwo__Acme_simple_subject_role_attr.xml" \
+1  "simple role attribute creation without privkey key"
 
-$eloc/creddy --attribute \
+runTest "creddy_tests/attribute.sh" "test3"  \
+"$eloc/creddy --attribute \
        --issuer Acme_ID.pem --key Acme_private.pem --role roleThree \
        --subject-cert Coyote_ID.pem --subject-role simple_subject_role \
-       --out Acme_roleThree__Coyote_simple_subject_role_attr.xml
+       --out Acme_roleThree__Coyote_simple_subject_role_attr.xml" \
+0  "simple role attribute creation with differ issuer certs"
 
-$eloc/creddy --attribute \
+runTest "creddy_tests/attribute.sh" "test4"  \
+"$eloc/creddy --attribute \
        --issuer Acme_ID.pem --key Coyote_private.pem --role roleFour \
        --subject-cert Coyote_ID.pem --subject-role simple_subject_role \
-       --out Acme_roleFour__Coyote_simple_subject_role_attr.xml
+       --out Acme_roleFour__Coyote_simple_subject_role_attr.xml" \
+1  "simple role attribute creation with wrong privkey key"
 
-
Index: tests/creddy_tests/attribute_rule.ck
===================================================================
--- tests/creddy_tests/attribute_rule.ck	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,21 +1,0 @@
-#!/bin/sh
-
-# attribute_rule.ck
-
-result=`diff -I "sneaky_friend" attribute_rule.out attribute_rule.save 2>/dev/null`
-
-if [ "$result" = "" ]; then
-    return 0
-else
-    return 1
-fi
-
-
-# ignore
-
-#
-#2c2
-#< 42d367c6c599ac9d505cafa9abe92fd00d587db5.sneaky_friend<-a1dca2221c256393553edb5369980b4c04768dc0
-#---
-#> 0331e8fb4e0b4a58fcda5b938eaeab6a0663d7d3.sneaky_friend<-7ab52740e981d1c98589bed128e94fbefffa181a
-#
Index: tests/creddy_tests/attribute_rule.save
===================================================================
--- tests/creddy_tests/attribute_rule.save	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,2 +1,0 @@
----running attribute_rule 
-0331e8fb4e0b4a58fcda5b938eaeab6a0663d7d3.sneaky_friend<-7ab52740e981d1c98589bed128e94fbefffa181a
Index: tests/creddy_tests/attribute_rule.sh
===================================================================
--- tests/creddy_tests/attribute_rule.sh	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/creddy_tests/attribute_rule.sh	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,26 +1,21 @@
 #!/bin/sh
-
 #attribute_rule.sh
 
-pwd=`pwd`
-eloc=`which creddy | sed 's/\/creddy//'`
-if [ "$eloc" = "" ]; then
-  echo "ERROR: creddy is not in the search path!!!"
-  exit 1
-fi
+. ${TESTDIR}/test_util.sh
 
-$eloc/creddy --generate --cn Bigbird 1>/dev/null 2>& 1
-$eloc/creddy --generate --cn Coyote 1>/dev/null 2>& 1
-
-bigbird=`creddy --keyid --cert Bigbird_ID.pem`
-coyote=`creddy --keyid --cert Coyote_ID.pem`
+bigbird=`$eloc/creddy --keyid --cert Bigbird_ID.pem`
+coyote=`$eloc/creddy --keyid --cert Coyote_ID.pem`
 
 rule="$coyote.sneaky_friend<-$bigbird"
 
-$eloc/creddy --attribute \
+runTest "creddy_tests/attribute_rule.sh" "test1"  \
+"$eloc/creddy --attribute \
        --issuer Coyote_ID.pem --key Coyote_private.pem \
        --attrrule "$rule" \
-       --out Coyote_sneakyFriend__Bigbird_attr.xml
+       --out Coyote_sneakyFriend__Bigbird_attr.xml"  \
+0  "trying making attribute using attrrule option"
 
-$eloc/creddy --roles --cert Coyote_sneakyFriend__Bigbird_attr.xml
+runTest "creddy_tests/attribute_rule.sh" "test2"  \
+"$eloc/creddy --roles --cert Coyote_sneakyFriend__Bigbird_attr.xml"  \
+0  "double check on the attribute made with atttrrule option"
 
Index: tests/creddy_tests/display.ck
===================================================================
--- tests/creddy_tests/display.ck	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#!/bin/sh
-
-# display.ck
-
-result=`diff -I "UTC" -I "GMT" display.out display.save 2>/dev/null |wc -l`
-
-if [ $result -eq 22 ]; then
-    return 0
-else
-    return 1
-fi
-
-## ignore timestamp difference being flagged between UTC and GMT
-
Index: tests/creddy_tests/display.save
===================================================================
--- tests/creddy_tests/display.save	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,73 +1,0 @@
----running display 
-Issuer: /CN=Acme
-Subject: /CN=Acme
-Validity:
-    Not before: 2013-06-05 17:43:03 PST [1370482983]
-    Not after:  2016-05-20 17:43:03 PST [1463794983]
-creddy: Couldn't load Acme_private.pem as an ID or attribute
-Issuer: /CN=Acme
-Subject: /CN=Acme
-Validity:
-    Not before: 2013-06-05 17:43:13 GMT [1370482993]
-    Not after:  2014-06-05 17:43:05 GMT [1402018985]
-Roles: 30371212e9d3d12cf599d221f11bf3450086ef74.buy_rockets<-30371212e9d3d12cf599d221f11bf3450086ef74.preferred_customer
-Issuer: /CN=Acme
-Subject: /CN=Acme
-Validity:
-    Not before: 2013-06-05 17:43:13 GMT [1370482993]
-    Not after:  2014-06-05 17:43:05 GMT [1402018985]
-Roles: 30371212e9d3d12cf599d221f11bf3450086ef74.preferred_customer<-f8fb28f96aa2e5cc0cf60ffbb34a6fd6887f6c29
-creddy: Couldn't load bad_attr.xml as an ID or attribute
-Issuer: /C=US/ST=California/L=Marina del Rey/O=DETER Network Security Testbed/OU=Certificate Authority/CN=boss.isi.deterlab.net/emailAddress=testbed-ops@isi.deterlab.net
-Subject: /C=US/ST=California/O=DETER Network Security Testbed/OU=sslxmlrpc/CN=70f4db5c-c7f5-11dc-a204-000423c28e76/emailAddress=faber@isi.deterlab.net
-Validity:
-    Not before: 2010-11-05 22:35:12 PST [1289025312]
-    Not after:  2013-08-01 22:35:12 PST [1375425312]
-Issuer: /C=US/ST=California/L=Marina del Rey/O=DETER Network Security Testbed/OU=Certificate Authority/CN=boss.isi.deterlab.net/emailAddress=testbed-ops@isi.deterlab.net
-Subject: /C=US/ST=California/O=DETER Network Security Testbed/OU=sslxmlrpc/CN=70f4db5c-c7f5-11dc-a204-000423c28e76/emailAddress=faber@isi.deterlab.net
-Validity:
-    Not before: 2013-06-05 17:43:13 GMT [1370482993]
-    Not after:  2014-05-20 17:39:55 GMT [1400636395]
-Roles: 0a778934b93d546406d195d18e4f208af11ea84a.test_attr<-633aadf1753647ba60f28b7310f5a56cd32ab7e2
-creddy: Couldn't load ProtoGENI.xml as an ID or attribute
-Issuer: /C=US/ST=Utah/L=Salt Lake Sim City/O=Utah Network Second Life/OU=Certificate Authority/CN=myboss.jonlab.testbed.emulab.net/emailAddress=testbed-ops@myops.jonlab.testbed.emulab.net
-Subject: /C=US/ST=Utah/O=Utah Network Second Life/OU=jonlab.sa/CN=e1a2133d-ab67-11e2-b001-0024e87927eb/emailAddress=testbed-ops@myops.jonlab.testbed.emulab.net
-Validity:
-    Not before: 2013-04-22 15:15:43 PST [1366672543]
-    Not after:  2018-10-13 16:15:43 PST [1539476143]
-Issuer: /CN=issuer
-Subject: /CN=issuer
-Validity:
-    Not before: 2013-06-05 17:43:14 GMT [1370482994]
-    Not after:  2015-07-14 19:52:08 GMT [1436932328]
-Roles: 378a1922494c157372be987d9b8657633119d9e0.speaks_for_f75358f7f87f3fe641121ad37fd5c3163b0896ff <- f75358f7f87f3fe641121ad37fd5c3163b0896ff.speaks_for_f75358f7f87f3fe641121ad37fd5c3163b0896ff
-Issuer: /CN=issuer
-Subject: /CN=issuer
-Validity:
-    Not before: 2013-06-05 17:43:14 GMT [1370482994]
-    Not after:  2015-07-14 19:52:08 GMT [1436932328]
-Roles: 378a1922494c157372be987d9b8657633119d9e0.speaks_for_f75358f7f87f3fe641121ad37fd5c3163b0896ff <- f75358f7f87f3fe641121ad37fd5c3163b0896ff
-Issuer: /CN=issuer
-Subject: /CN=issuer
-Validity:
-    Not before: 2013-06-05 17:43:14 GMT [1370482994]
-    Not after:  2015-07-14 19:52:08 GMT [1436932328]
-Roles: 378a1922494c157372be987d9b8657633119d9e0.refresh_633aadf1753647ba60f28b7310f5a56cd32ab7e2 <- 378a1922494c157372be987d9b8657633119d9e0.speaks_for_f75358f7f87f3fe641121ad37fd5c3163b0896ff
-Issuer: /CN=issuer
-Subject: /CN=issuer
-Validity:
-    Not before: 2013-06-05 17:43:14 GMT [1370482994]
-    Not after:  2015-07-14 19:52:08 GMT [1436932328]
-Roles: 378a1922494c157372be987d9b8657633119d9e0.test2_633aadf1753647ba60f28b7310f5a56cd32ab7e2 <- 378a1922494c157372be987d9b8657633119d9e0.speaks_for_f75358f7f87f3fe641121ad37fd5c3163b0896ff
-Issuer: /CN=issuer
-Subject: /CN=issuer
-Validity:
-    Not before: 2013-06-05 17:43:14 GMT [1370482994]
-    Not after:  2015-07-14 19:52:08 GMT [1436932328]
-Roles: 378a1922494c157372be987d9b8657633119d9e0.test2_633aadf1753647ba60f28b7310f5a56cd32ab7e2 <- 378a1922494c157372be987d9b8657633119d9e0.can_delegate_test2_633aadf1753647ba60f28b7310f5a56cd32ab7e2.test2_633aadf1753647ba60f28b7310f5a56cd32ab7e2
-Issuer: /CN=issuer
-Subject: /CN=issuer
-Validity:
-    Not before: 2013-06-05 17:43:14 GMT [1370482994]
-    Not after:  2015-07-14 19:52:08 GMT [1436932328]
-Roles: 378a1922494c157372be987d9b8657633119d9e0.can_delegate_test2_633aadf1753647ba60f28b7310f5a56cd32ab7e2 <- f75358f7f87f3fe641121ad37fd5c3163b0896ff
Index: tests/creddy_tests/display.sh
===================================================================
--- tests/creddy_tests/display.sh	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/creddy_tests/display.sh	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,21 +1,50 @@
 #!/bin/sh
+#display.sh
 
-pwd=`pwd`
-eloc=`which creddy | sed 's/\/creddy//'`
-if [ "$eloc" = "" ]; then
-  echo "ERROR: creddy is not in the search path!!!"
-  exit 1
-fi
+. ${TESTDIR}/test_util.sh
 
-$eloc/creddy --display --show=all --cert Acme_ID.pem
-$eloc/creddy --display --show=all --cert Acme_private.pem
-$eloc/creddy --display --show=all --cert Acme_buy_rockets__Acme_preferred_customer_attr.xml
-$eloc/creddy --display --show=all --cert Acme_preferred_customer__Coyote_attr.xml
-$eloc/creddy --display --show=all --cert bad_attr.xml
+runTest "creddy_tests/display.sh" "test1"  \
+"$eloc/creddy --display --show=all --cert Acme_ID.pem" \
+0  "display an issuer cert"
 
-$eloc/creddy --display --show=all --cert not_ss.pem
-$eloc/creddy --display --show=all --cert not_ss.xml
+runTest "creddy_tests/display.sh" "test2"  \
+"$eloc/creddy --display --show=all --cert Acme_private.pem" \
+1  "display a privkey file"
 
-$eloc/creddy --display --show=all --cert ProtoGENI.xml
-$eloc/creddy --display --show=all --cert PGissuer.pem
-$eloc/creddy --display --show=all --cert priv.xml
+runTest "creddy_tests/display.sh" "test3"  \
+"$eloc/creddy --display --show=all --cert Acme_buy_rockets__Acme_preferred_customer_attr.xml" \
+0  "display an attribute cert"
+
+runTest "creddy_tests/display.sh" "test4"  \
+"$eloc/creddy --display --show=all --cert Acme_preferred_customer__Coyote_attr.xml" \
+0  "display an attribute cert"
+
+runTest "creddy_tests/display.sh" "test5"  \
+"$eloc/creddy --display --show=all --cert bad_attr.xml" \
+1  "supplied a none existing attribute cert"
+
+runTest "creddy_tests/display.sh" "test6"  \
+"$eloc/creddy --display --show=all --cert not_ss.pem" \
+0  "display an none self signed issuer cert"
+
+runTest "creddy_tests/display.sh" "test7"  \
+"$eloc/creddy --display --show=all --cert not_ss.xml" \
+0  "display a none self signed attribute cert"
+
+runTest "creddy_tests/display.sh" "test8"  \
+"$eloc/creddy --display --show=all --cert iProtoGENI.xml" \
+1  "display an expired GENI signed attribute cert"
+
+runTest "creddy_tests/display.sh" "test9"  \
+"$eloc/creddy --display --show=all --cert ProtoGENI.xml" \
+0  "FAKE:display a valid GENI signed attribute cert"
+
+runTest "creddy_tests/display.sh" "test10"  \
+"$eloc/creddy --display --show=all --cert PGissuer.pem" \
+0  "display a GENI issuer cert"
+
+runTest "creddy_tests/display.sh" "test11"  \
+"$eloc/creddy --display --show=all --cert priv.xml" \
+0  "display a GENI privilege attribute cert"
+
+
Index: tests/creddy_tests/generate.ck
===================================================================
--- tests/creddy_tests/generate.ck	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,17 +1,0 @@
-#!/bin/sh
-
-# generate.ck
-
-result=`diff -I "buy_rockets" generate.out generate.save 2>/dev/null`
-list=`ls -l *ID.pem |wc -l`
-
-if [ "$result" = "" -a $list -eq 6 ]; then
-    return 0
-else
-    return 1
-fi
-
-
-# ignore
-#
-
Index: tests/creddy_tests/generate.sh
===================================================================
--- tests/creddy_tests/generate.sh	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/creddy_tests/generate.sh	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,14 +1,21 @@
 #!/bin/sh
+#generate.sh
 
-pwd=`pwd`
-eloc=`which creddy | sed 's/\/creddy//'`
-if [ "$eloc" = "" ]; then
-  echo "ERROR: creddy is not in the search path!!!"
-  exit 1
-fi
+. ${TESTDIR}/test_util.sh
 
-$eloc/creddy --generate --cn Bigbird
-$eloc/creddy --generate --cn 12_3
-## looks like optarg just picked up the 'Bad' part
-$eloc/creddy --generate --cn Bad$name
-$eloc/creddy --generate --cn abc --cert bad_attr.xml
+runTest "creddy_tests/generate.sh" "test1", \
+"$eloc/creddy --generate --cn Bigbird"  \
+0  "simple id credential generation"
+
+runTest "creddy_tests/generate.sh" "test2", \
+"$eloc/creddy --generate --cn 12_3"  \
+0  "generate with underline in name"
+
+runTest "creddy_tests/generate.sh" "test3", \
+"$eloc/creddy --generate --cn Bad$name"  \
+0  "generate with special $ as Bad$name, later part just got dropped"
+
+runTest "creddy_tests/generate.sh" "test4", \
+"$eloc/creddy --generate --cn abc --cert gen_attr.xml"  \
+0  "generate with supplied attribute name"
+
Index: tests/creddy_tests/iProtoGENI.xml_save
===================================================================
--- tests/creddy_tests/iProtoGENI.xml_save	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/creddy_tests/iProtoGENI.xml_save	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<signed-credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.protogeni.net/resources/credential/credential.xsd" xsi:schemaLocation="http://www.protogeni.net/resources/credential/ext/policy/1 http://www.protogeni.net/resources/credential/ext/policy/1/policy.xsd">
+  <credential xml:id="refCB16DEE0B6F8507C">
+ <type>privilege</type>
+ <serial>15102</serial>
+ <owner_gid>MIIEQTCCA6qgAwIBAgICBAcwDQYJKoZIhvcNAQEEBQAwgeMxCzAJBgNVBAYTAlVT
+MQ0wCwYDVQQIEwRVdGFoMRswGQYDVQQHExJTYWx0IExha2UgU2ltIENpdHkxITAf
+BgNVBAoTGFV0YWggTmV0d29yayBTZWNvbmQgTGlmZTEeMBwGA1UECxMVQ2VydGlm
+aWNhdGUgQXV0aG9yaXR5MSkwJwYDVQQDEyBteWJvc3Muam9ubGFiLnRlc3RiZWQu
+ZW11bGFiLm5ldDE6MDgGCSqGSIb3DQEJARYrdGVzdGJlZC1vcHNAbXlvcHMuam9u
+bGFiLnRlc3RiZWQuZW11bGFiLm5ldDAeFw0xMzA1MjkxMzU5MDFaFw0xNDA1Mjkx
+MzU5MDFaMIGzMQswCQYDVQQGEwJVUzENMAsGA1UECBMEVXRhaDEhMB8GA1UEChMY
+VXRhaCBOZXR3b3JrIFNlY29uZCBMaWZlMRQwEgYDVQQLEwtqb25sYWIudXNlcjEt
+MCsGA1UEAxMkNzcxZGUzY2EtYzg2Ny0xMWUyLWIwMDEtMDAyNGU4NzkyN2ViMS0w
+KwYJKoZIhvcNAQkBFh51c2VyQGpvbmxhYi50ZXN0YmVkLmVtdWxhYi5uZXQwgZ8w
+DQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAJwMbC6tGGlqcL5Jsm65uMQyyr9epUEJ
+MidAV5pMi5I2jlwy+xfI01OT+bmq/ZqB6yLgTERAXMx/xcjA3M9zRcO2h3gK6W2R
+5Jg1sZbocHaS6Qp8nrceXUdnWJxHPxwHlkGcNZisTNrB/jzUIZvzqpHKsHj8SKAF
+ByRXo7FgeEubAgMBAAGjggEwMIIBLDAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBQG
+0yIBzv5opmk6a6YDjdQb+jq09jCBkAYDVR0RBIGIMIGFhjR1cm46cHVibGljaWQ6
+SUROK2pvbmxhYi50ZXN0YmVkLmVtdWxhYi5uZXQrdXNlcit1c2VygR51c2VyQGpv
+bmxhYi50ZXN0YmVkLmVtdWxhYi5uZXSGLXVybjp1dWlkOjc3MWRlM2NhLWM4Njct
+MTFlMi1iMDAxLTAwMjRlODc5MjdlYjBqBggrBgEFBQcBAQReMFwwWgYUaYPMk4Co
+mMyox72xp4CAqq7XihuGQmh0dHBzOi8vbXlib3NzLmpvbmxhYi50ZXN0YmVkLmVt
+dWxhYi5uZXQ6MTIzNjkvcHJvdG9nZW5pL3htbHJwYy9zYTANBgkqhkiG9w0BAQQF
+AAOBgQBcdrf70YPbnIoQvlUdX/rBRh4Xxo55uqJ8kZEdnIKcN/OaiwYkVuPHWl/k
+qxmTnB707+e9uhhszNhQLuWnXuD+w08gcBUNQiUxF9MjW1nw1LrLQjvShetJKVs6
+Uut/UnbDbeS05LkhQw0I1Q75alZcY6r5qRZkmcbDisR8IRHjJg==
+</owner_gid>
+ <owner_urn>urn:publicid:IDN+jonlab.testbed.emulab.net+user+user</owner_urn>
+ <target_gid>MIID/jCCA2egAwIBAgICA/gwDQYJKoZIhvcNAQEEBQAwgeMxCzAJBgNVBAYTAlVT
+MQ0wCwYDVQQIEwRVdGFoMRswGQYDVQQHExJTYWx0IExha2UgU2ltIENpdHkxITAf
+BgNVBAoTGFV0YWggTmV0d29yayBTZWNvbmQgTGlmZTEeMBwGA1UECxMVQ2VydGlm
+aWNhdGUgQXV0aG9yaXR5MSkwJwYDVQQDEyBteWJvc3Muam9ubGFiLnRlc3RiZWQu
+ZW11bGFiLm5ldDE6MDgGCSqGSIb3DQEJARYrdGVzdGJlZC1vcHNAbXlvcHMuam9u
+bGFiLnRlc3RiZWQuZW11bGFiLm5ldDAeFw0xMzA0MjIxNTE1NDNaFw0xODEwMTMx
+NjE1NDNaMIG+MQswCQYDVQQGEwJVUzENMAsGA1UECBMEVXRhaDEhMB8GA1UEChMY
+VXRhaCBOZXR3b3JrIFNlY29uZCBMaWZlMRIwEAYDVQQLEwlqb25sYWIuc2ExLTAr
+BgNVBAMTJGUxYTIxMzNkLWFiNjctMTFlMi1iMDAxLTAwMjRlODc5MjdlYjE6MDgG
+CSqGSIb3DQEJARYrdGVzdGJlZC1vcHNAbXlvcHMuam9ubGFiLnRlc3RiZWQuZW11
+bGFiLm5ldDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAzYZo6Dq9Yo+LZ/Ah
+M2f6r/jkO/tJow5h6A4F4kqZfHIS1lyN/zICra47qjHpgrBC3npR5+ibr4AosC4m
+wDo09yFHbS0CUSIGuemt7Nnt/siD8ULqXwYMwHHDhr+wQnqgjiPoo0FT69lbfiQ3
+P1IH6TVn8j5vK/5i1PtolKqUg5MCAwEAAaOB4zCB4DAdBgNVHQ4EFgQUbXWxdwVR
+Ouopn6qnsRp9jaY9nBYwQgYDVR0RBDswOYY3dXJuOnB1YmxpY2lkOklETitqb25s
+YWIudGVzdGJlZC5lbXVsYWIubmV0K2F1dGhvcml0eStzYTAPBgNVHRMBAf8EBTAD
+AQH/MGoGCCsGAQUFBwEBBF4wXDBaBhRpg8yTgKiYzKjHvbGngICqrteKG4ZCaHR0
+cHM6Ly9teWJvc3Muam9ubGFiLnRlc3RiZWQuZW11bGFiLm5ldDoxMjM2OS9wcm90
+b2dlbmkveG1scnBjL3NhMA0GCSqGSIb3DQEBBAUAA4GBAHUtR537wn94Em+BJUS4
+lb6qQ/mDG49l1K12XJghyKU40pQCxRKlp4EWScghgtwcpBTaCcA3+ZOgkdwnHXLx
+pCabA69clBKdncqaaUzSCx4AGjGe9yMX6WliBvvh2dODQZeFlK7C9B7mTvkTFv4Z
+iMdQbxu/Fh8LdtU+ymuXekid
+</target_gid>
+ <target_urn>urn:publicid:IDN+jonlab.testbed.emulab.net+authority+sa</target_urn>
+ <uuid>9bc8ec4e-c869-11e2-b001-0024e87927eb</uuid>
+ <expires>2013-05-30T14:11:08Z</expires>
+  <privileges>
+<privilege><name>*</name><can_delegate>1</can_delegate></privilege>
+</privileges></credential>
+  <signatures>
+    <Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xml:id="Sig_refCB16DEE0B6F8507C">
+ <SignedInfo>
+  <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
+  <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
+  <Reference URI="#refCB16DEE0B6F8507C">
+    <Transforms>
+      <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
+    </Transforms>
+    <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
+    <DigestValue>9/uW8NR0sHZpLAPzxZ32SOLAZhY=</DigestValue>
+    </Reference>
+ </SignedInfo>
+ <SignatureValue>UfAUZ5RyncNw+YWJOAbmfnOYbpWxeyVLDZ9Kg7yw4idRUE0/CnL0bNkUAT5g2IYF
+W/kKxooWz/1P15/EOtDE+OYJCdnWwR1iEoWoxyQayP94bygAZ7WiLvrwhoTMQ01+
+lvnjClLyTAibpeWp2Uql1KRSX8TFrEKXsKqPt/vhOls=</SignatureValue>
+ <KeyInfo>
+  <X509Data>
+   
+   
+   
+  <X509Certificate>MIID/jCCA2egAwIBAgICA/gwDQYJKoZIhvcNAQEEBQAwgeMxCzAJBgNVBAYTAlVT
+MQ0wCwYDVQQIEwRVdGFoMRswGQYDVQQHExJTYWx0IExha2UgU2ltIENpdHkxITAf
+BgNVBAoTGFV0YWggTmV0d29yayBTZWNvbmQgTGlmZTEeMBwGA1UECxMVQ2VydGlm
+aWNhdGUgQXV0aG9yaXR5MSkwJwYDVQQDEyBteWJvc3Muam9ubGFiLnRlc3RiZWQu
+ZW11bGFiLm5ldDE6MDgGCSqGSIb3DQEJARYrdGVzdGJlZC1vcHNAbXlvcHMuam9u
+bGFiLnRlc3RiZWQuZW11bGFiLm5ldDAeFw0xMzA0MjIxNTE1NDNaFw0xODEwMTMx
+NjE1NDNaMIG+MQswCQYDVQQGEwJVUzENMAsGA1UECBMEVXRhaDEhMB8GA1UEChMY
+VXRhaCBOZXR3b3JrIFNlY29uZCBMaWZlMRIwEAYDVQQLEwlqb25sYWIuc2ExLTAr
+BgNVBAMTJGUxYTIxMzNkLWFiNjctMTFlMi1iMDAxLTAwMjRlODc5MjdlYjE6MDgG
+CSqGSIb3DQEJARYrdGVzdGJlZC1vcHNAbXlvcHMuam9ubGFiLnRlc3RiZWQuZW11
+bGFiLm5ldDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAzYZo6Dq9Yo+LZ/Ah
+M2f6r/jkO/tJow5h6A4F4kqZfHIS1lyN/zICra47qjHpgrBC3npR5+ibr4AosC4m
+wDo09yFHbS0CUSIGuemt7Nnt/siD8ULqXwYMwHHDhr+wQnqgjiPoo0FT69lbfiQ3
+P1IH6TVn8j5vK/5i1PtolKqUg5MCAwEAAaOB4zCB4DAdBgNVHQ4EFgQUbXWxdwVR
+Ouopn6qnsRp9jaY9nBYwQgYDVR0RBDswOYY3dXJuOnB1YmxpY2lkOklETitqb25s
+YWIudGVzdGJlZC5lbXVsYWIubmV0K2F1dGhvcml0eStzYTAPBgNVHRMBAf8EBTAD
+AQH/MGoGCCsGAQUFBwEBBF4wXDBaBhRpg8yTgKiYzKjHvbGngICqrteKG4ZCaHR0
+cHM6Ly9teWJvc3Muam9ubGFiLnRlc3RiZWQuZW11bGFiLm5ldDoxMjM2OS9wcm90
+b2dlbmkveG1scnBjL3NhMA0GCSqGSIb3DQEBBAUAA4GBAHUtR537wn94Em+BJUS4
+lb6qQ/mDG49l1K12XJghyKU40pQCxRKlp4EWScghgtwcpBTaCcA3+ZOgkdwnHXLx
+pCabA69clBKdncqaaUzSCx4AGjGe9yMX6WliBvvh2dODQZeFlK7C9B7mTvkTFv4Z
+iMdQbxu/Fh8LdtU+ymuXekid</X509Certificate>
+<X509SubjectName>emailAddress=testbed-ops@myops.jonlab.testbed.emulab.net,CN=e1a2133d-ab67-11e2-b001-0024e87927eb,OU=jonlab.sa,O=Utah Network Second Life,ST=Utah,C=US</X509SubjectName>
+<X509IssuerSerial>
+<X509IssuerName>emailAddress=testbed-ops@myops.jonlab.testbed.emulab.net,CN=myboss.jonlab.testbed.emulab.net,OU=Certificate Authority,O=Utah Network Second Life,L=Salt Lake Sim City,ST=Utah,C=US</X509IssuerName>
+<X509SerialNumber>1016</X509SerialNumber>
+</X509IssuerSerial>
+</X509Data>
+  <KeyValue>
+<RSAKeyValue>
+<Modulus>
+zYZo6Dq9Yo+LZ/AhM2f6r/jkO/tJow5h6A4F4kqZfHIS1lyN/zICra47qjHpgrBC
+3npR5+ibr4AosC4mwDo09yFHbS0CUSIGuemt7Nnt/siD8ULqXwYMwHHDhr+wQnqg
+jiPoo0FT69lbfiQ3P1IH6TVn8j5vK/5i1PtolKqUg5M=
+</Modulus>
+<Exponent>
+AQAB
+</Exponent>
+</RSAKeyValue>
+</KeyValue>
+ </KeyInfo>
+</Signature>
+  </signatures>
+</signed-credential>
+
Index: tests/creddy_tests/keyid.ck
===================================================================
--- tests/creddy_tests/keyid.ck	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,13 +1,0 @@
-#!/bin/sh
-
-# keyid.ck
-
-q=`diff -q keyid.out keyid.save 2>/dev/null |grep -c differ`
-result=`diff keyid.out keyid.save 2>/dev/null |wc -l`
-
-if [ $q -eq 1 -a $result -eq 4 ]; then
-    return 0
-else
-    return 1
-fi
-
Index: tests/creddy_tests/keyid.save
===================================================================
--- tests/creddy_tests/keyid.save	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,10 +1,0 @@
----running keyid 
-cfa52808c42825751443522edd790b05e4937049
-creddy: Couldn't load ID cert from Acme_private.pem
-creddy: Couldn't load ID cert from Acme_buy_rockets__Acme_preferred_customer_attr.xml
-creddy: Couldn't load ID cert from bad_attr.xml
-0a778934b93d546406d195d18e4f208af11ea84a
-creddy: Couldn't load ID cert from not_ss.xml
-creddy: Couldn't load ID cert from priv.xml
-6d75b17705513aea299faaa7b11a7d8da63d9c16
-creddy: Couldn't load ID cert from ProtoGENI.xml
Index: tests/creddy_tests/keyid.sh
===================================================================
--- tests/creddy_tests/keyid.sh	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/creddy_tests/keyid.sh	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,20 +1,41 @@
 #!/bin/sh
+# keyid.sh
 
-pwd=`pwd`
-eloc=`which creddy | sed 's/\/creddy//'`
-if [ "$eloc" = "" ]; then
-  echo "ERROR: creddy is not in the search path!!!"
-  exit 1
-fi
+. ${TESTDIR}/test_util.sh
 
-$eloc/creddy --keyid --cert Acme_ID.pem
-$eloc/creddy --keyid --cert Acme_private.pem
-$eloc/creddy --keyid --cert Acme_buy_rockets__Acme_preferred_customer_attr.xml
-$eloc/creddy --keyid --cert bad_attr.xml
+runTest "creddy_tests/keyid.sh" "test1"  \
+"$eloc/creddy --keyid --cert Acme_ID.pem" \
+0  "supplied with good identity cert"
 
-$eloc/creddy --keyid --cert not_ss.pem
-$eloc/creddy --keyid --cert not_ss.xml
-$eloc/creddy --keyid --cert priv.xml
-$eloc/creddy --keyid --cert PGissuer.pem
-$eloc/creddy --keyid --cert ProtoGENI.xml
+runTest "creddy_tests/keyid.sh" "test2"  \
+"$eloc/creddy --keyid --cert Acme_private.pem" \
+1  "supplied with privkey"
 
+runTest "creddy_tests/keyid.sh" "test3"  \
+"$eloc/creddy --keyid --cert Acme_buy_rockets__Acme_preferred_customer_attr.xml" \
+1  "supplied with attribute cert instead"
+
+runTest "creddy_tests/keyid.sh" "test4"  \
+"$eloc/creddy --keyid --cert bad_attr.xml" \
+1  "supplied with non existing attribute cert"
+
+runTest "creddy_tests/keyid.sh" "test5"  \
+"$eloc/creddy --keyid --cert not_ss.pem" \
+0  "supplied with good none self signed identity cert"
+
+runTest "creddy_tests/keyid.sh" "test6"  \
+"$eloc/creddy --keyid --cert not_ss.xml" \
+1  "supplied with none self signed attribute cert"
+
+runTest "creddy_tests/keyid.sh" "test7"  \
+"$eloc/creddy --keyid --cert priv.xml" \
+1  "supplied with GENI privilege attribute cert"
+
+runTest "creddy_tests/keyid.sh" "test8"  \
+"$eloc/creddy --keyid --cert PGissuer.pem" \
+0  "supplied with GENI issuer cert"
+
+runTest "creddy_tests/keyid.sh" "test9"  \
+"$eloc/creddy --keyid --cert ProtoGENI.xml" \
+1  "supplied with GENI issued attribute cert"
+
Index: tests/creddy_tests/result.save
===================================================================
--- tests/creddy_tests/result.save	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,7 +1,0 @@
-   creddy_tests, verify PASSED
-   creddy_tests, roles PASSED
-   creddy_tests, attribute PASSED
-   creddy_tests, keyid PASSED
-   creddy_tests, generate PASSED
-   creddy_tests, display PASSED
-   creddy_tests, attribute_rule PASSED
Index: tests/creddy_tests/roles.ck
===================================================================
--- tests/creddy_tests/roles.ck	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#!/bin/sh
-
-# roles.ck
-
-result=`diff -I "buy_rockets" roles.out roles.save 2>/dev/null`
-
-if [ "$result" = "" ]; then
-    return 0
-else
-    return 1
-fi
-
Index: tests/creddy_tests/roles.save
===================================================================
--- tests/creddy_tests/roles.save	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,5 +1,0 @@
----running roles 
-creddy: Couldn't get cert from Acme_ID.pem
-creddy: Couldn't get cert from Acme_private.pem
-6a84d8b51dd08c6248a44d52b8709239c663cc90.buy_rockets<-6a84d8b51dd08c6248a44d52b8709239c663cc90.preferred_customer
-creddy: Couldn't get cert from bad_attr.xml
Index: tests/creddy_tests/roles.sh
===================================================================
--- tests/creddy_tests/roles.sh	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/creddy_tests/roles.sh	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,13 +1,35 @@
 #!/bin/sh
+#roles.sh
 
-pwd=`pwd`
-eloc=`which creddy | sed 's/\/creddy//'`
-if [ "$eloc" = "" ]; then
-  echo "ERROR: creddy is not in the search path!!!"
-  exit 1
-fi
+. ${TESTDIR}/test_util.sh
 
-$eloc/creddy --roles --cert Acme_ID.pem
-$eloc/creddy --roles --cert Acme_private.pem
-$eloc/creddy --roles --cert Acme_buy_rockets__Acme_preferred_customer_attr.xml
-$eloc/creddy --roles --cert bad_attr.xml
+runTest "creddy_tests/role.sh" "test1"  \
+"$eloc/creddy --roles --cert Acme_ID.pem" \
+ 1  "supplied  with a issuer cert"
+
+runTest "creddy_tests/role.sh" "test2"  \
+"$eloc/creddy --roles --cert Acme_private.pem" \
+ 1  "supplied with a privkey"
+
+runTest "creddy_tests/role.sh" "test3"  \
+"$eloc/creddy --roles --cert Acme_buy_rockets__Acme_preferred_customer_attr.xml" \
+ 0  "supplied with right attribute cert"
+
+runTest "creddy_tests/role.sh" "test4"  \
+"$eloc/creddy --roles --cert bad_attr.xml" \
+ 1  "supplied with a none existing cert"
+
+runTest "creddy_tests/role.sh" "test5"  \
+"$eloc/creddy --roles --cert priv.xml" \
+ 0  "supplied with a GENI priviledge cert"
+
+runTest "creddy_tests/role.sh" "test6"  \
+"$eloc/creddy --roles --cert not_ss.xml" \
+ 0  "supplied with a none self signed attribute cert"
+
+runTest "creddy_tests/role.sh" "test7"  \
+"$eloc/creddy --roles --cert iProtoGENI.xml" \
+ 1  "supplied with an expired  GENI signed attribute cert"
+
+
+
Index: tests/creddy_tests/run_test
===================================================================
--- tests/creddy_tests/run_test	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,28 +1,0 @@
-#!/bin/sh
-#########
-# run_test
-#
-
-./setup.sh 1>/dev/null 2>&1
-
-# a_run type
-a_run()
-{
-    echo "---running $1 " > $1.out
-    ./$1.sh 1 >> $1.out 2>& 1
-    `./$1.ck`
-    if [ $? -eq 0 ]; then
-       echo "   creddy_tests, $1 PASSED"
-    else
-       echo "   creddy-tests, $1 FAILED"
-    fi
-}
-
-a_run verify
-a_run roles
-a_run attribute
-a_run keyid
-a_run generate
-a_run display
-a_run attribute_rule
-
Index: tests/creddy_tests/setup.sh
===================================================================
--- tests/creddy_tests/setup.sh	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/creddy_tests/setup.sh	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -4,15 +4,11 @@
 #Acme.preferred_customer <- Coyote
 
-rm -rf *.pem *.xml *.out
+. ${TESTDIR}/test_util.sh
 
-pwd=`pwd`
-eloc=`which creddy | sed 's/\/creddy//'`
-if [ "$eloc" = "" ]; then
-  echo "ERROR: creddy is not in the search path!!!"
-  exit 1
-fi
+$eloc/creddy --generate --cn Acme 1>/dev/null 2>&1
+$eloc/creddy --generate --cn Coyote 1>/dev/null 2>&1
 
-$eloc/creddy --generate --cn Acme
-$eloc/creddy --generate --cn Coyote
+$eloc/creddy --generate --cn Bigbird 1>/dev/null 2>& 1
+$eloc/creddy --generate --cn Coyote 1>/dev/null 2>& 1
 
 $eloc/creddy --attribute \
@@ -30,4 +26,6 @@
 cp priv.xml_save priv.xml
 cp PGissuer.pem_save PGissuer.pem
-cp ProtoGENI.xml_save ProtoGENI.xml
+cp iProtoGENI.xml_save iProtoGENI.xml
+## waiting for a real valid one..
+cp iProtoGENI.xml_save ProtoGENI.xml
 
Index: tests/creddy_tests/verify.ck
===================================================================
--- tests/creddy_tests/verify.ck	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#!/bin/sh
-
-# verify.ck
-
-result=`diff verify.out verify.save 2>/dev/null`
-
-if [ "$result" = "" ]; then
-    return 0
-else
-    return 1
-fi
-
Index: tests/creddy_tests/verify.save
===================================================================
--- tests/creddy_tests/verify.save	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,33 +1,0 @@
----running verify 
-creddy verify, issuer: Coyote_ID.pem
-               attribute cert: Acme_buy_rockets__Acme_preferred_customer_attr.xml
-  issuer and attribute cert have mismatched principals
-  issuer cert still valid
-  attribute cert still valid
-creddy verify, issuer: Acme_ID.pem
-               attribute cert: Acme_buy_rockets__Acme_preferred_customer_attr.xml
-  issuer and attribute cert have matching principals
-  issuer cert still valid
-  attribute cert still valid
-creddy: Can't load issuer cert from Acme_private.pem
-creddy verify, issuer: Acme_private.pem
-creddy verify, issuer: Acme_ID.pem
-               attribute cert: bad_attr.xml
-  fail to extract attribute cert but...
-  issuer cert still valid
-creddy: Can't load issuer cert from Acme_buy_rockets__Acme_preferred_customer_attr.xml
-creddy verify, issuer: Acme_buy_rockets__Acme_preferred_customer_attr.xml
-creddy: Can't load issuer cert from bad_attr.xml
-creddy verify, issuer: bad_attr.xml
-creddy verify, issuer: Coyote_ID.pem
-  issuer cert still valid
-creddy verify, issuer: not_ss.pem
-  issuer cert still valid
-creddy: Can't load issuer cert from not_ss.xml
-creddy verify, issuer: not_ss.xml
-creddy: Can't load issuer cert from priv.xml
-creddy verify, issuer: priv.xml
-creddy verify, issuer: PGissuer.pem
-  issuer cert still valid
-creddy: Can't load issuer cert from ProtoGENI.xml
-creddy verify, issuer: ProtoGENI.xml
Index: tests/creddy_tests/verify.sh
===================================================================
--- tests/creddy_tests/verify.sh	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/creddy_tests/verify.sh	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,24 +1,60 @@
 #!/bin/sh
-#creddy --verify --cert <cert> [ --attrcert <cert> ]
+#creddy --verify --cert <issuer> [ --attrcert <cert> ]
+#verify.sh
 
-pwd=`pwd`
-eloc=`which creddy | sed 's/\/creddy//'`
-if [ "$eloc" = "" ]; then
-  echo "ERROR: creddy is not in the search path!!!"
-  exit 1
-fi
+. ${TESTDIR}/test_util.sh
 
-$eloc/creddy --verify --cert Coyote_ID.pem --attrcert Acme_buy_rockets__Acme_preferred_customer_attr.xml
-$eloc/creddy --verify --cert Acme_ID.pem --attrcert Acme_buy_rockets__Acme_preferred_customer_attr.xml
+runXTest "creddy_tests/verify.sh" "test1" \
+"$eloc/creddy --verify --cert Coyote_ID.pem --attrcert Acme_buy_rockets__Acme_preferred_customer_attr.xml" \
+0  "have mismatched principals" "ID and attr are still valid but differ in principals"
 
-$eloc/creddy --verify --cert Acme_private.pem
-$eloc/creddy --verify --cert Acme_ID.pem --attrcert bad_attr.xml
-$eloc/creddy --verify --cert Acme_buy_rockets__Acme_preferred_customer_attr.xml
-$eloc/creddy --verify --cert bad_attr.xml
-$eloc/creddy --verify --cert Coyote_ID.pem
+runTest "creddy_tests/verify.sh" "test2" \
+"$eloc/creddy --verify --cert Acme_ID.pem --attrcert Acme_buy_rockets__Acme_preferred_customer_attr.xml" \
+0  "matching principal and attribute"
 
-$eloc/creddy --verify --cert not_ss.pem
-$eloc/creddy --verify --cert not_ss.xml
-$eloc/creddy --verify --cert priv.xml
-$eloc/creddy --verify --cert PGissuer.pem
-$eloc/creddy --verify --cert ProtoGENI.xml
+runTest "creddy_tests/verify.sh" "test3" \
+"$eloc/creddy --verify --cert Acme_private.pem" \
+1 "verify with just a privkey"
+
+## this should really fail with a specific error code, 
+runTest "creddy_tests/verify.sh" "test4" \
+"$eloc/creddy --verify --cert Acme_ID.pem --attrcert bad_attr.xml" \
+0  "verify with non existing attribute, but still pass because issuer is okay"
+
+runTest "creddy_tests/verify.sh" "test5"  \
+"$eloc/creddy --verify --cert Acme_buy_rockets__Acme_preferred_customer_attr.xml " \
+1  "verify with just an attribute"
+
+runTest "creddy_tests/verify.sh" "test6"  \
+"$eloc/creddy --verify --cert bad_attr.xml" \
+1  "verify with just a none existing attribute"
+
+runTest "creddy_tests/verify.sh" "test7"  \
+"$eloc/creddy --verify --cert Coyote_ID.pem" \
+0  "verify just an issuer"
+
+runTest "creddy_tests/verify.sh" "test8"  \
+"$eloc/creddy --verify --cert not_ss.pem" \
+0  "verify just a none self signed principal pem"
+
+runTest "creddy_tests/verify.sh" "test9" \
+"$eloc/creddy --verify --attrcert not_ss.xml" \
+1  "verify just a none self signed attribute"
+
+runTest "creddy_tests/verify.sh" "test10" \
+"$eloc/creddy --verify --cert not_ss.xml" \
+1  "incorrectly trying to verify a none self signed attribute as an issuer cert"
+
+runTest "creddy_tests/verify.sh" "test11"  \
+"$eloc/creddy --verify --cert priv.xml" \
+1  "trying to verify GENI privilege attribute as an issuer cert"
+
+runTest "creddy_tests/verify.sh" "test12"  \
+"$eloc/creddy --verify --cert PGissuer.pem" \
+0  "verify a GENI's issuer pem"
+
+runTest "creddy_tests/verify.sh" "test13"  \
+"$eloc/creddy --verify --cert ProtoGENI.xml" \
+1  "incorrectly trying to verify a GENI issued attribute as issuer cert"
+
+
Index: tests/example_scripts/Makefile
===================================================================
--- tests/example_scripts/Makefile	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/example_scripts/Makefile	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,28 +1,432 @@
-
-DIRECTORY=c perl python wiki
-
-.PHONY : runcheck clean 
-runcheck: $(DIRECTORY)
-
-clean:
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# tests/example_scripts/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+pkgdatadir = $(datadir)/abac
+pkgincludedir = $(includedir)/abac
+pkglibdir = $(libdir)/abac
+pkglibexecdir = $(libexecdir)/abac
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+subdir = tests/example_scripts
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_openssl.m4 \
+	$(top_srcdir)/m4/ax_check_xml2.m4 \
+	$(top_srcdir)/m4/ax_check_xmlsec1.m4 \
+	$(top_srcdir)/m4/ax_pkg_swig.m4 \
+	$(top_srcdir)/m4/ax_python_devel.m4 \
+	$(top_srcdir)/m4/ax_swig_enable_cxx.m4 \
+	$(top_srcdir)/m4/ax_swig_python.m4 $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/mei/Deter/abac0-master/missing --run aclocal-1.11
+AMTAR = ${SHELL} /home/mei/Deter/abac0-master/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/mei/Deter/abac0-master/missing --run automake-1.11
+AWK = gawk
+AX_SWIG_PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+AX_SWIG_PYTHON_OPT = -python
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DPACKAGE_NAME=\"ABAC\" -DPACKAGE_TARNAME=\"abac\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"ABAC\ 0.1.5\" -DPACKAGE_BUGREPORT=\"faber@ISI.EDU\" -DPACKAGE_URL=\"\" -DPACKAGE=\"abac\" -DVERSION=\"0.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PYTHON=\"2.7\" -DHAVE_INTTYPES_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_PATHS_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_PTRDIFF_T=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_ATEXIT=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1
+DEPDIR = .deps
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+FGREP = /bin/grep -F
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /home/mei/Deter/abac0-master/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_INCLUDES =  
+OPENSSL_LDFLAGS =  
+OPENSSL_LIBS = -lssl -lcrypto  
+OTOOL = 
+OTOOL64 = 
+PACKAGE = abac
+PACKAGE_BUGREPORT = faber@ISI.EDU
+PACKAGE_NAME = ABAC
+PACKAGE_STRING = ABAC 0.1.5
+PACKAGE_TARNAME = abac
+PACKAGE_URL = 
+PACKAGE_VERSION = 0.1.5
+PATH_SEPARATOR = :
+PERL = perl
+PKG_CONFIG = /usr/bin/pkg-config
+PYTHON = /usr/local/bin/python
+PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+PYTHON_EXEC_PREFIX = ${exec_prefix}
+PYTHON_EXTRA_LDFLAGS = -Xlinker -export-dynamic
+PYTHON_EXTRA_LIBS =  -lpthread -ldl  -lutil -lm
+PYTHON_LDFLAGS = -L/usr/local/lib/python2.7/config -lpython2.7
+PYTHON_PLATFORM = linux2
+PYTHON_PREFIX = ${prefix}
+PYTHON_SITE_PKG = /usr/local/lib/python2.7/site-packages
+PYTHON_VERSION = 2.7
+RANLIB = ranlib
+SED = /bin/sed
+SET_MAKE = 
+SHELL = /bin/bash
+SITE_PERL = /usr/local/lib/site_perl
+STRIP = strip
+SWIG = /usr/local/bin/swig -c++
+SWIG_LIB = /usr/local/share/swig/2.0.4
+VERSION = 0.1.5
+XML2_CONFIG = /usr/bin/xml2-config
+XML2_INCLUDES = -I/usr/include/libxml2
+XML2_LDFLAGS = -lxml2
+XML2_LIBS = -lxml2
+XMLSEC1_CONFIG = /usr/bin/xmlsec1-config
+XMLSEC1_INCLUDES = -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\"openssl\"
+XMLSEC1_LDFLAGS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+XMLSEC1_LIBS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+abs_builddir = /home/mei/Deter/abac0-master/tests/example_scripts
+abs_srcdir = /home/mei/Deter/abac0-master/tests/example_scripts
+abs_top_builddir = /home/mei/Deter/abac0-master
+abs_top_srcdir = /home/mei/Deter/abac0-master
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/mei/Deter/abac0-master/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+lt_ECHO = echo
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+pkgpyexecdir = ${pyexecdir}/abac
+pkgpythondir = ${pythondir}/abac
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+pyexecdir = ${exec_prefix}/lib/python2.7/site-packages
+pythondir = ${prefix}/lib/python2.7/site-packages
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias = 
+top_build_prefix = ../../
+top_builddir = ../..
+top_srcdir = ../..
+
+#
+# example_scripts
+#
+INCLUDES = -I$(abs_top_srcdir)/libabac
+LDADD = $(abs_top_builddir)/libabac/libabac.la
+DIRECTORY = c perl python wiki
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/example_scripts/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign tests/example_scripts/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	clean-local distclean distclean-generic distclean-libtool \
+	distdir dvi dvi-am html html-am info info-am install \
+	install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	uninstall uninstall-am
+
+
+.PHONY : runcheck clean-local
+
+all: runcheck
+
+clean-local:
 	@for i in $(DIRECTORY); do \
-	here=`pwd`; \
-	cd $$i; \
-	make -s clean; \
-	cd $$here; \
-	done 
-	@rm -rf allout.tmp
+	  here=`pwd`; \
+	  cd $$i; \
+	  make -s clean; \
+	  cd $$here; \
+	done
+	@rm -rf result error
 
 runcheck:
-	@echo 'running libabac SCRIPT testing...'
+	@echo 'running libabac SCRIPT testing...' | tee result
+	@touch error;
 	@for i in $(DIRECTORY); do \
-	here=`pwd`; \
-	cd $$i; \
-	printf "\n ==> RUN on %s\n" "$$i" >> ../allout.tmp ; \
-	./run_test 1 >> ../allout.tmp 2>& 1; \
-	cd $$here; \
-	done 
-	@if test -f allout.tmp && test `diff -q allout.save allout.tmp |wc -l ` -eq 0 ; \
-	then echo "   PASSED"; \
-	else echo "   ERROR:got changes!!!"; \
+	  here=`pwd`; \
+	  cd $$i; \
+	  printf "\n ==> RUN on %s\n" "$$i" >> $$here/result ; \
+	  make -s |tee -a $$here/result |grep BAD >> $$here/error; \
+	  cd $$here; \
+	done
+	@if test -f error ; \
+	  then \
+	    (if test `cat error | wc -l ` -eq 0 ; \
+	      then echo "   PASSED"; \
+	      else (echo "   ERROR!!!"; cat error;); \
+	    fi); \
+	  else echo "   PASSED"; \
 	fi
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: tests/example_scripts/Makefile.am
===================================================================
--- tests/example_scripts/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/example_scripts/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,40 @@
+#
+# example_scripts
+#
+INCLUDES = -I$(abs_top_srcdir)/libabac
+LDADD = $(abs_top_builddir)/libabac/libabac.la
+
+DIRECTORY = c perl python wiki
+
+.PHONY : runcheck clean-local
+
+all: runcheck
+
+clean-local:
+	@for i in $(DIRECTORY); do \
+	  here=`pwd`; \
+	  cd $$i; \
+	  make -s clean; \
+	  cd $$here; \
+	done
+	@rm -rf result error
+
+runcheck:
+	@echo 'running libabac SCRIPT testing...' | tee result
+	@touch error;
+	@for i in $(DIRECTORY); do \
+	  here=`pwd`; \
+	  cd $$i; \
+	  printf "\n ==> RUN on %s\n" "$$i" >> $$here/result ; \
+	  make -s |tee -a $$here/result |grep BAD >> $$here/error; \
+	  cd $$here; \
+	done
+	@if test -f error ; \
+	  then \
+	    (if test `cat error | wc -l ` -eq 0 ; \
+	      then echo "   PASSED"; \
+	      else (echo "   ERROR!!!"; cat error;); \
+	    fi); \
+	  else echo "   PASSED"; \
+	fi
+
Index: tests/example_scripts/README
===================================================================
--- tests/example_scripts/README	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,9 +1,0 @@
-
-
-This directory does regression testing of
-example scripts that were under libabac's swig 
-directory
-
-to run,  
-   
-   runcheck
Index: tests/example_scripts/allout.save
===================================================================
--- tests/example_scripts/allout.save	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,51 +1,0 @@
-
- ==> RUN on c
----running (c) attr script
-   PASSED
----running (c) prover script
-   PASSED
-
- ==> RUN on perl
----running (perl) id script
-   PASSED
----running (perl) id2 script, expected failure
-   PASSED
----running (perl) attr script
-   PASSED
----running (perl) prover script
-   PASSED
-
- ==> RUN on python
----running (python) attr script
-   PASSED
----running (python) id script
-   PASSED
----running (python) id2 script, expect failure
-   PASSED
----running (python) id3 script, expect failure
-   PASSED
----running (python) prover script
-   PASSED
-
- ==> RUN on wiki
----running (wiki) id1 script
-   PASSED
-Generating key, this will take a while. Create entropy!
-    - move the mouse
-    - generate disk activity (run find)
----running (wiki) id2 script
-   PASSED
----running (wiki) id3 script
-   PASSED
----running (wiki) id4 script
-   PASSED
----running (wiki) id5 script
-   PASSED
----running (wiki) attr1 script
-   PASSED
----running (wiki) attr2 script
-   PASSED
----running (wiki) ctxtQuery1 script
-   PASSED
----running (wiki) ctxtQuery2 script
-   PASSED
Index: tests/example_scripts/c/Makefile
===================================================================
--- tests/example_scripts/c/Makefile	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/example_scripts/c/Makefile	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,21 +1,420 @@
-
-LDFLAGS =-L/usr/local/lib -labac -lm -lpthread -Wl,-rpath
-
-all: attr prove tt
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# tests/example_scripts/c/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+#
+# example_scripts/c
+#
+
+pkgdatadir = $(datadir)/abac
+pkgincludedir = $(includedir)/abac
+pkglibdir = $(libdir)/abac
+pkglibexecdir = $(libexecdir)/abac
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+subdir = tests/example_scripts/c
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_openssl.m4 \
+	$(top_srcdir)/m4/ax_check_xml2.m4 \
+	$(top_srcdir)/m4/ax_check_xmlsec1.m4 \
+	$(top_srcdir)/m4/ax_pkg_swig.m4 \
+	$(top_srcdir)/m4/ax_python_devel.m4 \
+	$(top_srcdir)/m4/ax_swig_enable_cxx.m4 \
+	$(top_srcdir)/m4/ax_swig_python.m4 $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/mei/Deter/abac0-master/missing --run aclocal-1.11
+AMTAR = ${SHELL} /home/mei/Deter/abac0-master/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/mei/Deter/abac0-master/missing --run automake-1.11
+AWK = gawk
+AX_SWIG_PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+AX_SWIG_PYTHON_OPT = -python
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DPACKAGE_NAME=\"ABAC\" -DPACKAGE_TARNAME=\"abac\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"ABAC\ 0.1.5\" -DPACKAGE_BUGREPORT=\"faber@ISI.EDU\" -DPACKAGE_URL=\"\" -DPACKAGE=\"abac\" -DVERSION=\"0.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PYTHON=\"2.7\" -DHAVE_INTTYPES_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_PATHS_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_PTRDIFF_T=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_ATEXIT=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1
+DEPDIR = .deps
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+FGREP = /bin/grep -F
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld
+LDFLAGS = -L$(abs_top_builddir)/libabac/.libs -labac -lm -lpthread -Wl,-rpath
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /home/mei/Deter/abac0-master/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_INCLUDES =  
+OPENSSL_LDFLAGS =  
+OPENSSL_LIBS = -lssl -lcrypto  
+OTOOL = 
+OTOOL64 = 
+PACKAGE = abac
+PACKAGE_BUGREPORT = faber@ISI.EDU
+PACKAGE_NAME = ABAC
+PACKAGE_STRING = ABAC 0.1.5
+PACKAGE_TARNAME = abac
+PACKAGE_URL = 
+PACKAGE_VERSION = 0.1.5
+PATH_SEPARATOR = :
+PERL = perl
+PKG_CONFIG = /usr/bin/pkg-config
+PYTHON = /usr/local/bin/python
+PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+PYTHON_EXEC_PREFIX = ${exec_prefix}
+PYTHON_EXTRA_LDFLAGS = -Xlinker -export-dynamic
+PYTHON_EXTRA_LIBS =  -lpthread -ldl  -lutil -lm
+PYTHON_LDFLAGS = -L/usr/local/lib/python2.7/config -lpython2.7
+PYTHON_PLATFORM = linux2
+PYTHON_PREFIX = ${prefix}
+PYTHON_SITE_PKG = /usr/local/lib/python2.7/site-packages
+PYTHON_VERSION = 2.7
+RANLIB = ranlib
+SED = /bin/sed
+SET_MAKE = 
+SHELL = /bin/bash
+SITE_PERL = /usr/local/lib/site_perl
+STRIP = strip
+SWIG = /usr/local/bin/swig -c++
+SWIG_LIB = /usr/local/share/swig/2.0.4
+VERSION = 0.1.5
+XML2_CONFIG = /usr/bin/xml2-config
+XML2_INCLUDES = -I/usr/include/libxml2
+XML2_LDFLAGS = -lxml2
+XML2_LIBS = -lxml2
+XMLSEC1_CONFIG = /usr/bin/xmlsec1-config
+XMLSEC1_INCLUDES = -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\"openssl\"
+XMLSEC1_LDFLAGS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+XMLSEC1_LIBS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+abs_builddir = /home/mei/Deter/abac0-master/tests/example_scripts/c
+abs_srcdir = /home/mei/Deter/abac0-master/tests/example_scripts/c
+abs_top_builddir = /home/mei/Deter/abac0-master
+abs_top_srcdir = /home/mei/Deter/abac0-master
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/mei/Deter/abac0-master/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+lt_ECHO = echo
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+pkgpyexecdir = ${pyexecdir}/abac
+pkgpythondir = ${pythondir}/abac
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+pyexecdir = ${exec_prefix}/lib/python2.7/site-packages
+pythondir = ${prefix}/lib/python2.7/site-packages
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias = 
+top_build_prefix = ../../../
+top_builddir = ../../..
+top_srcdir = ../../..
+INCLUDES = -I$(abs_top_srcdir)/libabac
+LDADD = $(abs_top_builddir)/libabac/libabac.la
+CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
+PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
+TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
+MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(TEST_ENV) LD_LIBRARY_PATH=$(abs_top_builddir)/libabac/.libs
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/example_scripts/c/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign tests/example_scripts/c/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	clean-local distclean distclean-generic distclean-libtool \
+	distdir dvi dvi-am html html-am info info-am install \
+	install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	uninstall uninstall-am
+
+
+.PHONY: clean-local 
+
+all: attr prove 
 
 abac_attr.o: abac_attr.c
-	gcc -g -I/usr/local/include -c abac_attr.c -o abac_attr.o
+	@gcc -g $(INCLUDES) -c abac_attr.c -o abac_attr.o
 
 abac_attr: abac_attr.o
-	gcc -g -o abac_attr abac_attr.o $(LDFLAGS)
+	@gcc -g -o abac_attr abac_attr.o $(LDFLAGS)
 
 abac_prover.o: abac_prover.c
-	gcc -g -I/usr/local/include -c abac_prover.c -o abac_prover.o
+	@gcc -g $(INCLUDES) -c abac_prover.c -o abac_prover.o
 
 abac_prover: abac_prover.o
-	gcc -g -o abac_prover abac_prover.o $(LDFLAGS)
+	@gcc -g -o abac_prover abac_prover.o $(LDFLAGS)
 
 tchunk: tchunk.c
-	gcc -g -I/usr/local/include -c tchunk.c -o tchunk.o
+	gcc -g $(INCLUDES) -c tchunk.c -o tchunk.o
 	gcc -g -o tchunk tchunk.o $(LDFLAGS)
 	./tchunk 0 IceCream_ID.pem IceCream_private.pem
@@ -23,9 +422,9 @@
 
 tt: tbasic.c
-	gcc -g -I/usr/local/include -c tbasic.c -o tbasic.o
+	gcc -g $(INCLUDES) -c tbasic.c -o tbasic.o
 	gcc -g -o tt tbasic.o $(LDFLAGS)
 	./tt
 
-clean:
+clean-local:
 	@rm -rf abac_attr.o abac_attr *.pem *.xml abac_prover.o 
 	@rm -rf abac_prover *.log 
@@ -34,17 +433,26 @@
 setup2: abac_attr abac_prover abac_attr_partial
 
-setup: abac_attr 
-	creddy --generate --cn IceCream
-	creddy --generate --cn Chocolate
-
 attr: 
-	rm -rf attr.log
-	make setup
-	./abac_attr IceCream_ID.pem  IceCream_private.pem IceCream_attr.xml Chocolate_ID.pem 1>attr.log 2>&1
+	@echo '---running (c) attr script'
+	@$(MY_ENV) ./setup.sh 1>/dev/null 2>&1
+	@make abac_attr
+	@(rc=`$(MY_ENV) ./abac_attr IceCream_ID.pem  IceCream_private.pem IceCream_attr.xml Chocolate_ID.pem 2>/dev/null 2>/dev/null | grep "attr success"` ; \
+	if [ -z "$$rc" ]; then \
+	  echo "BAD:example_scripts/c/abac_attr:using libabac c to make attributes"; \
+	else \
+	  echo "GOOD:example_scripts/c/abac_attr:using libabac c to make attributes"; \
+	fi)
 
 prove: abac_prover 
-	rm -rf prover.log
-	make attr
-	./run_prover 1>prover.log 2>&1
+	@echo '---running (c) prover script'
+	@$(MY_ENV) ./setup.sh 1>/dev/null 2>&1
+	@make abac_attr
+	@$(MY_ENV) ./abac_attr IceCream_ID.pem  IceCream_private.pem IceCream_attr.xml Chocolate_ID.pem 1>/dev/null 2>&1
+	(rc=`$(MY_ENV) ./run_prover | grep "prover success" ` ; \
+	if [ -z "$$rc" ]; then \
+	  echo "BAD:example_scripts/c/abac_prover:using libabac c to make a prover"; \
+	else \
+	  echo "GOOD:example_scripts/c/abac_prover:using libabac c to make a prover"; \
+	fi)
 
 mattr: attr.c
@@ -52,2 +460,6 @@
 mload: loader.c
 	gcc -g -o mload loader.c $(LDFLAGS)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: tests/example_scripts/c/Makefile.am
===================================================================
--- tests/example_scripts/c/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/example_scripts/c/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,77 @@
+#
+# example_scripts/c
+#
+
+.PHONY: clean-local 
+
+INCLUDES = -I$(abs_top_srcdir)/libabac
+LDADD = $(abs_top_builddir)/libabac/libabac.la
+CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
+PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
+TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
+MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(TEST_ENV) LD_LIBRARY_PATH=$(abs_top_builddir)/libabac/.libs
+
+LDFLAGS =-L$(abs_top_builddir)/libabac/.libs -labac -lm -lpthread -Wl,-rpath
+
+all: attr prove 
+
+abac_attr.o: abac_attr.c
+	@gcc -g $(INCLUDES) -c abac_attr.c -o abac_attr.o
+
+abac_attr: abac_attr.o
+	@gcc -g -o abac_attr abac_attr.o $(LDFLAGS)
+
+abac_prover.o: abac_prover.c
+	@gcc -g $(INCLUDES) -c abac_prover.c -o abac_prover.o
+
+abac_prover: abac_prover.o
+	@gcc -g -o abac_prover abac_prover.o $(LDFLAGS)
+
+tchunk: tchunk.c
+	gcc -g $(INCLUDES) -c tchunk.c -o tchunk.o
+	gcc -g -o tchunk tchunk.o $(LDFLAGS)
+	./tchunk 0 IceCream_ID.pem IceCream_private.pem
+	./tchunk 1 IceCream_ID.pem IceCream_private.pem
+
+tt: tbasic.c
+	gcc -g $(INCLUDES) -c tbasic.c -o tbasic.o
+	gcc -g -o tt tbasic.o $(LDFLAGS)
+	./tt
+
+clean-local:
+	@rm -rf abac_attr.o abac_attr *.pem *.xml abac_prover.o 
+	@rm -rf abac_prover *.log 
+	@rm -rf tt tbasic.o tbasic
+
+setup2: abac_attr abac_prover abac_attr_partial
+
+attr: 
+	@echo '---running (c) attr script'
+	@$(MY_ENV) ./setup.sh 1>/dev/null 2>&1
+	@make abac_attr
+	@(rc=`$(MY_ENV) ./abac_attr IceCream_ID.pem  IceCream_private.pem IceCream_attr.xml Chocolate_ID.pem 2>/dev/null 2>/dev/null | grep "attr success"` ; \
+	if [ -z "$$rc" ]; then \
+	  echo "BAD:example_scripts/c/abac_attr:using libabac c to make attributes"; \
+	else \
+	  echo "GOOD:example_scripts/c/abac_attr:using libabac c to make attributes"; \
+	fi)
+
+
+prove: abac_prover 
+	@echo '---running (c) prover script'
+	@$(MY_ENV) ./setup.sh 1>/dev/null 2>&1
+	@make abac_attr
+	@$(MY_ENV) ./abac_attr IceCream_ID.pem  IceCream_private.pem IceCream_attr.xml Chocolate_ID.pem 1>/dev/null 2>&1
+	(rc=`$(MY_ENV) ./run_prover | grep "prover success" ` ; \
+	if [ -z "$$rc" ]; then \
+	  echo "BAD:example_scripts/c/abac_prover:using libabac c to make a prover"; \
+	else \
+	  echo "GOOD:example_scripts/c/abac_prover:using libabac c to make a prover"; \
+	fi)
+
+
+
+mattr: attr.c
+	gcc -g -o mattr attr.c $(LDFLAGS)
+mload: loader.c
+	gcc -g -o mload loader.c $(LDFLAGS)
Index: tests/example_scripts/c/run_prover
===================================================================
--- tests/example_scripts/c/run_prover	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/example_scripts/c/run_prover	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,16 +1,16 @@
 #!/bin/sh
 
+. ${TESTDIR}/test_util.sh
+
 keystore=`pwd`
-pID=`creddy --keyid --cert ${keystore}/IceCream_ID.pem`
-cID=`creddy --keyid --cert ${keystore}/Chocolate_ID.pem`
+pID=`$eloc/creddy --keyid --cert ${keystore}/IceCream_ID.pem`
+cID=`$eloc/creddy --keyid --cert ${keystore}/Chocolate_ID.pem`
 
 role="${pID}.delicious"
 principal="${cID}"
 
-if [ $1 = "debug" ]; then
-    echo "$keystore" "$role" "$principal"
-    gdb ./abac_prover
-else
-    ./abac_prover "$keystore" "$role" "$principal"
-fi
+#    echo "$keystore" "$role" "$principal"
+#    gdb ./abac_prover
 
+./abac_prover "$keystore" "$role" "$principal"
+
Index: tests/example_scripts/c/setup.sh
===================================================================
--- tests/example_scripts/c/setup.sh	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/example_scripts/c/setup.sh	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,10 @@
+#!/bin/sh
+# setup.sh
+
+. ${TESTDIR}/test_util.sh
+
+$eloc/creddy --generate --cn IceCream
+$eloc/creddy --generate --cn Chocolate
+
+
+
Index: tests/example_scripts/perl/Makefile
===================================================================
--- tests/example_scripts/perl/Makefile	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/example_scripts/perl/Makefile	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,28 +1,456 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# tests/example_scripts/perl/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+#
+# example_scripts/perl
+#
+
+pkgdatadir = $(datadir)/abac
+pkgincludedir = $(includedir)/abac
+pkglibdir = $(libdir)/abac
+pkglibexecdir = $(libexecdir)/abac
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+subdir = tests/example_scripts/perl
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_openssl.m4 \
+	$(top_srcdir)/m4/ax_check_xml2.m4 \
+	$(top_srcdir)/m4/ax_check_xmlsec1.m4 \
+	$(top_srcdir)/m4/ax_pkg_swig.m4 \
+	$(top_srcdir)/m4/ax_python_devel.m4 \
+	$(top_srcdir)/m4/ax_swig_enable_cxx.m4 \
+	$(top_srcdir)/m4/ax_swig_python.m4 $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/mei/Deter/abac0-master/missing --run aclocal-1.11
+AMTAR = ${SHELL} /home/mei/Deter/abac0-master/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/mei/Deter/abac0-master/missing --run automake-1.11
+AWK = gawk
+AX_SWIG_PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+AX_SWIG_PYTHON_OPT = -python
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DPACKAGE_NAME=\"ABAC\" -DPACKAGE_TARNAME=\"abac\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"ABAC\ 0.1.5\" -DPACKAGE_BUGREPORT=\"faber@ISI.EDU\" -DPACKAGE_URL=\"\" -DPACKAGE=\"abac\" -DVERSION=\"0.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PYTHON=\"2.7\" -DHAVE_INTTYPES_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_PATHS_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_PTRDIFF_T=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_ATEXIT=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1
+DEPDIR = .deps
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+FGREP = /bin/grep -F
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /home/mei/Deter/abac0-master/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_INCLUDES =  
+OPENSSL_LDFLAGS =  
+OPENSSL_LIBS = -lssl -lcrypto  
+OTOOL = 
+OTOOL64 = 
+PACKAGE = abac
+PACKAGE_BUGREPORT = faber@ISI.EDU
+PACKAGE_NAME = ABAC
+PACKAGE_STRING = ABAC 0.1.5
+PACKAGE_TARNAME = abac
+PACKAGE_URL = 
+PACKAGE_VERSION = 0.1.5
+PATH_SEPARATOR = :
+PERL = perl
+PKG_CONFIG = /usr/bin/pkg-config
+PYTHON = /usr/local/bin/python
+PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+PYTHON_EXEC_PREFIX = ${exec_prefix}
+PYTHON_EXTRA_LDFLAGS = -Xlinker -export-dynamic
+PYTHON_EXTRA_LIBS =  -lpthread -ldl  -lutil -lm
+PYTHON_LDFLAGS = -L/usr/local/lib/python2.7/config -lpython2.7
+PYTHON_PLATFORM = linux2
+PYTHON_PREFIX = ${prefix}
+PYTHON_SITE_PKG = /usr/local/lib/python2.7/site-packages
+PYTHON_VERSION = 2.7
+RANLIB = ranlib
+SED = /bin/sed
+SET_MAKE = 
+SHELL = /bin/bash
+SITE_PERL = /usr/local/lib/site_perl
+STRIP = strip
+SWIG = /usr/local/bin/swig -c++
+SWIG_LIB = /usr/local/share/swig/2.0.4
+VERSION = 0.1.5
+XML2_CONFIG = /usr/bin/xml2-config
+XML2_INCLUDES = -I/usr/include/libxml2
+XML2_LDFLAGS = -lxml2
+XML2_LIBS = -lxml2
+XMLSEC1_CONFIG = /usr/bin/xmlsec1-config
+XMLSEC1_INCLUDES = -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\"openssl\"
+XMLSEC1_LDFLAGS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+XMLSEC1_LIBS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+abs_builddir = /home/mei/Deter/abac0-master/tests/example_scripts/perl
+abs_srcdir = /home/mei/Deter/abac0-master/tests/example_scripts/perl
+abs_top_builddir = /home/mei/Deter/abac0-master
+abs_top_srcdir = /home/mei/Deter/abac0-master
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/mei/Deter/abac0-master/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+lt_ECHO = echo
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+pkgpyexecdir = ${pyexecdir}/abac
+pkgpythondir = ${pythondir}/abac
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+pyexecdir = ${exec_prefix}/lib/python2.7/site-packages
+pythondir = ${prefix}/lib/python2.7/site-packages
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias = 
+top_build_prefix = ../../../
+top_builddir = ../../..
+top_srcdir = ../../..
+INCLUDES = -I$(abs_top_srcdir)/libabac
+LDADD = $(abs_top_builddir)/libabac/libabac.la
+CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
+PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
+TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
+PERL_ENV = PERLLIB=$(abs_top_builddir)/swig/perl:$(abs_top_builddir)/swig/perl/.libs
+MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(TEST_ENV) $(PERL_ENV)
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/example_scripts/perl/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign tests/example_scripts/perl/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	clean-local distclean distclean-generic distclean-libtool \
+	distdir dvi dvi-am html html-am info info-am install \
+	install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	uninstall uninstall-am
+
+
+.PHONY: clean-local
+
 all: run bad prove
 
-clean:
-	@rm -rf *.pem *.xml *.log 
-
-setup: 
-	creddy --generate --cn IceCream
-	creddy --generate --cn Chocolate
-	
+clean-local:
+	@rm -rf *.pem *.xml 
+
 run: 
+	echo '---running (perl) id script'
 	make clean
-	make setup
-	./abac_keyid.pl IceCream_ID.pem 1>id.log 2>&1 
+	$(MY_ENV) ./setup.sh 1>/dev/null 2>&1
+	(rc=`$(MY_ENV) ./abac_keyid.pl IceCream_ID.pem | grep OKAY` ; \
+	if [ -z "$$rc" ]; then \
+	  echo "BAD:example_scripts/perl/abac_keyid.pl:using libabac perl to make principal"; \
+	else \
+	  echo "GOOD:example_scripts/perl/abac_keyid.pl:using libabac perl to make principal"; \
+	fi)
 
 bad: 
+	echo '---running (perl) id2 script, expected failure'
 	make clean
-	make setup
-	./abac_keyid.pl IceCream_private.pem 1>id2.log 2>&1 
+	$(MY_ENV) ./setup.sh 1>/dev/null 2>&1
+	(rc=`$(MY_ENV) ./abac_keyid.pl IceCream_private.pem | grep "std::invalid_argument"`; \
+	if [ -z "$$rc" ]; then \
+	  echo "BAD:example_scripts/perl/abac_keyid.pl:supplied with just privkey"; \
+	else \
+	  echo "GOOD:example_scripts/perl/abac_keyid.pl:supplied with just privkey"; \
+	fi)
 
 attr: 
+	echo '---running (perl) attr script'
 	make clean
-	make setup
-	./run_attr 1 >attr.log 2>&1
+	$(MY_ENV) ./setup.sh 1>/dev/null 2>&1
+	(rc=`$(MY_ENV) ./run_attr | grep chocolate` ; \
+	if [ -z "$$rc" ]; then \
+	  echo "BAD:example_scripts/perl/abac_attr.pl:creating attribute"; \
+	else \
+	  echo "GOOD:example_scripts/perl/abac_keyid.pl:creating attribute"; \
+	fi)
 
 prove: 
-	make attr
-	./run_prover 1 >prover.log 2>&1
-
+	echo '---running (perl) attr script'
+	make clean
+	$(MY_ENV) ./setup.sh 1>/dev/null 2>&1
+	$(MY_ENV) ./run_attr 1>/dev/null 2>&1
+	(rc=`$(MY_ENV) ./run_prover | grep Success` ; \
+	if [ -z "$$rc" ]; then \
+	  echo "BAD:example_scripts/perl/abac_prover.pl:prover in perl"; \
+	else \
+	  echo "GOOD:example_scripts/perl/abac_prover.pl:prover in perl"; \
+	fi)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: tests/example_scripts/perl/Makefile.am
===================================================================
--- tests/example_scripts/perl/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/example_scripts/perl/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,65 @@
+#
+# example_scripts/perl
+#
+
+.PHONY: clean-local
+
+INCLUDES = -I$(abs_top_srcdir)/libabac
+LDADD = $(abs_top_builddir)/libabac/libabac.la
+CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
+PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
+TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
+PERL_ENV = PERLLIB=$(abs_top_builddir)/swig/perl:$(abs_top_builddir)/swig/perl/.libs
+MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(TEST_ENV) $(PERL_ENV)
+
+all: run bad prove
+
+clean-local:
+	@rm -rf *.pem *.xml 
+
+run: 
+	echo '---running (perl) id script'
+	make clean
+	$(MY_ENV) ./setup.sh 1>/dev/null 2>&1
+	(rc=`$(MY_ENV) ./abac_keyid.pl IceCream_ID.pem | grep OKAY` ; \
+	if [ -z "$$rc" ]; then \
+	  echo "BAD:example_scripts/perl/abac_keyid.pl:using libabac perl to make principal"; \
+	else \
+	  echo "GOOD:example_scripts/perl/abac_keyid.pl:using libabac perl to make principal"; \
+	fi)
+
+bad: 
+	echo '---running (perl) id2 script, expected failure'
+	make clean
+	$(MY_ENV) ./setup.sh 1>/dev/null 2>&1
+	(rc=`$(MY_ENV) ./abac_keyid.pl IceCream_private.pem | grep "std::invalid_argument"`; \
+	if [ -z "$$rc" ]; then \
+	  echo "BAD:example_scripts/perl/abac_keyid.pl:supplied with just privkey"; \
+	else \
+	  echo "GOOD:example_scripts/perl/abac_keyid.pl:supplied with just privkey"; \
+	fi)
+
+attr: 
+	echo '---running (perl) attr script'
+	make clean
+	$(MY_ENV) ./setup.sh 1>/dev/null 2>&1
+	(rc=`$(MY_ENV) ./run_attr | grep chocolate` ; \
+	if [ -z "$$rc" ]; then \
+	  echo "BAD:example_scripts/perl/abac_attr.pl:creating attribute"; \
+	else \
+	  echo "GOOD:example_scripts/perl/abac_keyid.pl:creating attribute"; \
+	fi)
+
+prove: 
+	echo '---running (perl) attr script'
+	make clean
+	$(MY_ENV) ./setup.sh 1>/dev/null 2>&1
+	$(MY_ENV) ./run_attr 1>/dev/null 2>&1
+	(rc=`$(MY_ENV) ./run_prover | grep Success` ; \
+	if [ -z "$$rc" ]; then \
+	  echo "BAD:example_scripts/perl/abac_prover.pl:prover in perl"; \
+	else \
+	  echo "GOOD:example_scripts/perl/abac_prover.pl:prover in perl"; \
+	fi)
+
+
Index: tests/example_scripts/perl/run_prover
===================================================================
--- tests/example_scripts/perl/run_prover	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/example_scripts/perl/run_prover	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,7 +1,9 @@
 #!/bin/sh
 
+. ${TESTDIR}/test_util.sh
+
 keystore=`pwd`
-pID=`creddy --keyid --cert ${keystore}/IceCream_ID.pem`
-cID=`creddy --keyid --cert ${keystore}/Chocolate_ID.pem`
+pID=`$eloc/creddy --keyid --cert ${keystore}/IceCream_ID.pem`
+cID=`$eloc/creddy --keyid --cert ${keystore}/Chocolate_ID.pem`
 
 role="${pID}.delicious"
Index: tests/example_scripts/perl/setup.sh
===================================================================
--- tests/example_scripts/perl/setup.sh	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/example_scripts/perl/setup.sh	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,10 @@
+#!/bin/sh
+# setup.sh
+
+. ${TESTDIR}/test_util.sh
+
+$eloc/creddy --generate --cn IceCream
+$eloc/creddy --generate --cn Chocolate
+
+
+
Index: tests/example_scripts/python/Makefile
===================================================================
--- tests/example_scripts/python/Makefile	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/example_scripts/python/Makefile	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,47 +1,485 @@
-
-all: run_attr run_e_attr run_id run_id2 run_prove
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# tests/example_scripts/python/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+#
+# example_scripts/python
+#
+
+pkgdatadir = $(datadir)/abac
+pkgincludedir = $(includedir)/abac
+pkglibdir = $(libdir)/abac
+pkglibexecdir = $(libexecdir)/abac
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+subdir = tests/example_scripts/python
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_openssl.m4 \
+	$(top_srcdir)/m4/ax_check_xml2.m4 \
+	$(top_srcdir)/m4/ax_check_xmlsec1.m4 \
+	$(top_srcdir)/m4/ax_pkg_swig.m4 \
+	$(top_srcdir)/m4/ax_python_devel.m4 \
+	$(top_srcdir)/m4/ax_swig_enable_cxx.m4 \
+	$(top_srcdir)/m4/ax_swig_python.m4 $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/mei/Deter/abac0-master/missing --run aclocal-1.11
+AMTAR = ${SHELL} /home/mei/Deter/abac0-master/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/mei/Deter/abac0-master/missing --run automake-1.11
+AWK = gawk
+AX_SWIG_PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+AX_SWIG_PYTHON_OPT = -python
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DPACKAGE_NAME=\"ABAC\" -DPACKAGE_TARNAME=\"abac\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"ABAC\ 0.1.5\" -DPACKAGE_BUGREPORT=\"faber@ISI.EDU\" -DPACKAGE_URL=\"\" -DPACKAGE=\"abac\" -DVERSION=\"0.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PYTHON=\"2.7\" -DHAVE_INTTYPES_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_PATHS_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_PTRDIFF_T=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_ATEXIT=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1
+DEPDIR = .deps
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+FGREP = /bin/grep -F
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /home/mei/Deter/abac0-master/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_INCLUDES =  
+OPENSSL_LDFLAGS =  
+OPENSSL_LIBS = -lssl -lcrypto  
+OTOOL = 
+OTOOL64 = 
+PACKAGE = abac
+PACKAGE_BUGREPORT = faber@ISI.EDU
+PACKAGE_NAME = ABAC
+PACKAGE_STRING = ABAC 0.1.5
+PACKAGE_TARNAME = abac
+PACKAGE_URL = 
+PACKAGE_VERSION = 0.1.5
+PATH_SEPARATOR = :
+PERL = perl
+PKG_CONFIG = /usr/bin/pkg-config
+PYTHON = /usr/local/bin/python
+PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+PYTHON_EXEC_PREFIX = ${exec_prefix}
+PYTHON_EXTRA_LDFLAGS = -Xlinker -export-dynamic
+PYTHON_EXTRA_LIBS =  -lpthread -ldl  -lutil -lm
+PYTHON_LDFLAGS = -L/usr/local/lib/python2.7/config -lpython2.7
+PYTHON_PLATFORM = linux2
+PYTHON_PREFIX = ${prefix}
+PYTHON_SITE_PKG = /usr/local/lib/python2.7/site-packages
+PYTHON_VERSION = 2.7
+RANLIB = ranlib
+SED = /bin/sed
+SET_MAKE = 
+SHELL = /bin/bash
+SITE_PERL = /usr/local/lib/site_perl
+STRIP = strip
+SWIG = /usr/local/bin/swig -c++
+SWIG_LIB = /usr/local/share/swig/2.0.4
+VERSION = 0.1.5
+XML2_CONFIG = /usr/bin/xml2-config
+XML2_INCLUDES = -I/usr/include/libxml2
+XML2_LDFLAGS = -lxml2
+XML2_LIBS = -lxml2
+XMLSEC1_CONFIG = /usr/bin/xmlsec1-config
+XMLSEC1_INCLUDES = -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\"openssl\"
+XMLSEC1_LDFLAGS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+XMLSEC1_LIBS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+abs_builddir = /home/mei/Deter/abac0-master/tests/example_scripts/python
+abs_srcdir = /home/mei/Deter/abac0-master/tests/example_scripts/python
+abs_top_builddir = /home/mei/Deter/abac0-master
+abs_top_srcdir = /home/mei/Deter/abac0-master
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/mei/Deter/abac0-master/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+lt_ECHO = echo
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+pkgpyexecdir = ${pyexecdir}/abac
+pkgpythondir = ${pythondir}/abac
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+pyexecdir = ${exec_prefix}/lib/python2.7/site-packages
+pythondir = ${prefix}/lib/python2.7/site-packages
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias = 
+top_build_prefix = ../../../
+top_builddir = ../../..
+top_srcdir = ../../..
+INCLUDES = -I$(abs_top_srcdir)/libabac
+LDADD = $(abs_top_builddir)/libabac/libabac.la
+CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
+PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
+PYTHON_ENV = PYTHONPATH=$(abs_top_builddir)/swig/python:$(abs_top_builddir)/swig/python/.libs:$(abs_top_builddir)/tests
+TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
+MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(PYTHON_ENV) $(TEST_ENV)
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/example_scripts/python/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign tests/example_scripts/python/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+
+
+.PHONY: clean-local
+
+all: run_attr run_id run_id2 run_id3 run_prove
 
 clean:
-	@rm -f *.pem *.xml *.log pfile
+	@rm -f *.pem *.xml pfile
 
 setup:
-	creddy --generate --cn IceCream
-	creddy --generate --cn Chocolate
+	@$(MY_ENV) ./setup.sh 1>/dev/null 2>&1 
 
 run_attr: 
-	make clean
-	rm -rf attr.log
-	make setup
-	./abac_attr.py IceCream_ID.pem IceCream_private.pem IceCream_attr.xml Chocolate_ID.pem 1>attr.log 2>&1
-
-run_e_attr: 
-	make clean
-	rm -rf e_attr.log pfile
-	echo "dumdum" > pfile
-	openssl genrsa -des3 -out Soda_private.pem -passout file:pfile
-	creddy --generate --cn Soda --key Soda_private.pem --p=pfile
-	creddy --generate --cn Cream
-	./abac_e_attr.py Soda_ID.pem Soda_private.pem Soda_attr.xml pfile Cream_ID.pem 1>e_attr.log 2>&1
+	@echo "---running (python) attr script"
+	@make clean
+	@make setup
+	@(rc=`$(MY_ENV) ./abac_attr.py IceCream_ID.pem IceCream_private.pem IceCream_attr.xml Chocolate_ID.pem |grep success` ; \
+	if [ -z "$$rc" ]; then \
+   	  echo "BAD:example_scripts/python/abac_attr.py:using libabac to create principal/attrs and make a simple query"; \
+	else \
+   	  echo "GOOD:example_scripts/python/abac_attr.py:using libabac to create principal/attrs and make a simple query"; \
+	fi)
 
 run_id: 
-	make clean
-	rm -rf id.log
-	make setup
-	./abac_keyid.py IceCream_ID.pem 1>id.log 2>&1
+	@echo "---running (python) id script"
+	@make clean
+	@make setup
+	@(rc=`$(MY_ENV) ./abac_keyid.py IceCream_ID.pem | grep okay` ; \
+	if [ -z "$$rc" ]; then \
+   	  echo "BAD:example_scripts/python/abac_keyid.py:using libabac to extract principal"; \
+	else \
+   	  echo "GOOD:example_scripts/python/abac_keyid.py:using libabac to extract principal"; \
+	fi)
 
 run_id2: 
-	make clean
-	rm -rf id2.log
-	make setup
-	./abac_keyid.py IceCream_private.pem 1>id2.log 2>&1
+	@echo "---running (python) id2 script, expected failure"
+	@make clean
+	@make setup
+	@(rc=`$(MY_ENV) ./abac_keyid.py IceCream_private.pem  | grep okay` ; \
+	if [ -z "$$rc" ]; then \
+   	  echo "GOOD:example_scripts/python/abac_keyid.py:supplied with just a privkey"; \
+	else \
+   	  echo "BAD:example_scripts/python/abac_keyid.py:supplied with just a privkey, should fail"; \
+	fi)
 
 run_id3: 
-	make clean
-	rm -rf id3.log
-	make setup
-	./abac_keyid2.py IceCream_ID.pem IceCream_private.pem 1>id3.log 2>&1
+	@echo "---running (python) id3 script"
+	@make clean
+	@make setup
+	@(rc=`$(MY_ENV) ./abac_keyid2.py IceCream_ID.pem IceCream_private.pem | grep okay` ; \
+	if [ -z "$$rc" ]; then \
+   	  echo "BAD:example_scripts/python/abac_keyid.py:supplied both id and privkey pem files"; \
+	else \
+   	  echo "GOOD:example_scripts/python/abac_keyid.py:supplied with id and privkey pem files"; \
+	fi)
 
 run_prove:
-	rm -rf prover.log
-	make run_attr
-	./run_prover 1>prover.log 2>& 1
+	@echo "---running (python) prover script"
+	@make clean
+	@make setup
+	@$(MY_ENV) ./abac_attr.py IceCream_ID.pem IceCream_private.pem IceCream_attr.xml Chocolate_ID.pem 1>/dev/null 2>&1
+	@(rc=`$(MY_ENV) ./run_prover| grep success` ; \
+	if [ -z "$$rc" ]; then \
+   	  echo "BAD:example_scripts/python/abac_prover.py:trying out libabac python api to make a prover"; \
+	else \
+   	  echo "GOOD:example_scripts/python/abac_prover.py:trying out libabac python api to make a prover"; \
+	fi)
+
+#this needed to be run by hand (input dumdum twice)...
+#echo '---running (python) encrypted key attr script'
+#./run_e_prover 1> e_prover.log 2>& 1
+#result=`grep success e_prover.log 2>/dev/null |wc -l`
+#if [ "$result" = "2" ]; then
+#   echo "   PASSED"
+#else
+#   echo "   ERROR"
+#fi
+#run_e_attr: 
+#	make clean
+#	rm -rf e_attr.log pfile
+#	echo "dumdum" > pfile
+#	openssl genrsa -des3 -out Soda_private.pem -passout file:pfile
+#	creddy --generate --cn Soda --key Soda_private.pem --p=pfile
+#	creddy --generate --cn Cream
+#	./abac_e_attr.py Soda_ID.pem Soda_private.pem Soda_attr.xml pfile Cream_ID.pem 1>e_attr.log 2>&1
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: tests/example_scripts/python/Makefile.am
===================================================================
--- tests/example_scripts/python/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/example_scripts/python/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,99 @@
+#
+# example_scripts/python
+#
+
+.PHONY: clean-local
+
+
+INCLUDES = -I$(abs_top_srcdir)/libabac
+LDADD = $(abs_top_builddir)/libabac/libabac.la
+CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
+PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
+PYTHON_ENV = PYTHONPATH=$(abs_top_builddir)/swig/python:$(abs_top_builddir)/swig/python/.libs:$(abs_top_builddir)/tests
+TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
+MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(PYTHON_ENV) $(TEST_ENV)
+
+all: run_attr run_id run_id2 run_id3 run_prove
+
+clean:
+	@rm -f *.pem *.xml pfile
+
+setup:
+	@$(MY_ENV) ./setup.sh 1>/dev/null 2>&1 
+
+run_attr: 
+	@echo "---running (python) attr script"
+	@make clean
+	@make setup
+	@(rc=`$(MY_ENV) ./abac_attr.py IceCream_ID.pem IceCream_private.pem IceCream_attr.xml Chocolate_ID.pem |grep success` ; \
+	if [ -z "$$rc" ]; then \
+   	  echo "BAD:example_scripts/python/abac_attr.py:using libabac to create principal/attrs and make a simple query"; \
+	else \
+   	  echo "GOOD:example_scripts/python/abac_attr.py:using libabac to create principal/attrs and make a simple query"; \
+	fi)
+
+run_id: 
+	@echo "---running (python) id script"
+	@make clean
+	@make setup
+	@(rc=`$(MY_ENV) ./abac_keyid.py IceCream_ID.pem | grep okay` ; \
+	if [ -z "$$rc" ]; then \
+   	  echo "BAD:example_scripts/python/abac_keyid.py:using libabac to extract principal"; \
+	else \
+   	  echo "GOOD:example_scripts/python/abac_keyid.py:using libabac to extract principal"; \
+	fi)
+
+
+run_id2: 
+	@echo "---running (python) id2 script, expected failure"
+	@make clean
+	@make setup
+	@(rc=`$(MY_ENV) ./abac_keyid.py IceCream_private.pem  | grep okay` ; \
+	if [ -z "$$rc" ]; then \
+   	  echo "GOOD:example_scripts/python/abac_keyid.py:supplied with just a privkey"; \
+	else \
+   	  echo "BAD:example_scripts/python/abac_keyid.py:supplied with just a privkey, should fail"; \
+	fi)
+
+
+run_id3: 
+	@echo "---running (python) id3 script"
+	@make clean
+	@make setup
+	@(rc=`$(MY_ENV) ./abac_keyid2.py IceCream_ID.pem IceCream_private.pem | grep okay` ; \
+	if [ -z "$$rc" ]; then \
+   	  echo "BAD:example_scripts/python/abac_keyid.py:supplied both id and privkey pem files"; \
+	else \
+   	  echo "GOOD:example_scripts/python/abac_keyid.py:supplied with id and privkey pem files"; \
+	fi)
+
+run_prove:
+	@echo "---running (python) prover script"
+	@make clean
+	@make setup
+	@$(MY_ENV) ./abac_attr.py IceCream_ID.pem IceCream_private.pem IceCream_attr.xml Chocolate_ID.pem 1>/dev/null 2>&1
+	@(rc=`$(MY_ENV) ./run_prover| grep success` ; \
+	if [ -z "$$rc" ]; then \
+   	  echo "BAD:example_scripts/python/abac_prover.py:trying out libabac python api to make a prover"; \
+	else \
+   	  echo "GOOD:example_scripts/python/abac_prover.py:trying out libabac python api to make a prover"; \
+	fi)
+
+#this needed to be run by hand (input dumdum twice)...
+#echo '---running (python) encrypted key attr script'
+#./run_e_prover 1> e_prover.log 2>& 1
+#result=`grep success e_prover.log 2>/dev/null |wc -l`
+#if [ "$result" = "2" ]; then
+#   echo "   PASSED"
+#else
+#   echo "   ERROR"
+#fi
+#run_e_attr: 
+#	make clean
+#	rm -rf e_attr.log pfile
+#	echo "dumdum" > pfile
+#	openssl genrsa -des3 -out Soda_private.pem -passout file:pfile
+#	creddy --generate --cn Soda --key Soda_private.pem --p=pfile
+#	creddy --generate --cn Cream
+#	./abac_e_attr.py Soda_ID.pem Soda_private.pem Soda_attr.xml pfile Cream_ID.pem 1>e_attr.log 2>&1
+
Index: tests/example_scripts/python/run_e_prover
===================================================================
--- tests/example_scripts/python/run_e_prover	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/example_scripts/python/run_e_prover	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,3 +1,5 @@
 #!/bin/sh
+
+. ${TESTDIR}/test_util.sh
 
 keystore=`pwd`
@@ -8,11 +10,11 @@
 
 echo "make a id credential with encrypted private key"
-creddy --generate --cn Soda --key Soda_eprivate.pem
+$eloc/creddy --generate --cn Soda --key Soda_eprivate.pem
 
 echo "make a generic  id credential"
-creddy --generate --cn Slush 
+$eloc/creddy --generate --cn Slush 
 
 #principal
-creddy --generate --cn Cream
+$eloc/creddy --generate --cn Cream
 
 echo "make an attribute with id with encrypted private key"
Index: tests/example_scripts/python/run_prover
===================================================================
--- tests/example_scripts/python/run_prover	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/example_scripts/python/run_prover	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,7 +1,9 @@
 #!/bin/sh
 
+. ${TESTDIR}/test_util.sh
+
 keystore=`pwd`
-pID=`creddy --keyid --cert ${keystore}/IceCream_ID.pem`
-cID=`creddy --keyid --cert ${keystore}/Chocolate_ID.pem`
+pID=`$eloc/creddy --keyid --cert ${keystore}/IceCream_ID.pem`
+cID=`$eloc/creddy --keyid --cert ${keystore}/Chocolate_ID.pem`
 
 role="${pID}.delicious"
Index: tests/example_scripts/python/setup.sh
===================================================================
--- tests/example_scripts/python/setup.sh	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/example_scripts/python/setup.sh	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,10 @@
+#!/bin/sh
+# setup.sh
+
+. ${TESTDIR}/test_util.sh
+
+$eloc/creddy --generate --cn IceCream
+$eloc/creddy --generate --cn Chocolate
+
+
+
Index: tests/example_scripts/wiki/Makefile
===================================================================
--- tests/example_scripts/wiki/Makefile	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/example_scripts/wiki/Makefile	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,8 +1,513 @@
-
-.PHONY : runcheck clean 
-runcheck: $(DIRECTORY)
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# tests/example_scripts/wiki/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+#
+# example_scripts/wiki
+#
+
+pkgdatadir = $(datadir)/abac
+pkgincludedir = $(includedir)/abac
+pkglibdir = $(libdir)/abac
+pkglibexecdir = $(libexecdir)/abac
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+subdir = tests/example_scripts/wiki
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_openssl.m4 \
+	$(top_srcdir)/m4/ax_check_xml2.m4 \
+	$(top_srcdir)/m4/ax_check_xmlsec1.m4 \
+	$(top_srcdir)/m4/ax_pkg_swig.m4 \
+	$(top_srcdir)/m4/ax_python_devel.m4 \
+	$(top_srcdir)/m4/ax_swig_enable_cxx.m4 \
+	$(top_srcdir)/m4/ax_swig_python.m4 $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/mei/Deter/abac0-master/missing --run aclocal-1.11
+AMTAR = ${SHELL} /home/mei/Deter/abac0-master/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/mei/Deter/abac0-master/missing --run automake-1.11
+AWK = gawk
+AX_SWIG_PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+AX_SWIG_PYTHON_OPT = -python
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DPACKAGE_NAME=\"ABAC\" -DPACKAGE_TARNAME=\"abac\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"ABAC\ 0.1.5\" -DPACKAGE_BUGREPORT=\"faber@ISI.EDU\" -DPACKAGE_URL=\"\" -DPACKAGE=\"abac\" -DVERSION=\"0.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PYTHON=\"2.7\" -DHAVE_INTTYPES_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_PATHS_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_PTRDIFF_T=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_ATEXIT=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1
+DEPDIR = .deps
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+FGREP = /bin/grep -F
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /home/mei/Deter/abac0-master/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_INCLUDES =  
+OPENSSL_LDFLAGS =  
+OPENSSL_LIBS = -lssl -lcrypto  
+OTOOL = 
+OTOOL64 = 
+PACKAGE = abac
+PACKAGE_BUGREPORT = faber@ISI.EDU
+PACKAGE_NAME = ABAC
+PACKAGE_STRING = ABAC 0.1.5
+PACKAGE_TARNAME = abac
+PACKAGE_URL = 
+PACKAGE_VERSION = 0.1.5
+PATH_SEPARATOR = :
+PERL = perl
+PKG_CONFIG = /usr/bin/pkg-config
+PYTHON = /usr/local/bin/python
+PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+PYTHON_EXEC_PREFIX = ${exec_prefix}
+PYTHON_EXTRA_LDFLAGS = -Xlinker -export-dynamic
+PYTHON_EXTRA_LIBS =  -lpthread -ldl  -lutil -lm
+PYTHON_LDFLAGS = -L/usr/local/lib/python2.7/config -lpython2.7
+PYTHON_PLATFORM = linux2
+PYTHON_PREFIX = ${prefix}
+PYTHON_SITE_PKG = /usr/local/lib/python2.7/site-packages
+PYTHON_VERSION = 2.7
+RANLIB = ranlib
+SED = /bin/sed
+SET_MAKE = 
+SHELL = /bin/bash
+SITE_PERL = /usr/local/lib/site_perl
+STRIP = strip
+SWIG = /usr/local/bin/swig -c++
+SWIG_LIB = /usr/local/share/swig/2.0.4
+VERSION = 0.1.5
+XML2_CONFIG = /usr/bin/xml2-config
+XML2_INCLUDES = -I/usr/include/libxml2
+XML2_LDFLAGS = -lxml2
+XML2_LIBS = -lxml2
+XMLSEC1_CONFIG = /usr/bin/xmlsec1-config
+XMLSEC1_INCLUDES = -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\"openssl\"
+XMLSEC1_LDFLAGS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+XMLSEC1_LIBS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+abs_builddir = /home/mei/Deter/abac0-master/tests/example_scripts/wiki
+abs_srcdir = /home/mei/Deter/abac0-master/tests/example_scripts/wiki
+abs_top_builddir = /home/mei/Deter/abac0-master
+abs_top_srcdir = /home/mei/Deter/abac0-master
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/mei/Deter/abac0-master/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+lt_ECHO = echo
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+pkgpyexecdir = ${pyexecdir}/abac
+pkgpythondir = ${pythondir}/abac
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+pyexecdir = ${exec_prefix}/lib/python2.7/site-packages
+pythondir = ${prefix}/lib/python2.7/site-packages
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias = 
+top_build_prefix = ../../../
+top_builddir = ../../..
+top_srcdir = ../../..
+INCLUDES = -I$(abs_top_srcdir)/libabac
+LDADD = $(abs_top_builddir)/libabac/libabac.la
+CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
+PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
+PYTHON_ENV = PYTHONPATH=$(abs_top_builddir)/swig/python:$(abs_top_builddir)/swig/python/.libs:$(abs_top_builddir)/tests
+TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
+MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(PYTHON_ENV) $(TEST_ENV)
+FIRST = id1
+REST = id2 id3 id4 id5 attr1 attr2 ctxtQuery1 ctxtQuery2
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/example_scripts/wiki/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign tests/example_scripts/wiki/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	clean-local distclean distclean-generic distclean-libtool \
+	distdir dvi dvi-am html html-am info info-am install \
+	install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	uninstall uninstall-am
+
+
+.PHONY: runcheck clean-local
+
+all: $(FIRST) $(REST)
+
+id1: id1.py
+	@make clean
+	@echo "---running (wiki) id1.py script"
+	@(rc=`$(MY_ENV) ./id1.py |wc -c`; \
+	if [ $$rc -eq 41 ] ; then \
+	  echo "GOOD:example_scripts/wiki/id.py:making principal"; \
+	else \
+	  echo "BAD:example_scripts/wiki/id.py:making principal"; \
+	fi)
+
+gen_newguy: newguy.sh
+	@$(MY_ENV) ./newguy.sh 1>/dev/null 2>&1
+
+id2: id2.py
+	make gen_newguy
+	@echo "---running (wiki) id2.py script"
+	@(rc=`$(MY_ENV) ./id2.py |wc -c` ; \
+	if [ $$rc -eq 82 ]; then \
+	  echo "GOOD:example_scripts/wiki/id2.py:making principal and chunk"; \
+	else \
+	  echo "BAD:example_scripts/wiki/id2.py:making principal and chunk"; \
+	fi)
+
+id3: id3.py
+	@make clean
+	@echo "---running (wiki) id3.py script"
+	@(rc=`$(MY_ENV) ./id3.py |wc -c` ; \
+	if [ $$rc -eq 123 ]; then \
+	  echo "GOOD:example_scripts/wiki/id3.py:making principal and chunk"; \
+	else \
+	  echo "BAD:example_scripts/wiki/id3.py:making principal and chunk"; \
+	fi)
+
+id4: id4.py
+	@make clean
+	@echo "---running (wiki) id4.py script"
+	@$(MY_ENV) ./id4.py 1 > id4.out 2>&1   
+	@($(MY_ENV) ./id4.ck; \
+	if [ $$? -eq 0 ]; then \
+	  echo ""; \
+	  echo "GOOD:example_scripts/wiki/id4.py:making variety of principals"; \
+	else \
+	  echo "BAD:example_scripts/wiki/id4.py:making variety of principals"; \
+	fi)
+	rm id4.out
+
+id5: id5.py
+	@make clean
+	@echo "---running (wiki) id5.py script"
+	@$(MY_ENV) ./id5.py 1 > id5.out 2>& 1 
+	@($(MY_ENV) ./id5.ck; \
+	if [ $$? -eq 0 ]; then \
+	  echo ""; \
+	  echo "GOOD:example_scripts/wiki/id5.py:making variety of principals"; \
+	else \
+	  echo "BAD:example_scripts/wiki/id5.py:making variety of principals"; \
+	fi)
+	rm id5.out
+
+attr1: attr1.py
+	@make clean
+	@echo "---running (wiki) attr1.py script"
+	@(rc=`$(MY_ENV) ./attr1.py |wc -c` ; \
+	if [ $$rc -eq 0 ]; then \
+	  echo "GOOD:example_scripts/wiki/attr1.py:making attribute"; \
+	else \
+	  echo "BAD:example_scripts/wiki/attr1.py:making attribute"; \
+	fi)
+
+attr2: attr2.py
+	@make clean
+	@echo "---running (wiki) attr2.py script"
+	@(rc=`$(MY_ENV) ./attr2.py |wc -c` ; \
+	if [ $$rc -eq 0 ]; then \
+	  echo "GOOD:example_scripts/wiki/attr2.py:making more attribute"; \
+	else \
+	  echo "BAD:example_scripts/wiki/attr2.py:making more attribute"; \
+	fi)
+
+ctxtQuery1: ctxtQuery1.py
+	make clean
+	@echo "---running (wiki) ctxtQuery1.py script"
+	@(rc=`$(MY_ENV) ./ctxtQuery1.py |grep "ok? 1"` ; \
+	if [ "$$rc" = "" ]; then \
+	  echo "BAD:example_scripts/wiki/ctxtQuery1.py:prove in context"; \
+	else \
+	  echo "GOOD:example_scripts/wiki/ctxtQuery1.py:prove in context"; \
+	fi)
+
+ctxtQuery2: ctxtQuery2.py
+	make clean
+	@echo "---running (wiki) ctxtQuery2.py script"
+	@(rc=`$(MY_ENV) ./ctxtQuery2.py |grep "ok? 1"` ; \
+	if [ "$$rc" = "" ]; then \
+	  echo "BAD:example_scripts/wiki/ctxtQuery2.py:prove in contxt"; \
+	else \
+	  echo "GOOD:example_scripts/wiki/ctxtQuery2.py:prove in contxt"; \
+	fi)
 
 clean:
-	@rm -rf *.xml *.pem *.out
-
-
+	@rm -rf *.xml *.pem 
+
+clean-local:
+	@rm -rf *.xml *.pem
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: tests/example_scripts/wiki/Makefile.am
===================================================================
--- tests/example_scripts/wiki/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/example_scripts/wiki/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,127 @@
+#
+# example_scripts/wiki
+#
+
+.PHONY: runcheck clean-local
+
+INCLUDES = -I$(abs_top_srcdir)/libabac
+LDADD = $(abs_top_builddir)/libabac/libabac.la
+CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
+PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
+PYTHON_ENV = PYTHONPATH=$(abs_top_builddir)/swig/python:$(abs_top_builddir)/swig/python/.libs:$(abs_top_builddir)/tests
+TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
+MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(PYTHON_ENV) $(TEST_ENV)
+
+
+FIRST=id1
+REST=id2 id3 id4 id5 attr1 attr2 ctxtQuery1 ctxtQuery2
+
+## need to enforce a specific order,
+all: $(FIRST) $(REST)
+
+id1: id1.py
+	@make clean
+	@echo "---running (wiki) id1.py script"
+	@(rc=`$(MY_ENV) ./id1.py |wc -c`; \
+	if [ $$rc -eq 41 ] ; then \
+	  echo "GOOD:example_scripts/wiki/id.py:making principal"; \
+	else \
+	  echo "BAD:example_scripts/wiki/id.py:making principal"; \
+	fi)
+
+gen_newguy: newguy.sh
+	@$(MY_ENV) ./newguy.sh 1>/dev/null 2>&1
+
+id2: id2.py
+	make gen_newguy
+	@echo "---running (wiki) id2.py script"
+	@(rc=`$(MY_ENV) ./id2.py |wc -c` ; \
+	if [ $$rc -eq 82 ]; then \
+	  echo "GOOD:example_scripts/wiki/id2.py:making principal and chunk"; \
+	else \
+	  echo "BAD:example_scripts/wiki/id2.py:making principal and chunk"; \
+	fi)
+
+id3: id3.py
+	@make clean
+	@echo "---running (wiki) id3.py script"
+	@(rc=`$(MY_ENV) ./id3.py |wc -c` ; \
+	if [ $$rc -eq 123 ]; then \
+	  echo "GOOD:example_scripts/wiki/id3.py:making principal and chunk"; \
+	else \
+	  echo "BAD:example_scripts/wiki/id3.py:making principal and chunk"; \
+	fi)
+
+id4: id4.py
+	@make clean
+	@echo "---running (wiki) id4.py script"
+	@$(MY_ENV) ./id4.py 1 > id4.out 2>&1   
+	@($(MY_ENV) ./id4.ck; \
+	if [ $$? -eq 0 ]; then \
+	  echo ""; \
+	  echo "GOOD:example_scripts/wiki/id4.py:making variety of principals"; \
+	else \
+	  echo "BAD:example_scripts/wiki/id4.py:making variety of principals"; \
+	fi)
+	rm id4.out
+
+id5: id5.py
+	@make clean
+	@echo "---running (wiki) id5.py script"
+	@$(MY_ENV) ./id5.py 1 > id5.out 2>& 1 
+	@($(MY_ENV) ./id5.ck; \
+	if [ $$? -eq 0 ]; then \
+	  echo ""; \
+	  echo "GOOD:example_scripts/wiki/id5.py:making variety of principals"; \
+	else \
+	  echo "BAD:example_scripts/wiki/id5.py:making variety of principals"; \
+	fi)
+	rm id5.out
+
+attr1: attr1.py
+	@make clean
+	@echo "---running (wiki) attr1.py script"
+	@(rc=`$(MY_ENV) ./attr1.py |wc -c` ; \
+	if [ $$rc -eq 0 ]; then \
+	  echo "GOOD:example_scripts/wiki/attr1.py:making attribute"; \
+	else \
+	  echo "BAD:example_scripts/wiki/attr1.py:making attribute"; \
+	fi)
+
+attr2: attr2.py
+	@make clean
+	@echo "---running (wiki) attr2.py script"
+	@(rc=`$(MY_ENV) ./attr2.py |wc -c` ; \
+	if [ $$rc -eq 0 ]; then \
+	  echo "GOOD:example_scripts/wiki/attr2.py:making more attribute"; \
+	else \
+	  echo "BAD:example_scripts/wiki/attr2.py:making more attribute"; \
+	fi)
+
+ctxtQuery1: ctxtQuery1.py
+	make clean
+	@echo "---running (wiki) ctxtQuery1.py script"
+	@(rc=`$(MY_ENV) ./ctxtQuery1.py |grep "ok? 1"` ; \
+	if [ "$$rc" = "" ]; then \
+	  echo "BAD:example_scripts/wiki/ctxtQuery1.py:prove in context"; \
+	else \
+	  echo "GOOD:example_scripts/wiki/ctxtQuery1.py:prove in context"; \
+	fi)
+
+ctxtQuery2: ctxtQuery2.py
+	make clean
+	@echo "---running (wiki) ctxtQuery2.py script"
+	@(rc=`$(MY_ENV) ./ctxtQuery2.py |grep "ok? 1"` ; \
+	if [ "$$rc" = "" ]; then \
+	  echo "BAD:example_scripts/wiki/ctxtQuery2.py:prove in contxt"; \
+	else \
+	  echo "GOOD:example_scripts/wiki/ctxtQuery2.py:prove in contxt"; \
+	fi)
+
+clean:
+	@rm -rf *.xml *.pem 
+
+clean-local:
+	@rm -rf *.xml *.pem
+
+
Index: tests/example_scripts/wiki/attr1.ck
===================================================================
--- tests/example_scripts/wiki/attr1.ck	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,15 +1,0 @@
-#!/bin/sh
-
-# attr1.ck
-q=`cat attr1.out | wc -c`
-
-if [ $q -eq 0 ]; then
-    return 0
-else
-    return 1
-fi
-
-
-
-
-
Index: tests/example_scripts/wiki/attr2.ck
===================================================================
--- tests/example_scripts/wiki/attr2.ck	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,15 +1,0 @@
-#!/bin/sh
-
-# attr2.ck
-q=`cat attr2.out | wc -c`
-
-if [ $q -eq 0 ]; then
-    return 0
-else
-    return 1
-fi
-
-
-
-
-
Index: tests/example_scripts/wiki/ctxtQuery1.ck
===================================================================
--- tests/example_scripts/wiki/ctxtQuery1.ck	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,10 +1,0 @@
-#!/bin/sh
-
-# ctxtQuery1.ck
-result=`grep "ok? 1" ctxtQuery1.out 2>/dev/null`
-
-if [ "$result" = "" ]; then
-    return 1
-else
-    return 0
-fi
Index: tests/example_scripts/wiki/ctxtQuery2.ck
===================================================================
--- tests/example_scripts/wiki/ctxtQuery2.ck	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,10 +1,0 @@
-#!/bin/sh
-
-# ctxtQuery2.ck
-result=`grep "ok? 1" ctxtQuery2.out 2>/dev/null`
-
-if [ "$result" = "" ]; then
-    return 1
-else
-    return 0
-fi
Index: tests/example_scripts/wiki/ctxtQuery2.py
===================================================================
--- tests/example_scripts/wiki/ctxtQuery2.py	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/example_scripts/wiki/ctxtQuery2.py	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
 """
-ctxtQuery1.py
+ctxtQuery2.py
 """
 import os
Index: tests/example_scripts/wiki/id1.ck
===================================================================
--- tests/example_scripts/wiki/id1.ck	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,15 +1,0 @@
-#!/bin/sh
-
-# id1.ck
-q=`cat id1.out | wc -c`
-
-if [ $q -eq 41 ]; then
-    return 0
-else
-    return 1
-fi
-
-
-
-
-
Index: tests/example_scripts/wiki/id2.ck
===================================================================
--- tests/example_scripts/wiki/id2.ck	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,15 +1,0 @@
-#!/bin/sh
-
-# id2.ck
-q=`cat id2.out | wc -c`
-
-if [ $q -eq 82 ]; then
-    return 0
-else
-    return 1
-fi
-
-
-
-
-
Index: tests/example_scripts/wiki/id3.ck
===================================================================
--- tests/example_scripts/wiki/id3.ck	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,15 +1,0 @@
-#!/bin/sh
-
-# id3.ck
-q=`cat id3.out | wc -c`
-
-if [ $q -eq 123 ]; then
-    return 0
-else
-    return 1
-fi
-
-
-
-
-
Index: tests/example_scripts/wiki/newguy.sh
===================================================================
--- tests/example_scripts/wiki/newguy.sh	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/example_scripts/wiki/newguy.sh	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,8 @@
+#!/bin/sh
+# newguy.sh
+
+. ${TESTDIR}/test_util.sh
+
+$eloc/creddy --generate --cn newGuy 
+mv newGuy_ID.pem newGuy.pem
+
Index: tests/python_tests/Makefile
===================================================================
--- tests/python_tests/Makefile	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/python_tests/Makefile	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,30 +1,459 @@
-
-DIRECTORY= acme_rockets_intersection_rt0 basic_attribute experiment_create_rt0 acme_rockets_rt0 basic_id         
-
-.PHONY : setup runcheck clean 
-runcheck: $(DIRECTORY)
-
-clean:
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# tests/python_tests/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+#
+# python_tests
+#
+
+pkgdatadir = $(datadir)/abac
+pkgincludedir = $(includedir)/abac
+pkglibdir = $(libdir)/abac
+pkglibexecdir = $(libexecdir)/abac
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+subdir = tests/python_tests
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_openssl.m4 \
+	$(top_srcdir)/m4/ax_check_xml2.m4 \
+	$(top_srcdir)/m4/ax_check_xmlsec1.m4 \
+	$(top_srcdir)/m4/ax_pkg_swig.m4 \
+	$(top_srcdir)/m4/ax_python_devel.m4 \
+	$(top_srcdir)/m4/ax_swig_enable_cxx.m4 \
+	$(top_srcdir)/m4/ax_swig_python.m4 $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/mei/Deter/abac0-master/missing --run aclocal-1.11
+AMTAR = ${SHELL} /home/mei/Deter/abac0-master/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/mei/Deter/abac0-master/missing --run automake-1.11
+AWK = gawk
+AX_SWIG_PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+AX_SWIG_PYTHON_OPT = -python
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DPACKAGE_NAME=\"ABAC\" -DPACKAGE_TARNAME=\"abac\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"ABAC\ 0.1.5\" -DPACKAGE_BUGREPORT=\"faber@ISI.EDU\" -DPACKAGE_URL=\"\" -DPACKAGE=\"abac\" -DVERSION=\"0.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PYTHON=\"2.7\" -DHAVE_INTTYPES_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_PATHS_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_PTRDIFF_T=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_ATEXIT=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1
+DEPDIR = .deps
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+FGREP = /bin/grep -F
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /home/mei/Deter/abac0-master/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_INCLUDES =  
+OPENSSL_LDFLAGS =  
+OPENSSL_LIBS = -lssl -lcrypto  
+OTOOL = 
+OTOOL64 = 
+PACKAGE = abac
+PACKAGE_BUGREPORT = faber@ISI.EDU
+PACKAGE_NAME = ABAC
+PACKAGE_STRING = ABAC 0.1.5
+PACKAGE_TARNAME = abac
+PACKAGE_URL = 
+PACKAGE_VERSION = 0.1.5
+PATH_SEPARATOR = :
+PERL = perl
+PKG_CONFIG = /usr/bin/pkg-config
+PYTHON = /usr/local/bin/python
+PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+PYTHON_EXEC_PREFIX = ${exec_prefix}
+PYTHON_EXTRA_LDFLAGS = -Xlinker -export-dynamic
+PYTHON_EXTRA_LIBS =  -lpthread -ldl  -lutil -lm
+PYTHON_LDFLAGS = -L/usr/local/lib/python2.7/config -lpython2.7
+PYTHON_PLATFORM = linux2
+PYTHON_PREFIX = ${prefix}
+PYTHON_SITE_PKG = /usr/local/lib/python2.7/site-packages
+PYTHON_VERSION = 2.7
+RANLIB = ranlib
+SED = /bin/sed
+SET_MAKE = 
+SHELL = /bin/bash
+SITE_PERL = /usr/local/lib/site_perl
+STRIP = strip
+SWIG = /usr/local/bin/swig -c++
+SWIG_LIB = /usr/local/share/swig/2.0.4
+VERSION = 0.1.5
+XML2_CONFIG = /usr/bin/xml2-config
+XML2_INCLUDES = -I/usr/include/libxml2
+XML2_LDFLAGS = -lxml2
+XML2_LIBS = -lxml2
+XMLSEC1_CONFIG = /usr/bin/xmlsec1-config
+XMLSEC1_INCLUDES = -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\"openssl\"
+XMLSEC1_LDFLAGS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+XMLSEC1_LIBS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+abs_builddir = /home/mei/Deter/abac0-master/tests/python_tests
+abs_srcdir = /home/mei/Deter/abac0-master/tests/python_tests
+abs_top_builddir = /home/mei/Deter/abac0-master
+abs_top_srcdir = /home/mei/Deter/abac0-master
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/mei/Deter/abac0-master/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+lt_ECHO = echo
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+pkgpyexecdir = ${pyexecdir}/abac
+pkgpythondir = ${pythondir}/abac
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+pyexecdir = ${exec_prefix}/lib/python2.7/site-packages
+pythondir = ${prefix}/lib/python2.7/site-packages
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias = 
+top_build_prefix = ../../
+top_builddir = ../..
+top_srcdir = ../..
+INCLUDES = -I$(abs_top_srcdir)/libabac
+LDADD = $(abs_top_builddir)/libabac/libabac.la
+CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
+PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
+TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
+PYTHON_ENV = PYTHONPATH=$(abs_top_builddir)/swig/python:$(abs_top_builddir)/swig/python/.libs:$(abs_top_builddir)/tests
+MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(TEST_ENV) $(PYTHON_ENV)
+DIRECTORY = acme_rockets_intersection_rt0 acme_rockets_rt0 experiment_create_rt0
+OTHER = basic_attribute basic_id 
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/python_tests/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign tests/python_tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	clean-local distclean distclean-generic distclean-libtool \
+	distdir dvi dvi-am html html-am info info-am install \
+	install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	uninstall uninstall-am
+
+
+.PHONY : clean-local runcheck clean
+all: runcheck
+
+clean :
 	@for i in $(DIRECTORY); do \
-	here=`pwd`; \
-	cd $$i; \
-	rm -rf *.xml *.pem *.out *.log; \
-	cd $$here; \
-	done 
-	@rm -rf result
-
-runcheck: 
-	@echo 'running libabac PYTHON testing...' 
-	@rm -rf result
+	  here=`pwd`; \
+	  cd $$i; \
+	  rm -rf *.pem *.xml; \
+	  cd $$here; \
+        done
+	@(cd basic_id; rm -rf *.pem *.xml)
+	@(cd basic_attribute; rm -rf *.pem *.xml)
+	@rm -rf result error
+
+runcheck :
+	@touch error
+	@echo 'running libabac PYTHON testing...' | tee result
+	@make clean
 	@for i in $(DIRECTORY); do \
-	here=`pwd`; \
-	cd $$i; \
-	printf "\n ==> RUN on %s\n" "$$i" >> ../result; \
-	./run_test >> ../result 2>/dev/null; \
-	cd $$here; \
-	done
-	@if test -f result && test `cat result|wc -c` -eq 444 ; \
-	then echo "   PASSED"; \
-	else echo "   ERROR:got changes!!!"; \
+	  here=`pwd`; \
+	  cd $$i; \
+	  printf "\n ==> RUN on %s\n" "$$i" >> $$here/result ; \
+	  $(MY_ENV) ./setup.py 1>/dev/null 2>&1; \
+	  $(MY_ENV) ./attr.py 1>/dev/null 2>&1; \
+	  $(MY_ENV) ./query.py |tee -a $$here/result |grep BAD >> $$here/error; \
+	  cd $$here; \
+        done
+	make ids
+	make attrs
+	@if test -f error ; \
+	  then \
+	    (if test `cat error | wc -l ` -eq 0 ; \
+	      then echo "   PASSED"; \
+	      else (echo "   ERROR!!!"; cat error;) \
+	    fi) \
+	  else echo "   PASSED"; \
 	fi
 
+ids:
+	@printf "\n ==> RUN on basic_id\n" >> result
+	@(cd basic_id; \
+	$(MY_ENV) ./setup.py 1>/dev/null 2>&1; \
+	$(MY_ENV) ./query.py |tee -a ../result |grep BAD >> ../error; \
+	cd ..)
+
+attrs:
+	@printf "\n ==> RUN on basic_attr\n" >> result
+	@(cd basic_attribute; \
+	$(MY_ENV) ./setup.py 1>/dev/null 2>&1; \
+	$(MY_ENV) ./query.py |tee -a ../result |grep BAD >> ../error; \
+	cd ..)
+
+clean-local: 
+	@rm -rf result error
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: tests/python_tests/Makefile.am
===================================================================
--- tests/python_tests/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/python_tests/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,69 @@
+#
+# python_tests
+#
+
+INCLUDES = -I$(abs_top_srcdir)/libabac
+LDADD = $(abs_top_builddir)/libabac/libabac.la
+CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
+PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
+TEST_ENV = TESTDIR=$(abs_top_builddir)/tests
+PYTHON_ENV = PYTHONPATH=$(abs_top_builddir)/swig/python:$(abs_top_builddir)/swig/python/.libs:$(abs_top_builddir)/tests
+MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(TEST_ENV) $(PYTHON_ENV)
+
+DIRECTORY= acme_rockets_intersection_rt0 acme_rockets_rt0 experiment_create_rt0
+OTHER=basic_attribute basic_id 
+
+.PHONY : clean-local runcheck clean
+all: runcheck
+
+clean :
+	@for i in $(DIRECTORY); do \
+	  here=`pwd`; \
+	  cd $$i; \
+	  rm -rf *.pem *.xml; \
+	  cd $$here; \
+        done
+	@(cd basic_id; rm -rf *.pem *.xml)
+	@(cd basic_attribute; rm -rf *.pem *.xml)
+	@rm -rf result error
+
+runcheck :
+	@touch error
+	@echo 'running libabac PYTHON testing...' | tee result
+	@make clean
+	@for i in $(DIRECTORY); do \
+	  here=`pwd`; \
+	  cd $$i; \
+	  printf "\n ==> RUN on %s\n" "$$i" >> $$here/result ; \
+	  $(MY_ENV) ./setup.py 1>/dev/null 2>&1; \
+	  $(MY_ENV) ./attr.py 1>/dev/null 2>&1; \
+	  $(MY_ENV) ./query.py |tee -a $$here/result |grep BAD >> $$here/error; \
+	  cd $$here; \
+        done
+	make ids
+	make attrs
+	@if test -f error ; \
+	  then \
+	    (if test `cat error | wc -l ` -eq 0 ; \
+	      then echo "   PASSED"; \
+	      else (echo "   ERROR!!!"; cat error;) \
+	    fi) \
+	  else echo "   PASSED"; \
+	fi
+
+ids:
+	@printf "\n ==> RUN on basic_id\n" >> result
+	@(cd basic_id; \
+	$(MY_ENV) ./setup.py 1>/dev/null 2>&1; \
+	$(MY_ENV) ./query.py |tee -a ../result |grep BAD >> ../error; \
+	cd ..)
+
+attrs:
+	@printf "\n ==> RUN on basic_attr\n" >> result
+	@(cd basic_attribute; \
+	$(MY_ENV) ./setup.py 1>/dev/null 2>&1; \
+	$(MY_ENV) ./query.py |tee -a ../result |grep BAD >> ../error; \
+	cd ..)
+
+clean-local: 
+	@rm -rf result error
Index: tests/python_tests/acme_rockets_intersection_rt0/query.py
===================================================================
--- tests/python_tests/acme_rockets_intersection_rt0/query.py	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/python_tests/acme_rockets_intersection_rt0/query.py	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -9,4 +9,5 @@
 import os
 import ABAC
+from test_util import runTest
 
 ctxt = ABAC.Context()
@@ -18,6 +19,6 @@
     ctxt.load_directory(keystore)
 else:
-    print("keystore is not set...")
-    exit(1)
+    print("keystore is not set, using current directory...")
+    ctxt.load_directory(".")
 
 # retrieve principals' keyid value from local credential files
@@ -50,13 +51,6 @@
 # role = "[keyid:Acme].role:buy_rockets"
 # p = "[keyid:coyote]" 
-
-print "\n===good============ Acme.buy_rockets <- Coyote"
-(success, credentials) = ctxt.query("%s.buy_rockets" % acme, coyote)
-if success:
-    print "success!"
-else:
-    print "failure!"
-for credential in credentials:
-    print "credential %s <- %s" % (credential.head().string(), credential.tail().string())
+print "===good============ Acme.buy_rockets <- Coyote"
+runTest("python_tests/acme_rockets_intersection_rt0","test1",ctxt,"%s.buy_rockets" % acme, coyote, 1, "query in python with intersect")
 
 ##########################################################################
@@ -64,11 +58,6 @@
 # role = "[keyid:Acme].role:buy_rockets"
 # p = "[keyid:batman]" 
+print "===bad============ Acme.buy_rockets <- Batman"
+runTest("python_tests/acme_rockets_intersection_rt0","test2",ctxt,"%s.buy_rockets" % acme, batman, 0, "expected failure, no such relation in db")
 
-print "\n===bad============ Acme.buy_rockets <- Batman"
-(success, credentials) = ctxt.query("%s.buy_rockets" % acme, batman)
-if success:
-    print "success!"
-else:
-    print "failure!"
-for credential in credentials:
-    print "credential %s <- %s" % (credential.head().string(), credential.tail().string())
+
Index: tests/python_tests/acme_rockets_intersection_rt0/run_test
===================================================================
--- tests/python_tests/acme_rockets_intersection_rt0/run_test	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,20 +1,0 @@
-#!/bin/sh 
-
-rm -rf *.pem *.xml *.log *.out
-
-echo '---setup principals'
-./setup.py 1>/dev/null 2>& 1
-
-echo '---setup attributes'
-./attr.py 1>intersect.log 2>& 1
-
-echo '---run queries'
-env keystore=`pwd` ./query.py 1>intersect.out 2>& 1
-
-good=`grep success intersect.out |wc -l`
-bad=`grep failure intersect.out |wc -l`
-if [ $good -eq 1 -a $bad -eq 1 ]; then
-    echo "   PASSED"
-else
-    echo "   ERROR:acme_rockets_intersection_rt0 test result differs!!!"
-fi
Index: tests/python_tests/acme_rockets_rt0/query.py
===================================================================
--- tests/python_tests/acme_rockets_rt0/query.py	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/python_tests/acme_rockets_rt0/query.py	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -11,4 +11,6 @@
 import ABAC
 
+from test_util import runTest
+
 ctxt = ABAC.Context()
 
@@ -19,6 +21,6 @@
     ctxt.load_directory(keystore)
 else:
-    print("keystore is not set...")
-    exit(1)
+    print("keystore is not set, using current directory...")
+    ctxt.load_directory(".")
 
 # retrieve principals' keyid value from local credential files
@@ -47,13 +49,6 @@
 # role=[keyid:Acme].role:preferred_customer
 # p =[keyid:coyote]
-
-print "\n===good============ Acme.preferred_customer <- Coyote"
-(success, credentials) = ctxt.query("%s.preferred_customer" % acme, coyote)
-if success:
-    print "success!"
-else:
-    print "failure!"
-for credential in credentials:
-    print "credential %s <- %s" % (credential.head().string(), credential.tail().string())
+print "===good============ Acme.preferred_customer <- Coyote"
+runTest("python_tests/acme_rockets_rt0","test1",ctxt,"%s.preferred_customer" % acme, coyote, 1, "simple single rule matchup")
 
 ##########################################################################
@@ -61,13 +56,6 @@
 # role=[keyid:Acme].role:buy_rockets
 # p =[keyid:coyote]
-
-print "\n===good============ Acme.buy_rockets <- Coyote"
-(success, credentials) = ctxt.query("%s.buy_rockets" % acme, coyote)
-if success:
-    print "success!"
-else:
-    print "failure!"
-for credential in credentials:
-    print "credential %s <- %s" % (credential.head().string(), credential.tail().string())
+print "===good============ Acme.buy_rockets <- Coyote"
+runTest("python_tests/acme_rockets_rt0","test2",ctxt,"%s.buy_rockets" % acme, coyote, 1, "very simplequery")
 
 ##########################################################################
@@ -75,13 +63,6 @@
 # role=[keyid:Coyote].role:friend
 # p=[keyid:Acme] 
-
-print "\n===bad=============== Coyote.friend <- Acme"
-(success, credentials) = ctxt.query("%s.friend" % coyote, acme)
-if success:
-    print "success!"
-else:
-    print "failure!"
-for credential in credentials:
-    print "credential %s <- %s" % (credential.head().string(), credential.tail().string())
+print "===bad=============== Coyote.friend <- Acme"
+runTest("python_tests/acme_rockets_rt0","test3",ctxt,"%s.friend" % coyote, acme, 0, "none existing relation")
 
 ##########################################################################
@@ -89,11 +70,5 @@
 # role=[keyid:Acme].role:buy_rockets 
 # p=[keyid:Acme].role:preferred_customer
+print "===bad?=============== Acme.buy_rockets <- Acme.preferred_customer"
+runTest("python_tests/acme_rockets_rt0","test4",ctxt,"%s.buy_rockets" % acme, "%s.preferred_customer" % acme, 1, "complex role query should fail")
 
-print "\n===bad?=============== Acme.buy_rockets <- Acme.preferred_customer"
-(success, credentials) = ctxt.query("%s.buy_rockets" % acme, "%s.preferred_customer" % acme)
-if success:
-    print "success!"
-else:
-    print "failure!"
-for credential in credentials:
-    print "credential %s <- %s" % (credential.head().string(), credential.tail().string())
Index: tests/python_tests/acme_rockets_rt0/run_test
===================================================================
--- tests/python_tests/acme_rockets_rt0/run_test	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,22 +1,0 @@
-#!/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
-
-
Index: tests/python_tests/basic_attribute/README
===================================================================
--- tests/python_tests/basic_attribute/README	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/python_tests/basic_attribute/README	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -2,5 +2,5 @@
 # This example demonstrates various ways to create and access
 # ID attribute using libabac api
-#  
+# and use query to show that it is indeed in the db  
 
 case 1: make attribute rule
Index: tests/python_tests/basic_attribute/attr.py
===================================================================
--- tests/python_tests/basic_attribute/attr.py	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,89 +1,0 @@
-#!/usr/bin/env python
-
-"""
-  to test with python
-
-cmd1:env keystore=`pwd` ./attr.py 
-
-"""
-
-import os
-import ABAC
-
-ctxt = ABAC.Context()
-
-def print_a(ctxt, msg, dotdot):
-    print "%s rule set..." % msg
-    credentials = ctxt.credentials()
-    for credential in credentials:
-        print "%s:%s<-%s" % (dotdot,credential.head().string(), credential.tail().string())
-
-# Keystore is the directory containing the principal credentials.
-# Load existing principals and/or policy credentials
-if (os.environ.has_key("keystore")) :
-    keystore=os.environ["keystore"]
-else:
-    print("keystore is not set...")
-    exit(1) 
-
-superKID=ABAC.ID("SuperK_ID.pem");
-superKID.load_privkey("SuperK_private.pem");
-ctxt.load_id_chunk(superKID.cert_chunk())
-superK=superKID.keyid()
-
-jackID=ABAC.ID("Jack_ID.pem");
-jackID.load_privkey("Jack_private.pem");
-ctxt.load_id_chunk(jackID.cert_chunk())
-jack=jackID.keyid()
-
-bobID=ABAC.ID("Bob_ID.pem");
-bobID.load_privkey("Bob_private.pem");
-ctxt.load_id_chunk(bobID.cert_chunk())
-bob=bobID.keyid()
-
-maryID=ABAC.ID("Mary_ID.pem");
-maryID.load_privkey("Mary_private.pem");
-ctxt.load_id_chunk(maryID.cert_chunk())
-mary=maryID.keyid()
-
-#case 1:
-#Only employee of SuperK can park
-#[keyid:SuperK].role:park <- [keyid:SuperK].role:employee
-attr = ABAC.Attribute(superKID, "park", 0)
-attr.role(superK,"employee")
-attr.bake()
-attr.write_file("SuperK_park__SuperK_employee_attr.xml")
-ctxt.load_attribute_file("SuperK_park__SuperK_employee_attr.xml")
-print_a(ctxt,"case1","..")
-
-#case 2:
-#Jack is an employee of SuperK
-#[keyid:SuperK].role:employee <- [keyid:Jack]
-attr = ABAC.Attribute(superKID, "employee", 0)
-attr.principal(jack)
-attr.bake()
-# create a policy file at the file system
-attr.write_file("SuperK_employee__Jack_attr.xml")
-ctxt.load_attribute_chunk(attr.cert_chunk());
-print_a(ctxt,"case2","....")
-
-#case 3:
-#Bob is an employee of SuperK
-#[keyid:SuperK].role:employee <- [keyid:Jack]
-attr = ABAC.Attribute(superKID, "employee", 0)
-attr.principal(bob)
-attr.bake()
-#chunk=attr.cert_chunk()
-#nattr=ABAC.Attribute_chunk(chunk)
-#ctxt.load_attribute(nattr);
-#print_a(ctxt,"case3", "....")
-
-#case 4:
-#Mary is an employee of SuperK
-#[keyid:SuperK].role:employee <- [keyid:Mary]
-attr = ABAC.Attribute(superKID, "employee", 0)
-attr.principal(mary)
-attr.bake()
-chunk=attr.cert_chunk()
-ctxt.load_attribute_chunk(chunk);
-print_a(ctxt,"case4","......")
Index: tests/python_tests/basic_attribute/query.py
===================================================================
--- tests/python_tests/basic_attribute/query.py	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/python_tests/basic_attribute/query.py	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,100 @@
+#!/usr/bin/env python
+
+"""
+  to test with python
+
+cmd1:env keystore=`pwd` ./query.py 
+
+"""
+
+import os
+import ABAC
+
+from test_util import runTest
+
+ctxt = ABAC.Context()
+
+def print_a(ctxt, msg, dotdot):
+    print "%s rule set..." % msg
+    credentials = ctxt.credentials()
+    for credential in credentials:
+        print "%s:%s<-%s" % (dotdot,credential.head().string(), credential.tail().string())
+
+# Keystore is the directory containing the principal credentials.
+# Load existing principals and/or policy credentials
+if (os.environ.has_key("keystore")) :
+    keystore=os.environ["keystore"]
+else:
+    print("keystore is not set, using current directory...")
+    ctxt.load_directory(".")
+
+superKID=ABAC.ID("SuperK_ID.pem");
+superKID.load_privkey("SuperK_private.pem");
+ctxt.load_id_chunk(superKID.cert_chunk())
+superK=superKID.keyid()
+
+jackID=ABAC.ID("Jack_ID.pem");
+jackID.load_privkey("Jack_private.pem");
+ctxt.load_id_chunk(jackID.cert_chunk())
+jack=jackID.keyid()
+
+bobID=ABAC.ID("Bob_ID.pem");
+bobID.load_privkey("Bob_private.pem");
+ctxt.load_id_chunk(bobID.cert_chunk())
+bob=bobID.keyid()
+
+maryID=ABAC.ID("Mary_ID.pem");
+maryID.load_privkey("Mary_private.pem");
+ctxt.load_id_chunk(maryID.cert_chunk())
+mary=maryID.keyid()
+
+#case 1:
+#Only employee of SuperK can park
+#[keyid:SuperK].role:park <- [keyid:SuperK].role:employee
+attr = ABAC.Attribute(superKID, "park", 0)
+attr.role(superK,"employee")
+attr.bake()
+attr.write_file("SuperK_park__SuperK_employee_attr.xml")
+ctxt.load_attribute_file("SuperK_park__SuperK_employee_attr.xml")
+print_a(ctxt,"case1","..")
+
+#case 2:
+#Jack is an employee of SuperK
+#[keyid:SuperK].role:employee <- [keyid:Jack]
+attr = ABAC.Attribute(superKID, "employee", 0)
+attr.principal(jack)
+attr.bake()
+# create a policy file at the file system
+attr.write_file("SuperK_employee__Jack_attr.xml")
+ctxt.load_attribute_chunk(attr.cert_chunk());
+print_a(ctxt,"case2","....")
+##########################################################################
+#Jack of SuperK can park?
+print "===good============ SuperK.park <-?- Jack"
+runTest("python_tests/basic_attribute","test1",ctxt,"%s.park" % superK, jack, 1, "check loading of attribute as cert chunk")
+
+#case 3:
+#Bob is an employee of SuperK
+#[keyid:SuperK].role:employee <- [keyid:Bob]
+attr = ABAC.Attribute(superKID, "employee", 0)
+attr.principal(bob)
+attr.bake()
+#chunk=attr.cert_chunk()
+#nattr=ABAC.Attribute_chunk(chunk)
+#ctxt.load_attribute(nattr);
+#print_a(ctxt,"case3", "....")
+
+#case 4:
+#Mary is an employee of SuperK
+#[keyid:SuperK].role:employee <- [keyid:Mary]
+attr = ABAC.Attribute(superKID, "employee", 0)
+attr.principal(mary)
+attr.bake()
+chunk=attr.cert_chunk()
+ctxt.load_attribute_chunk(chunk);
+print_a(ctxt,"case4","......")
+##########################################################################
+#is Mary an employee of superK?
+print "===good============ SuperK.employee <-?- Mary"
+runTest("python_tests/basic_attribute","test2",ctxt,"%s.employee" % superK, mary, 1, "check loading of attribute as chunk")
+
Index: tests/python_tests/basic_attribute/run_test
===================================================================
--- tests/python_tests/basic_attribute/run_test	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,17 +1,0 @@
-#!/bin/sh 
-
-rm -rf *.pem *.xml *.log *.out
-
-echo '---setup principals'
-./setup.py 1>attr.log 2>&1
-
-echo '---run command '
-env keystore=`pwd` ./attr.py > attr.out 2>&1
-
-result=`cat attr.out |wc -l`
-if [ $result -eq 9 ]; then
-    echo "   PASSED"
-else
-    echo "   ERROR:basic_attribute test result differs!!!"
-fi
-
Index: tests/python_tests/basic_id/id.py
===================================================================
--- tests/python_tests/basic_id/id.py	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,103 +1,0 @@
-#!/usr/bin/env python
-
-"""
-  to test with python
-
-cmd:env keystore=`pwd` ./id.py 
-
-"""
-
-import os
-import ABAC
-
-ctxt = ABAC.Context()
-
-# Keystore is the directory containing the principal credentials.
-# Load existing principals and/or policy credentials
-if (os.environ.has_key("keystore")) :
-    keystore=os.environ["keystore"]
-#    ctxt.load_directory(keystore)
-else:
-    print("keystore is not set...")
-    exit(1) 
-
-## case 1
-## creating and writing out using libabac ID
-id=ABAC.ID("Mary", 0)
-print "adding -> %s(Mary/good)" % id.keyid()
-id.write_cert_file("Mary_ID.pem")
-id.write_privkey_file("Mary_private.pem")
-## load principal with id/key file pair
-## note, with this, we do not have handle on the keyid
-## to Mary but it will be in the db
-#XXX# ctxt.load_id_files("Mary_ID.pem","Mary_private.pem")
-
-## case 2
-## creating principal using ID
-id2=ABAC.ID("Jack2", 0)
-print "adding -> %s(Jack2/good)" % id2.keyid()
-## load principal directly with the ID, no external
-## credential files were created
-#XXX# ctxt.load_id(id2)
-
-## case 3
-## creating principal using ID
-id3=ABAC.ID("Mark", 0)
-print "adding -> %s(Mark/good)" % id3.keyid()
-## write cert and key content to a combo file. One is appended
-## after another
-id3.write_privkey_file("Mark_IDKEY.pem")
-id3.write_cert_file("Mark_IDKEY.pem")
-## load principal in with the combo file with the tandem format
-ctxt.load_id_file("Mark_IDKEY.pem")
-
-## case 4
-## creating principal using ID
-id4=ABAC.ID("John", 0)
-print "adding -> %s(John/good,invisible)" % id4.keyid()
-id4.write_cert_file("John_other.pem")
-## load id without the key file
-ctxt.load_id_file("John_other.pem")
-
-## case 5
-## creating principal using ID
-id5=ABAC.ID("Lori", 0)
-print "adding -> %s(Lori/good,nokey)" % id5.keyid()
-## write just cert into the combo file
-id5.write_cert_file("Lori_IDKEY.pem")
-##load principal from a combo file that only contains cert part
-ctxt.load_id_file("Lori2_IDKEY.pem")
-
-## case 6
-## creating principal using ID
-id6=ABAC.ID("Tom", 0)
-print "adding -> %s(Tom/bad,nocert)" % id6.keyid()
-## write just key into the combo file
-id6.write_privkey_file("Tom_IDKEY.pem")
-## load principal from combo file that only contains key part
-ctxt.load_id_file("Tom_IDKEY.pem")
-
-## case 7
-## creating ID using chunk
-## this already created a Tim with private key and
-## stored in the master list
-id7=ABAC.ID("Tim", 0)
-chunk=id7.cert_chunk() 
-id77=ABAC.ID_chunk(chunk)
-## load principal from new id
-ctxt.load_id_chunk(id77.cert_chunk())
-
-## case 8
-## load directly using chunk
-## this already created a Stanley with private key
-## and stored in the master list
-id8=ABAC.ID("Stanley", 0)
-chunk=id8.cert_chunk() 
-## load principal as chunk
-ctxt.load_id_chunk(chunk)
-
-## case 9
-## failure case, loading a non-existing combo file
-print "adding -> Casper(bad,unknown file)"
-ctxt.load_id_file("Casper_IDKEY.pem")
-
Index: tests/python_tests/basic_id/id_ctxt.py
===================================================================
--- tests/python_tests/basic_id/id_ctxt.py	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/python_tests/basic_id/id_ctxt.py	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -7,4 +7,5 @@
 cmd:env keystore=`pwd` ./id_ctxt.py 
 
+-- can not run in rt0 yet
 """
 
Index: tests/python_tests/basic_id/query.py
===================================================================
--- tests/python_tests/basic_id/query.py	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/python_tests/basic_id/query.py	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,104 @@
+#!/usr/bin/env python
+
+"""
+  to test with python
+
+cmd:env keystore=`pwd` ./query.py 
+
+No real query (originally id.py)
+"""
+
+import os
+import ABAC
+
+ctxt = ABAC.Context()
+
+# Keystore is the directory containing the principal credentials.
+# Load existing principals and/or policy credentials
+if (os.environ.has_key("keystore")) :
+    keystore=os.environ["keystore"]
+#    ctxt.load_directory(keystore)
+else:
+    print("keystore is not set, using current directory...")
+    ctxt.load_directory(".")
+
+## case 1
+## creating and writing out using libabac ID
+id=ABAC.ID("Mary", 0)
+print "adding -> %s(Mary/good)" % id.keyid()
+id.write_cert_file("Mary_ID.pem")
+id.write_privkey_file("Mary_private.pem")
+## load principal with id/key file pair
+## note, with this, we do not have handle on the keyid
+## to Mary but it will be in the db
+#XXX# ctxt.load_id_files("Mary_ID.pem","Mary_private.pem")
+
+## case 2
+## creating principal using ID
+id2=ABAC.ID("Jack2", 0)
+print "adding -> %s(Jack2/good)" % id2.keyid()
+## load principal directly with the ID, no external
+## credential files were created
+#XXX# ctxt.load_id(id2)
+
+## case 3
+## creating principal using ID
+id3=ABAC.ID("Mark", 0)
+print "adding -> %s(Mark/good)" % id3.keyid()
+## write cert and key content to a combo file. One is appended
+## after another
+id3.write_privkey_file("Mark_IDKEY.pem")
+id3.write_cert_file("Mark_IDKEY.pem")
+## load principal in with the combo file with the tandem format
+ctxt.load_id_file("Mark_IDKEY.pem")
+
+## case 4
+## creating principal using ID
+id4=ABAC.ID("John", 0)
+print "adding -> %s(John/good,invisible)" % id4.keyid()
+id4.write_cert_file("John_other.pem")
+## load id without the key file
+ctxt.load_id_file("John_other.pem")
+
+## case 5
+## creating principal using ID
+id5=ABAC.ID("Lori", 0)
+print "adding -> %s(Lori/good,nokey)" % id5.keyid()
+## write just cert into the combo file
+id5.write_cert_file("Lori_IDKEY.pem")
+##load principal from a combo file that only contains cert part
+ctxt.load_id_file("Lori2_IDKEY.pem")
+
+## case 6
+## creating principal using ID
+id6=ABAC.ID("Tom", 0)
+print "adding -> %s(Tom/bad,nocert)" % id6.keyid()
+## write just key into the combo file
+id6.write_privkey_file("Tom_IDKEY.pem")
+## load principal from combo file that only contains key part
+ctxt.load_id_file("Tom_IDKEY.pem")
+
+## case 7
+## creating ID using chunk
+## this already created a Tim with private key and
+## stored in the master list
+id7=ABAC.ID("Tim", 0)
+chunk=id7.cert_chunk() 
+id77=ABAC.ID_chunk(chunk)
+## load principal from new id
+ctxt.load_id_chunk(id77.cert_chunk())
+
+## case 8
+## load directly using chunk
+## this already created a Stanley with private key
+## and stored in the master list
+id8=ABAC.ID("Stanley", 0)
+chunk=id8.cert_chunk() 
+## load principal as chunk
+ctxt.load_id_chunk(chunk)
+
+## case 9
+## failure case, loading a non-existing combo file
+print "adding -> Casper(bad,unknown file)"
+ctxt.load_id_file("Casper_IDKEY.pem")
+
Index: tests/python_tests/basic_id/run_test
===================================================================
--- tests/python_tests/basic_id/run_test	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,21 +1,0 @@
-#!/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 "bad," id.out |wc -l`
-if [ $good -eq 7 -a $bad -eq 2 ]; then
-    echo "   PASSED"
-else
-    echo "   ERROR:basic_id test result differs!!!"
-fi
-
Index: tests/python_tests/experiment_create_rt0/query.py
===================================================================
--- tests/python_tests/experiment_create_rt0/query.py	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/python_tests/experiment_create_rt0/query.py	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -10,4 +10,6 @@
 import ABAC
 
+from test_util import runTest
+
 ctxt = ABAC.Context()
 
@@ -18,6 +20,6 @@
     ctxt.load_directory(keystore)
 else:
-    print("keystore is not set...")
-    exit(1)
+    print("keystore is not set, using current directory...")
+    ctxt.load_directory(".")
 
 # retrieve principals' keyid value from local credential files
@@ -54,14 +56,6 @@
 # role=[keyid:Globotron].role:admin 
 # p=[keyid:Alice]
-
-print "\n===good=============== Globotron.admin <- Alice"
-(success, credentials) = ctxt.query("%s.admin" % globotron, alice)
-
-if success:
-    print "success!"
-else:
-    print "failure!"
-for credential in credentials:
-    print "credential %s <- %s" % (credential.head().string(), credential.tail().string())
+print "===good=============== Globotron.admin <- Alice"
+runTest("python_tests/experiment_create_rt0","test1",ctxt,"%s.admin" % globotron, alice, 1, "query in python")
 
 ##########################################################################
@@ -69,13 +63,6 @@
 # role=[keyid:Globotron].role:admin 
 # p=[keyid:Bob]
-
-print "\n===bad=============== Globotron.admin <- Bob"
-(success, credentials) = ctxt.query("%s.admin" % globotron, bob)
-if success:
-    print "success!"
-else:
-    print "failure!"
-for credential in credentials:
-    print "credential %s <- %s" % (credential.head().string(), credential.tail().string())
+print "===bad=============== Globotron.admin <- Bob"
+runTest("python_tests/experiment_create_rt0","test2",ctxt,"%s.admin" % globotron, bob, 0, "no linking relation")
 
 ##########################################################################
@@ -83,11 +70,5 @@
 # role=[keyid:Acme].role:experiment_create 
 # p=[keyid:Bob]
+print "===good=============== Acme.experiment_create <- Bob"
+runTest("python_tests/experiment_create_rt0","test3",ctxt,"%s.experiment_create" % acme, bob, 1, "query python with inference")
 
-print "\n===good=============== Acme.experiment_create <- Bob"
-(success, credentials) = ctxt.query("%s.experiment_create" % acme, bob)
-if success:
-    print "success!"
-else:
-    print "failure!"
-for credential in credentials:
-    print "credential %s <- %s" % (credential.head().string(), credential.tail().string())
Index: tests/python_tests/experiment_create_rt0/run_test
===================================================================
--- tests/python_tests/experiment_create_rt0/run_test	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,21 +1,0 @@
-#!/bin/sh 
-
-rm -rf *.pem *.xml *.log *.out
-
-echo '---setup principals'
-./setup.py 1>/dev/null 2>& 1
-
-echo '---setup attributes'
-./attr.py 1>experiment.log 2>& 1
-
-echo '---run queries'
-env keystore=`pwd` ./query.py 1>experiment.out 2>& 1
-
-good=`grep success experiment.out |wc -l`
-bad=`grep failure experiment.out |wc -l`
-if [ $good -eq 2 -a $bad -eq 1 ]; then
-    echo "   PASSED"
-else
-    echo "   ERROR:experiment_create_rt0 test result differs!!!"
-fi
-
Index: tests/scaling_tests/Makefile
===================================================================
--- tests/scaling_tests/Makefile	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/scaling_tests/Makefile	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,34 +1,429 @@
-
-
-DIRECTORY=daisychain
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# tests/scaling_tests/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+#
+# scaling_tests
+#
+
+pkgdatadir = $(datadir)/abac
+pkgincludedir = $(includedir)/abac
+pkglibdir = $(libdir)/abac
+pkglibexecdir = $(libexecdir)/abac
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+subdir = tests/scaling_tests
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_openssl.m4 \
+	$(top_srcdir)/m4/ax_check_xml2.m4 \
+	$(top_srcdir)/m4/ax_check_xmlsec1.m4 \
+	$(top_srcdir)/m4/ax_pkg_swig.m4 \
+	$(top_srcdir)/m4/ax_python_devel.m4 \
+	$(top_srcdir)/m4/ax_swig_enable_cxx.m4 \
+	$(top_srcdir)/m4/ax_swig_python.m4 $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/mei/Deter/abac0-master/missing --run aclocal-1.11
+AMTAR = ${SHELL} /home/mei/Deter/abac0-master/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/mei/Deter/abac0-master/missing --run automake-1.11
+AWK = gawk
+AX_SWIG_PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+AX_SWIG_PYTHON_OPT = -python
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DPACKAGE_NAME=\"ABAC\" -DPACKAGE_TARNAME=\"abac\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"ABAC\ 0.1.5\" -DPACKAGE_BUGREPORT=\"faber@ISI.EDU\" -DPACKAGE_URL=\"\" -DPACKAGE=\"abac\" -DVERSION=\"0.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PYTHON=\"2.7\" -DHAVE_INTTYPES_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_PATHS_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_PTRDIFF_T=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_ATEXIT=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1
+DEPDIR = .deps
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+FGREP = /bin/grep -F
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /home/mei/Deter/abac0-master/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_INCLUDES =  
+OPENSSL_LDFLAGS =  
+OPENSSL_LIBS = -lssl -lcrypto  
+OTOOL = 
+OTOOL64 = 
+PACKAGE = abac
+PACKAGE_BUGREPORT = faber@ISI.EDU
+PACKAGE_NAME = ABAC
+PACKAGE_STRING = ABAC 0.1.5
+PACKAGE_TARNAME = abac
+PACKAGE_URL = 
+PACKAGE_VERSION = 0.1.5
+PATH_SEPARATOR = :
+PERL = perl
+PKG_CONFIG = /usr/bin/pkg-config
+PYTHON = /usr/local/bin/python
+PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+PYTHON_EXEC_PREFIX = ${exec_prefix}
+PYTHON_EXTRA_LDFLAGS = -Xlinker -export-dynamic
+PYTHON_EXTRA_LIBS =  -lpthread -ldl  -lutil -lm
+PYTHON_LDFLAGS = -L/usr/local/lib/python2.7/config -lpython2.7
+PYTHON_PLATFORM = linux2
+PYTHON_PREFIX = ${prefix}
+PYTHON_SITE_PKG = /usr/local/lib/python2.7/site-packages
+PYTHON_VERSION = 2.7
+RANLIB = ranlib
+SED = /bin/sed
+SET_MAKE = 
+SHELL = /bin/bash
+SITE_PERL = /usr/local/lib/site_perl
+STRIP = strip
+SWIG = /usr/local/bin/swig -c++
+SWIG_LIB = /usr/local/share/swig/2.0.4
+VERSION = 0.1.5
+XML2_CONFIG = /usr/bin/xml2-config
+XML2_INCLUDES = -I/usr/include/libxml2
+XML2_LDFLAGS = -lxml2
+XML2_LIBS = -lxml2
+XMLSEC1_CONFIG = /usr/bin/xmlsec1-config
+XMLSEC1_INCLUDES = -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\"openssl\"
+XMLSEC1_LDFLAGS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+XMLSEC1_LIBS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+abs_builddir = /home/mei/Deter/abac0-master/tests/scaling_tests
+abs_srcdir = /home/mei/Deter/abac0-master/tests/scaling_tests
+abs_top_builddir = /home/mei/Deter/abac0-master
+abs_top_srcdir = /home/mei/Deter/abac0-master
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/mei/Deter/abac0-master/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+lt_ECHO = echo
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+pkgpyexecdir = ${pyexecdir}/abac
+pkgpythondir = ${pythondir}/abac
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+pyexecdir = ${exec_prefix}/lib/python2.7/site-packages
+pythondir = ${prefix}/lib/python2.7/site-packages
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias = 
+top_build_prefix = ../../
+top_builddir = ../..
+top_srcdir = ../..
+DIRECTORY = daisychain
 #haystack
-PLOT= daisychain/likes_python
+PLOT = daisychain/likes_python
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/scaling_tests/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign tests/scaling_tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+
 #haystack/fruit_python 
 
-.PHONY : runcheck clean plot
-runcheck: $(DIRECTORY)
-
+.PHONY : runcheck clean-local plot clean
+
+all:runcheck
+
+local-clean:
 clean:
 	@for i in $(DIRECTORY); do \
-	here=`pwd`; \
-	cd $$i; \
-	make clean; \
-	cd $$here; \
+	  here=`pwd`; \
+	  cd $$i; \
+	  make clean; \
+	  cd $$here; \
 	done; 
-	rm -rf allout.tmp
+	rm -rf error result
 	rm -rf jpegs
 
 runcheck: 
-	@echo 'running libabac SCALING testing...'
+	@echo 'running libabac SCALING testing...' | tee result
+	touch error
 	@for i in $(DIRECTORY); do \
-	here=`pwd`; \
-	printf "\n ==> RUN on %s\n" "$$i" >> allout.tmp; \
-	cd $$i; \
-	make -s runcheck | grep -v ^/ >> ../allout.tmp 2>/dev/null; \
-	cd $$here; \
+	  here=`pwd`; \
+	  printf "\n ==> RUN on %s\n" "$$i" >> result; \
+	  cd $$i; \
+	  make -s runcheck | tee -a $$here/result |grep BAD >> $$here/error; \
+	  cd $$here; \
 	done; 
-	@if test -f allout.tmp && test `diff -q allout.save allout.tmp |wc -l ` -eq 0 ; \
-	then echo "   PASSED"; \
-	else echo "   ERROR:got changes!!!"; \
+	@if test -f error ; \
+	  then \
+	    (if test `cat error | wc -l ` -eq 0 ; \
+	      then echo "   PASSED"; \
+	      else (echo "   ERROR!!!"; cat error;) \
+	    fi) \
+	  else echo "   PASSED"; \
 	fi
 
@@ -37,8 +432,11 @@
 	mkdir jpegs
 	@for i in $(PLOT); do \
-	here=`pwd`; \
-	cd $$i; \
-	make -s plot; \
-	cd $$here; \
+	  here=`pwd`; \
+	  cd $$i; \
+	  make -s plot; \
+	  cd $$here; \
 	done;
 
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: tests/scaling_tests/Makefile.am
===================================================================
--- tests/scaling_tests/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/scaling_tests/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,53 @@
+#
+# scaling_tests
+#
+
+DIRECTORY=daisychain
+#haystack
+PLOT= daisychain/likes_python
+#haystack/fruit_python 
+
+.PHONY : runcheck clean-local plot clean
+
+all:runcheck
+
+local-clean:
+clean:
+	@for i in $(DIRECTORY); do \
+	  here=`pwd`; \
+	  cd $$i; \
+	  make clean; \
+	  cd $$here; \
+	done; 
+	rm -rf error result
+	rm -rf jpegs
+
+runcheck: 
+	@echo 'running libabac SCALING testing...' | tee result
+	touch error
+	@for i in $(DIRECTORY); do \
+	  here=`pwd`; \
+	  printf "\n ==> RUN on %s\n" "$$i" >> result; \
+	  cd $$i; \
+	  make -s runcheck | tee -a $$here/result |grep BAD >> $$here/error; \
+	  cd $$here; \
+	done; 
+	@if test -f error ; \
+	  then \
+	    (if test `cat error | wc -l ` -eq 0 ; \
+	      then echo "   PASSED"; \
+	      else (echo "   ERROR!!!"; cat error;) \
+	    fi) \
+	  else echo "   PASSED"; \
+	fi
+
+plot:
+	make clean
+	mkdir jpegs
+	@for i in $(PLOT); do \
+	  here=`pwd`; \
+	  cd $$i; \
+	  make -s plot; \
+	  cd $$here; \
+	done;
+
Index: tests/scaling_tests/allout.save
===================================================================
--- tests/scaling_tests/allout.save	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ 	(revision )
@@ -1,8 +1,0 @@
-
- ==> RUN on daisychain
----running daisychain likes_python 0 scaling
-   PASSED
----running daisychain likes_python 10 scaling
-   PASSED
----running daisychain likes_python 20 scaling
-   PASSED
Index: tests/scaling_tests/daisychain/Makefile
===================================================================
--- tests/scaling_tests/daisychain/Makefile	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/scaling_tests/daisychain/Makefile	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,12 +1,403 @@
-
-
-DIRECTORY=likes_python
-
-.PHONY : runcheck clean
-runcheck: $(DIRECTORY)
-
-clean:
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# tests/scaling_tests/daisychain/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+pkgdatadir = $(datadir)/abac
+pkgincludedir = $(includedir)/abac
+pkglibdir = $(libdir)/abac
+pkglibexecdir = $(libexecdir)/abac
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+subdir = tests/scaling_tests/daisychain
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_openssl.m4 \
+	$(top_srcdir)/m4/ax_check_xml2.m4 \
+	$(top_srcdir)/m4/ax_check_xmlsec1.m4 \
+	$(top_srcdir)/m4/ax_pkg_swig.m4 \
+	$(top_srcdir)/m4/ax_python_devel.m4 \
+	$(top_srcdir)/m4/ax_swig_enable_cxx.m4 \
+	$(top_srcdir)/m4/ax_swig_python.m4 $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/mei/Deter/abac0-master/missing --run aclocal-1.11
+AMTAR = ${SHELL} /home/mei/Deter/abac0-master/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/mei/Deter/abac0-master/missing --run automake-1.11
+AWK = gawk
+AX_SWIG_PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+AX_SWIG_PYTHON_OPT = -python
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DPACKAGE_NAME=\"ABAC\" -DPACKAGE_TARNAME=\"abac\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"ABAC\ 0.1.5\" -DPACKAGE_BUGREPORT=\"faber@ISI.EDU\" -DPACKAGE_URL=\"\" -DPACKAGE=\"abac\" -DVERSION=\"0.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PYTHON=\"2.7\" -DHAVE_INTTYPES_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_PATHS_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_PTRDIFF_T=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_ATEXIT=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1
+DEPDIR = .deps
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+FGREP = /bin/grep -F
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /home/mei/Deter/abac0-master/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_INCLUDES =  
+OPENSSL_LDFLAGS =  
+OPENSSL_LIBS = -lssl -lcrypto  
+OTOOL = 
+OTOOL64 = 
+PACKAGE = abac
+PACKAGE_BUGREPORT = faber@ISI.EDU
+PACKAGE_NAME = ABAC
+PACKAGE_STRING = ABAC 0.1.5
+PACKAGE_TARNAME = abac
+PACKAGE_URL = 
+PACKAGE_VERSION = 0.1.5
+PATH_SEPARATOR = :
+PERL = perl
+PKG_CONFIG = /usr/bin/pkg-config
+PYTHON = /usr/local/bin/python
+PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+PYTHON_EXEC_PREFIX = ${exec_prefix}
+PYTHON_EXTRA_LDFLAGS = -Xlinker -export-dynamic
+PYTHON_EXTRA_LIBS =  -lpthread -ldl  -lutil -lm
+PYTHON_LDFLAGS = -L/usr/local/lib/python2.7/config -lpython2.7
+PYTHON_PLATFORM = linux2
+PYTHON_PREFIX = ${prefix}
+PYTHON_SITE_PKG = /usr/local/lib/python2.7/site-packages
+PYTHON_VERSION = 2.7
+RANLIB = ranlib
+SED = /bin/sed
+SET_MAKE = 
+SHELL = /bin/bash
+SITE_PERL = /usr/local/lib/site_perl
+STRIP = strip
+SWIG = /usr/local/bin/swig -c++
+SWIG_LIB = /usr/local/share/swig/2.0.4
+VERSION = 0.1.5
+XML2_CONFIG = /usr/bin/xml2-config
+XML2_INCLUDES = -I/usr/include/libxml2
+XML2_LDFLAGS = -lxml2
+XML2_LIBS = -lxml2
+XMLSEC1_CONFIG = /usr/bin/xmlsec1-config
+XMLSEC1_INCLUDES = -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\"openssl\"
+XMLSEC1_LDFLAGS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+XMLSEC1_LIBS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+abs_builddir = /home/mei/Deter/abac0-master/tests/scaling_tests/daisychain
+abs_srcdir = /home/mei/Deter/abac0-master/tests/scaling_tests/daisychain
+abs_top_builddir = /home/mei/Deter/abac0-master
+abs_top_srcdir = /home/mei/Deter/abac0-master
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/mei/Deter/abac0-master/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+lt_ECHO = echo
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+pkgpyexecdir = ${pyexecdir}/abac
+pkgpythondir = ${pythondir}/abac
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+pyexecdir = ${exec_prefix}/lib/python2.7/site-packages
+pythondir = ${prefix}/lib/python2.7/site-packages
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias = 
+top_build_prefix = ../../../
+top_builddir = ../../..
+top_srcdir = ../../..
+DIRECTORY = likes_python
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/scaling_tests/daisychain/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign tests/scaling_tests/daisychain/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	clean-local distclean distclean-generic distclean-libtool \
+	distdir dvi dvi-am html html-am info info-am install \
+	install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	uninstall uninstall-am
+
+
+#
+# daisychain
+#
+.PHONY : runcheck clean-local
+
+all: runcheck
+
+clean-local:
 	@for i in $(DIRECTORY); do \
-	export here=`pwd`; \
+	here=`pwd`; \
 	cd $$i; \
 	make clean; \
@@ -16,7 +407,11 @@
 runcheck: 
 	@for i in $(DIRECTORY); do \
-	export here=`pwd`; \
+	here=`pwd`; \
 	cd $$i; \
 	make -s test; \
 	cd $$here;\
 	done;
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: tests/scaling_tests/daisychain/Makefile.am
===================================================================
--- tests/scaling_tests/daisychain/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/scaling_tests/daisychain/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,24 @@
+#
+# daisychain
+#
+.PHONY : runcheck clean-local
+
+DIRECTORY=likes_python
+
+all: runcheck
+
+clean-local:
+	@for i in $(DIRECTORY); do \
+	here=`pwd`; \
+	cd $$i; \
+	make clean; \
+	cd $$here;\
+	done;
+
+runcheck: 
+	@for i in $(DIRECTORY); do \
+	here=`pwd`; \
+	cd $$i; \
+	make -s test; \
+	cd $$here;\
+	done;
Index: tests/scaling_tests/daisychain/likes_python/Makefile
===================================================================
--- tests/scaling_tests/daisychain/likes_python/Makefile	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/scaling_tests/daisychain/likes_python/Makefile	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,10 +1,409 @@
-
-
-TEST=likes_0 likes_10 likes_20
-TIMING=likes_30 likes_40 likes_50 likes_100 likes_150 likes_200
-#TIMING=likes_200
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# tests/scaling_tests/daisychain/likes_python/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+pkgdatadir = $(datadir)/abac
+pkgincludedir = $(includedir)/abac
+pkglibdir = $(libdir)/abac
+pkglibexecdir = $(libexecdir)/abac
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+subdir = tests/scaling_tests/daisychain/likes_python
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_openssl.m4 \
+	$(top_srcdir)/m4/ax_check_xml2.m4 \
+	$(top_srcdir)/m4/ax_check_xmlsec1.m4 \
+	$(top_srcdir)/m4/ax_pkg_swig.m4 \
+	$(top_srcdir)/m4/ax_python_devel.m4 \
+	$(top_srcdir)/m4/ax_swig_enable_cxx.m4 \
+	$(top_srcdir)/m4/ax_swig_python.m4 $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/mei/Deter/abac0-master/missing --run aclocal-1.11
+AMTAR = ${SHELL} /home/mei/Deter/abac0-master/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/mei/Deter/abac0-master/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/mei/Deter/abac0-master/missing --run automake-1.11
+AWK = gawk
+AX_SWIG_PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+AX_SWIG_PYTHON_OPT = -python
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DPACKAGE_NAME=\"ABAC\" -DPACKAGE_TARNAME=\"abac\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"ABAC\ 0.1.5\" -DPACKAGE_BUGREPORT=\"faber@ISI.EDU\" -DPACKAGE_URL=\"\" -DPACKAGE=\"abac\" -DVERSION=\"0.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PYTHON=\"2.7\" -DHAVE_INTTYPES_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_PATHS_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_PTRDIFF_T=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_ATEXIT=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1
+DEPDIR = .deps
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+FGREP = /bin/grep -F
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /home/mei/Deter/abac0-master/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_INCLUDES =  
+OPENSSL_LDFLAGS =  
+OPENSSL_LIBS = -lssl -lcrypto  
+OTOOL = 
+OTOOL64 = 
+PACKAGE = abac
+PACKAGE_BUGREPORT = faber@ISI.EDU
+PACKAGE_NAME = ABAC
+PACKAGE_STRING = ABAC 0.1.5
+PACKAGE_TARNAME = abac
+PACKAGE_URL = 
+PACKAGE_VERSION = 0.1.5
+PATH_SEPARATOR = :
+PERL = perl
+PKG_CONFIG = /usr/bin/pkg-config
+PYTHON = /usr/local/bin/python
+PYTHON_CPPFLAGS = -I/usr/local/include/python2.7
+PYTHON_EXEC_PREFIX = ${exec_prefix}
+PYTHON_EXTRA_LDFLAGS = -Xlinker -export-dynamic
+PYTHON_EXTRA_LIBS =  -lpthread -ldl  -lutil -lm
+PYTHON_LDFLAGS = -L/usr/local/lib/python2.7/config -lpython2.7
+PYTHON_PLATFORM = linux2
+PYTHON_PREFIX = ${prefix}
+PYTHON_SITE_PKG = /usr/local/lib/python2.7/site-packages
+PYTHON_VERSION = 2.7
+RANLIB = ranlib
+SED = /bin/sed
+SET_MAKE = 
+SHELL = /bin/bash
+SITE_PERL = /usr/local/lib/site_perl
+STRIP = strip
+SWIG = /usr/local/bin/swig -c++
+SWIG_LIB = /usr/local/share/swig/2.0.4
+VERSION = 0.1.5
+XML2_CONFIG = /usr/bin/xml2-config
+XML2_INCLUDES = -I/usr/include/libxml2
+XML2_LDFLAGS = -lxml2
+XML2_LIBS = -lxml2
+XMLSEC1_CONFIG = /usr/bin/xmlsec1-config
+XMLSEC1_INCLUDES = -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\"openssl\"
+XMLSEC1_LDFLAGS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+XMLSEC1_LIBS = -L/usr/lib -lxmlsec1-openssl -lxmlsec1 -lxslt -lxml2 -lssl -lcrypto
+abs_builddir = /home/mei/Deter/abac0-master/tests/scaling_tests/daisychain/likes_python
+abs_srcdir = /home/mei/Deter/abac0-master/tests/scaling_tests/daisychain/likes_python
+abs_top_builddir = /home/mei/Deter/abac0-master
+abs_top_srcdir = /home/mei/Deter/abac0-master
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/mei/Deter/abac0-master/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+lt_ECHO = echo
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+pkgpyexecdir = ${pyexecdir}/abac
+pkgpythondir = ${pythondir}/abac
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+pyexecdir = ${exec_prefix}/lib/python2.7/site-packages
+pythondir = ${prefix}/lib/python2.7/site-packages
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias = 
+top_build_prefix = ../../../../
+top_builddir = ../../../..
+top_srcdir = ../../../..
+INCLUDES = -I$(abs_top_srcdir)/libabac
+LDADD = $(abs_top_builddir)/libabac/libabac.la
+CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
+PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
+PYTHON_ENV = PYTHONPATH=$(abs_top_builddir)/swig/python:$(abs_top_builddir)/swig/python/.libs:$(abs_top_builddir)/tests
+MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(PYTHON_ENV)
+TEST = likes_0 likes_10 likes_20
+TIMING = likes_30 likes_40 likes_50 likes_100 likes_150 likes_200
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/scaling_tests/daisychain/likes_python/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign tests/scaling_tests/daisychain/likes_python/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	clean-local distclean distclean-generic distclean-libtool \
+	distdir dvi dvi-am html html-am info info-am install \
+	install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	uninstall uninstall-am
+
+
+#
+# daisychain/likes_python
+#
+.PHONY : test clean-local
 
 .PHONY : test timing plot 
 
+all: test
+
 test: $(TEST)
 
@@ -12,15 +411,15 @@
 
 likes_0 :
-	@./run_one 0
+	$(MY_ENV) ./run_one 0
 likes_10 :
-	@./run_one 10
+	@$(MY_ENV) ./run_one 10
 likes_20 :
-	@./run_one 20
-
-clean: 
+	@$(MY_ENV) ./run_one 20
+
+clean-local: 
 	@rm -rf likes_* run_plot plot timing
 
 $(TIMING):
-	@./run_one $(subst likes_,,$@)
+	@$(MY_ENV) ./run_one $(subst likes_,,$@)
 
 plot:
@@ -30,2 +429,6 @@
 	@make -s timing
 	@./run_plot likes
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: tests/scaling_tests/daisychain/likes_python/Makefile.am
===================================================================
--- tests/scaling_tests/daisychain/likes_python/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/scaling_tests/daisychain/likes_python/Makefile.am	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,42 @@
+#
+# daisychain/likes_python
+#
+.PHONY : test clean-local
+
+INCLUDES = -I$(abs_top_srcdir)/libabac
+LDADD = $(abs_top_builddir)/libabac/libabac.la
+CREDDY_ENV = CREDDY_LOCATION=$(abs_top_builddir)/creddy
+PROVER_ENV = PROVER_LOCATION=$(abs_top_builddir)/libabac
+PYTHON_ENV = PYTHONPATH=$(abs_top_builddir)/swig/python:$(abs_top_builddir)/swig/python/.libs:$(abs_top_builddir)/tests
+MY_ENV = env $(CREDDY_ENV) $(PROVER_ENV) $(PYTHON_ENV)
+
+TEST=likes_0 likes_10 likes_20
+TIMING=likes_30 likes_40 likes_50 likes_100 likes_150 likes_200
+
+.PHONY : test timing plot 
+
+all: test
+
+test: $(TEST)
+
+timing: $(TIMING)
+
+likes_0 :
+	$(MY_ENV) ./run_one 0
+likes_10 :
+	@$(MY_ENV) ./run_one 10
+likes_20 :
+	@$(MY_ENV) ./run_one 20
+
+clean-local: 
+	@rm -rf likes_* run_plot plot timing
+
+$(TIMING):
+	@$(MY_ENV) ./run_one $(subst likes_,,$@)
+
+plot:
+	@make clean
+	cp ../../plotting/run_plot .
+	@make -s test
+	@make -s timing
+	@./run_plot likes
Index: tests/scaling_tests/daisychain/likes_python/base/PROVE.sh
===================================================================
--- tests/scaling_tests/daisychain/likes_python/base/PROVE.sh	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/scaling_tests/daisychain/likes_python/base/PROVE.sh	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -1,7 +1,9 @@
 #!/bin/sh
 
+. $(TESTDIR)/test_util.sh
+
 keystore=`pwd`
-pID=`creddy --keyid --cert ${keystore}/John#VAL#_ID.pem`
-cID=`creddy --keyid --cert ${keystore}/John0_ID.pem`
+pID=`$eloc/creddy --keyid --cert ${keystore}/John#VAL#_ID.pem`
+cID=`$eloc/creddy --keyid --cert ${keystore}/John0_ID.pem`
 
 #JohnX likes John0?
Index: tests/scaling_tests/daisychain/likes_python/base/QUERY.py
===================================================================
--- tests/scaling_tests/daisychain/likes_python/base/QUERY.py	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/scaling_tests/daisychain/likes_python/base/QUERY.py	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -14,4 +14,6 @@
 import datetime
 import math
+
+from test_util import runTest
 
 debug=0
@@ -82,11 +84,15 @@
     bID=ABAC.ID("John0_ID.pem")
 
-    print "\n===good============ johnN.likes <- john0 "
+    print "\n===good============ johnX.likes <- john0 "
     starttime = datetime.datetime.now()
-    (success, credentials) = ctxt.query("%s.likes" % aID.keyid(), bID.keyid())
-    if success:
-        print "success"
-    else:
-        print "failure"
+
+#    (success, credentials) = ctxt.query("%s.likes" % aID.keyid(), bID.keyid())
+#    if success:
+#        print "success"
+#    else:
+#        print "failure"
+
+    runTest("scaling_tests/daisychain/#VAL#","test1",ctxt,"%s.likes" % aID.keyid(), bID.keyid(), 1, "cascaing johnX.likes<-john0,expect success")
+
     endtime = datetime.datetime.now()
     if(debug):
@@ -109,9 +115,10 @@
     print "\n===bad============ john0.likes <- johnX "
     starttime = datetime.datetime.now()
-    (success, credentials) = ctxt.query("%s.likes" % aID.keyid(), bID.keyid())
-    if success:
-        print "success"
-    else:
-        print "failure"
+#    (success, credentials) = ctxt.query("%s.likes" % aID.keyid(), bID.keyid())
+#    if success:
+#        print "success"
+#    else:
+#        print "failure"
+    runTest("scaling_tests/daisychain/#VAL#","test2",ctxt,"%s.likes" % aID.keyid(), bID.keyid(), 1, "cascaing john0.likes<-johnX,expect failure")
     endtime = datetime.datetime.now()
     for cred in credentials:
Index: tests/scaling_tests/daisychain/likes_python/run_one
===================================================================
--- tests/scaling_tests/daisychain/likes_python/run_one	(revision f520b1ed74a0c375b8bf912e662b7be6bed67640)
+++ tests/scaling_tests/daisychain/likes_python/run_one	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -24,12 +24,12 @@
 
 if [ $noise -eq 0 ] ; then
-    result=`egrep -c "success" likes.tmp 2>/dev/null`
+    result=`egrep -c "GOOD" likes.tmp 2>/dev/null`
     if [ $result -eq 202 ]; then
-       echo "   PASSED"
+       echo "GOOD:scaling_tests/daisychain/likes_python:$noise:query result matched"
 ## zap out all those fake BADs
        sed -ibak 's/BAD_/fakebad_/g' likes.time
        exit 0
     else  
-       echo "   ERROR"
+       echo "BAD:scaling_tests/daisychain/likes_python:$noise:number of successful query is not right"
        exit 1
     fi
@@ -39,13 +39,13 @@
 f=`grep -c "failure" likes.tmp 2>/dev/null `
 if [ $s -ne 101 ] ; then
-    echo "   ERROR"
+    echo "BAD:scaling_tests/daisychain/likes_python:$noise:number of success is not right"
     exit 1
 fi
 
 if [ $f  -ne 101 ] ; then
-    echo "   ERROR"
+    echo "BAD:scaling_tests/daisychain/likes_python:$noise:number of expeceted failure is not right"
     exit 1
 fi
 
-echo "   PASSED"
+echo "GOOD:scaling_tests/daisychain/likes_python:$noise:expected result"
 
Index: tests/test_util.pl
===================================================================
--- tests/test_util.pl	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/test_util.pl	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,7 @@
+#!/usr/bin/perl
+
+use strict;
+use ABAC;
+
+my $ctx = ABAC::Context->new;
+
Index: tests/test_util.py
===================================================================
--- tests/test_util.py	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/test_util.py	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+
+debug=0
+
+import os
+import ABAC
+
+# EXPECT 1, success, 0, failure
+def runTest(FNAME,LABEL,CTXT,ROLE,PRIN,EXPECT,MSG):
+    (success, credentials) = CTXT.query(ROLE,PRIN)
+    if EXPECT:
+#expect success, got success
+        if success:  
+            print "GOOD:%s:%s:%s" %(FNAME,LABEL,MSG)
+#expect success, got failure
+        else:
+            print "BAD:%s:%s:did not expect failure,%s" %(FNAME,LABEL,MSG)
+    else:
+#expect failure, got success
+        if success:
+            print "BAD:%s:%s:expected failure but got success,%s" %(FNAME,LABEL,MSG)
+#expect failure, got failure
+        else:
+            print "GOOD:%s:%s:expected failure,%s" %(FNAME,LABEL,MSG)
+
+    if debug:
+        for credential in credentials:
+            print "credential %s <- %s" % (credential.head().string(), credential.tail().string())
Index: tests/test_util.sh
===================================================================
--- tests/test_util.sh	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
+++ tests/test_util.sh	(revision 6cd69a0d7919d36d4cc937ae13ce7f09034097d5)
@@ -0,0 +1,114 @@
+#!/bin/sh
+
+debug=0
+
+# look for creddy,
+if [ -n "${CREDDY_LOCATION}" ]; then
+    eloc=${CREDDY_LOCATION}
+    if ! [ -e $eloc/creddy ] ; then
+        echo "ERROR: has CREDDY_LOCATION but creddy is not there!!!"
+        exit 1
+    fi
+else
+    eloc=`which creddy | sed 's/\/creddy//'`
+    if [ -z "$eloc" ]; then
+        echo "ERROR: creddy is not in the search path nor CREDDY_LOCATION defined!!!"
+        exit 1
+    fi
+fi
+
+# look for abac_prover,
+if [ -n "${PROVER_LOCATION}" ]; then
+    ploc=${PROVER_LOCATION}
+    if ! [ -e $ploc/abac_prover ] ; then
+        echo "ERROR: has PROVER_LOCATION but abac_provery is not there!!!"
+        exit 1
+    fi
+else
+    ploc=`which abac_prover | sed 's/\/abac_prover//'`
+    if [ -z "$ploc" ]; then
+        echo "ERROR: abac_prover is not in the search path nor PROVER_LOCATION defined!!!"
+        exit 1
+    fi
+fi
+
+
+# runTest fname test1 testbody expect msg
+# if expect success, expect=0
+# if expect failure, expect=1
+runTest() {
+    FNAME=$1
+    LABEL=$2
+    TESTBODY=$3
+    EXPECT=$4
+    MSG=$5
+    rc=`${TESTBODY} 2>&1`
+    if [ $? -eq $EXPECT ]; then
+        echo "GOOD:${FNAME}:${LABEL}:${MSG}"
+    else
+        if [ $EXPECT ]; then
+           echo "BAD:${FNAME}:${LABEL}:expected failure but got success,${MSG}"
+        else
+           echo "BAD:${FNAME}:${LABEL}:${MSG}"
+        fi
+    fi
+    if [ $debug -eq 1 ]; then
+        echo $rc
+    fi
+}
+
+# runXTest fname test1 testbody expect matchResult msg
+# if expect success, expect=0
+# if expect failure, expect=1
+runXTest() {
+    FNAME=$1
+    LABEL=$2
+    TESTBODY=$3
+    EXPECT=$4
+    MATCH=$5
+    MSG=$6
+    rc=`${TESTBODY} 2>&1`
+    if [ $? -eq $EXPECT ]; then
+        match=`echo "${rc}" | grep "${MATCH}" | wc -l`
+        if [ $match -eq 1 ]; then
+            echo "GOOD:${FNAME}:${LABEL}:${MSG}"
+        else
+            echo "BADX:${FNAME}:${LABEL}:${MSG}, but result is not as expected"
+        fi
+    else
+        echo "BAD:${FNAME}:${LABEL}:${MSG}"
+    fi
+    if [ $debug -eq 1 ]; then
+        echo $rc
+    fi
+}
+
+# runCTest fname test1 testbody expect msg pattern count
+# if expect success, expect=0
+# if expect failure, expect=1
+runCTest() {
+    FNAME=$1
+    LABEL=$2
+    TESTBODY=$3
+    EXPECT=$4
+    MSG=$5
+    PATTERN=$6
+    COUNT=$7
+    rc=`${TESTBODY} 1>atmp 2>/dev/null`
+    if [ $? -eq $EXPECT ]; then
+        cnt=`grep "$PATTERN" atmp | wc -l`
+        if [ $cnt -eq $COUNT ]; then
+            echo "GOOD:${FNAME}:${LABEL}:${MSG}"
+        else
+            echo "BAD:${FNAME}:${LABEL}:${MSG},did not have expected output"
+        fi
+    else
+        if [ $EXPECT ]; then
+           echo "BAD:${FNAME}:${LABEL}:expected failure but got success,${MSG}"
+        else
+           echo "BAD:${FNAME}:${LABEL}:${MSG}"
+        fi
+    fi
+    rm -rf atmp
+    return 0
+}
