CLASSPATH=/usr/share/java/clojure.jar:/usr/share/java/bultitude.jar:/usr/share/java/httpasyncclient.jar:/usr/share/java/schema.jar:/usr/share/java/commons-io.jar:/usr/share/java/metrics-core.jar:/usr/share/java/ssl-utils.jar:/usr/share/java/puppetlabs-i18n.jar:/usr/share/java/jul-to-slf4j.jar:/usr/share/java/cheshire.jar:/usr/share/java/kitchensink.jar:/usr/share/java/kitchensink-test.jar:/usr/share/java/trapperkeeper.jar:/usr/share/java/trapperkeeper-test.jar:/usr/share/java/trapperkeeper-webserver-jetty9.jar:/usr/share/java/trapperkeeper-webserver-jetty9-test.jar:/usr/share/java/ring-middleware.jar:/usr/share/java/bcpkix.jar:/usr/share/java/httpcore.jar:/usr/share/java/httpclient.jar:/usr/share/java/httpcore-nio.jar:/usr/share/java/puppetlabs-http-client.jar:test

cp -a dev-resources test "$AUTOPKGTEST_TMP"
cd "$AUTOPKGTEST_TMP" || exit 1

# needed by puppetlabs.trapperkeeper.testutils.bootstrap
mkdir target

# generate test certificates
./dev-resources/gen-pki.sh 2>/dev/null

if [ $(dpkg-architecture -qDEB_HOST_ARCH_BITS) -lt 64 ] ; then
    HEAPSIZE=1590M
else
    HEAPSIZE=8192M
fi

# fix for "java.lang.OutOfMemoryError: Java heap space" error
# during test: java-existing-streaming-with-large-payload-without-decompression
export _JAVA_OPTIONS="-Xms128M -Xmx${HEAPSIZE}"
