#!/bin/bash
# run Jena tests; try and guess path separator.

S=":"
if [ "$OSTYPE" == "cygwin" ]; then S=";"; fi

LIBS="$(cat<<EOF
arq.jar
arq-extra.jar
slf4j-api-1.5.6.jar
slf4j-log4j12-1.5.6.jar
icu4j_3_4.jar
jena.jar
jenatest.jar
json.jar
iri.jar
junit-4.5.jar
log4j-1.2.12.jar
lucene-core-2.3.1.jar
xercesImpl.jar
stax-api-1.0.jar
wstx-asl-3.0.0.jar
EOF
)"

CP=""
for jar in $LIBS
do
  jar="lib/${jar}"
  [ -e "$jar" ] || echo "No such jar: $jar" 1>&2

  if [ "$CP" == "" ]
  then
      CP="${jar}"
  else
      CP="$CP${S}${jar}"
      fi
  done

echo $CP

#SOCKS=-DsocksProxyHost="<your socks server>"

java -version

java -classpath "$CP" $SOCKS junit.textui.TestRunner ${1:-com.hp.hpl.jena.test.TestPackage}
