testing JShell (langtools/test/jdk/jshell)?
Robert Field
robert.field at oracle.com
Sat Apr 9 03:13:15 UTC 2016
Hi Grigory,
You will need jtreg (Download jtreg/jtreg), get 4.2
http://openjdk.java.net/jtreg/
Attached is my personal script for running jshell tests. Which would
need customization to your environment, at a minimum, JAVA_HOME would
need to be updated.
-Robert
On 04/08/16 13:33, Grigory Ptashko wrote:
> Hello.
>
> I'd like to know what is the proper way to test JShell. I mean to run all the
> tests that are in the langtools/test/jdk/jshell?
> I'm totally new to jdk development.
> This is how my usual process set up:
>
> 1. I edit the sources with Intellij IDEA. I launched "ant idea" in the
> langtools/make folder. And got the idea project which I se now.
>
> 2. Then I build the jdk with "make CONF=... images". I do it every time after
> editing sources. It turns out that I use Idea only for browsing and editing
> sources.
>
> 3. Then in the images folder I get the full JDK image which I deploy to ios and
> test it with my own app.
>
> So, where in my process (and how) must the tests be included?
>
> Btw, if it is possible I'd like to run only langtools/test/jdk/jshell tests. And
> not for the whole jdk.
>
> Thank you.
>
> --
> Best regards,
> Grigory Ptashko
>
> +7 (916) 1489766
> grigory.ptashko at gmail.com
> facebook.com/GrigoryPtashko
>
-------------- next part --------------
#! /bin/bash -x
export CMD_JAVA_ROOT=$1
export BUILD_DIR="${CMD_JAVA_ROOT}/build"
export TEST_DIR="${BUILD_DIR}/test"
export LOG_DIR="${TEST_DIR}/log"
export JAVA_HOME="${BUILD_DIR}/linux-x86_64-normal-server-release/images/jdk/"
export PATH="${JAVA_HOME}/bin:${STD_PATH}"
export JTREG=${JT_HOME}/bin/jtreg
rm -rf ${TEST_DIR}_old2
mv ${TEST_DIR}_old1 ${TEST_DIR}_old2
mv ${TEST_DIR} ${TEST_DIR}_old1
mkdir -p ${LOG_DIR}
which java | tee ${LOG_DIR}/whichJava.txt
cd ${CMD_JAVA_ROOT}/langtools/test
${JTREG} -jdk:${JAVA_HOME} -r:${TEST_DIR}/JTlang/JTreport -w:${TEST_DIR}/JTlang/JTwork -verbose:all -enablesystemassertions -samevm jdk/jshell/ | tee ${LOG_DIR}/kulla.txt
More information about the kulla-dev
mailing list