/** End-to-end installation test. */ private void doTestAutoInstallation(String id, String fullversion) throws Exception { Assume.assumeTrue( "this is a really time consuming test, so only run it when we really want", Boolean.getBoolean("jenkins.testJDKInstaller")); retrieveUpdateCenterData(); JDKInstaller installer = new JDKInstaller(id, true); JDK jdk = new JDK( "test", tmp.getRoot().getAbsolutePath(), Arrays.asList(new InstallSourceProperty(Arrays.<ToolInstaller>asList(installer)))); j.jenkins.getJDKs().add(jdk); FreeStyleProject p = j.createFreeStyleProject(); p.setJDK(jdk); p.getBuildersList().add(new Shell("java -fullversion\necho $JAVA_HOME")); FreeStyleBuild b = j.buildAndAssertSuccess(p); @SuppressWarnings("deprecation") String log = b.getLog(); System.out.println(log); // make sure it runs with the JDK that just got installed assertTrue(log.contains(fullversion)); assertTrue(log.contains(tmp.getRoot().getAbsolutePath())); }