[jboss-dev-forums] [Design of JBoss internal QA (Test Suite)] - Re: AS testsuite using wrong jvm to exectute tests?

akostadinov do-not-reply at jboss.com
Thu Feb 12 10:09:58 EST 2009


I see what is the case now. build.sh and ant construct java executable location based on JAVA_HOME environment variable where junit relies on PATH being set correctly.

That should never be a problem for hudson, because it always sets both - JAVA_HOME and PATH. As well our QA scripts do the same when changing java version.

It makes some sense to have junit.jvm property default to JAVA_HOME/... but see the logic in ant.sh to guess the java executable location. As well there are often cases where JAVA_HOME is not set (AFAIK when user is using the default jvm installed with the OS and probably on systems like azul).
It should be possible to change it to:
1. if JAVA_HOME is not set, then set to "java"
2. if JAVA_HOME is set, then to setup like ant.sh does

But actually I think it is better to check if the first java executable in PATH is within JAVA_HOME, and if not, then fail the build. I'm sure everybody happened to mismatch these a couple of times, so saved hassle could be considerable.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4209569#4209569

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4209569



More information about the jboss-dev-forums mailing list