# first run test with jtreg with -r:$DST/report -w:$DST/work
# i.e. jtreg -a -ea -esa -ignore:quiet -v:fail,error,time
#-concurrency:1 -jdk:$JAVA_HOME -w:$DST/work -r:$DST/report @MYTESTFILE
# where MYTESTFILE contains 1 line:
# java/util/stream/test/org/openjdk/tests/java/util/stream/ReduceByOpTest.java
# this will set up your $DST/work directory and create your classes, .jta file etc.
# modify script for your own environment
# fix DST JAVA_HOME and JTREGLIB and TESTSRC
setenv DST /java/east/sqe/tmp/kmkinnea/8026299/java.util.subset
setenv TESTDIR java/util/stream/test
#other tests may not need this?
setenv EXTRATESTDIR java/util/stream/bootlib
setenv TESTNAME org.openjdk.tests.java.util.stream.ReduceByOpTest
setenv TESTNAME2 org/openjdk/tests/java/util/stream/ReduceByOpTest
setenv JAVA_HOME /net/crocker-hv/export/kmkinnea/build/8026213/8026213.images/j2sdk-image
setenv JTREGLIB /home/kmkinnea/oracle/tools/jtreg/jtreg/lib
setenv TESTSRC /export/kmkinnea/lambda7updatekk/jdk/test

# first option appears to be ignored
setenv VMOPTIONS "-XX:+ShowMessageBoxOnError -XX:AbortVMOnException=java.lang.IncompatibleClassChangeError -Djava.lang.invoke.MethodHandle.DUMP_CLASS_FILES=true"
setenv CLASSPATH ${DST}/work/classes/java/util/stream/test

${JAVA_HOME}/bin/java $VMOPTIONS -Xbootclasspath/a:${JTREGLIB}/javatest.jar:${JTREGLIB}/jtreg.jar:${DST}/work/classes/${TESTDIR}:${DST}/work/classes/${EXTRATESTDIR}:${JTREGLIB}/testng.jar -Dcompile.jdk=${JAVA_HOME} -Dtest.src.path=${TESTSRC}/{TESTDIR}:${TESTSRC}/${EXTRATESTDIR} -Dtest.src=${TESTDIR}/${TESTSRC} -Dtest.class.path=${DST}/work/classes/${TESTDIR} -Dtest.classes=${DST}/work/classes/${TESTDIR} -Dtest.jdk=${JAVA_HOME} -Dtest.java.opts= -Dtest.compiler.opts= com.sun.javatest.regtest.MainWrapper ${DST}/work/classes/${TESTDIR}/${TESTNAME}.jta ${TESTDIR}/${TESTNAME2} ${TESTNAME}
