#!/bin/bash
# -*- ksh -*-

# $Id: testAll,v 1.1 2011/02/04 11:11:17 rkurowsk Exp $
# 
# amchavan, 12-Sep-2007

# set -x 

rm -f test.out test.err

export JAVA_OPTIONS="-DACS.logstdout=5 -DACS.data=$(pwd)"
echo "JAVA_OPTIONS=$JAVA_OPTIONS" >> test.out

acsStartJava -endorsed -DACS.logstdout=5 junit.textui.TestRunner alma.obops.dam.AllTests \
		1>> test.out 2>> test.err

unset JAVA_OPTIONS
export JAVA_OPTIONS

acsStartJava -endorsed  -DACS.logstdout=2  -Darchive.configFile=./config/archiveConfig.properties.sampleTmcdb junit.textui.TestRunner alma.obops.dam.tmcdb.service.SampleTmcdbAllTests \
		1>> test.out 2>> test.out

ok=`grep "^OK" test.out | wc -l`

if [ $ok != 2 ] ; then
  echo "FAILED."
else
  echo "PASSED."
fi


