use of org.graalvm.component.installer.remote.CatalogIterable in project graal by oracle.
the class CatalogInstallTest method testInstallDepsOnCommandLineCommon.
private void testInstallDepsOnCommandLineCommon() throws Exception {
paramIterable = new CatalogIterable(this, this);
textParams.add("r");
textParams.add("llvm-toolchain");
InstallCommand cmd = new InstallCommand();
cmd.init(this, withBundle(InstallCommand.class));
cmd.executionInit();
cmd.executeStep(cmd::prepareInstallation, false);
cmd.executeStep(cmd::completeInstallers, false);
List<Installer> instSequence = cmd.getInstallers();
assertEquals(2, instSequence.size());
ComponentInfo ci = instSequence.get(0).getComponentInfo();
assertEquals("org.graalvm.llvm-toolchain", ci.getId());
ci = instSequence.get(1).getComponentInfo();
assertEquals("org.graalvm.r", ci.getId());
}
use of org.graalvm.component.installer.remote.CatalogIterable in project graal by oracle.
the class CatalogInstallTest method testTwoSameComponentsCommandLineDepsCommon.
private void testTwoSameComponentsCommandLineDepsCommon() throws Exception {
paramIterable = new CatalogIterable(this, this);
textParams.add("r");
textParams.add("r");
InstallCommand cmd = new InstallCommand();
cmd.init(this, withBundle(InstallCommand.class));
cmd.executionInit();
cmd.executeStep(cmd::prepareInstallation, false);
cmd.executeStep(cmd::completeInstallers, false);
List<Installer> instSequence = cmd.getInstallers();
assertEquals(2, instSequence.size());
ComponentInfo ci = instSequence.get(0).getComponentInfo();
assertEquals("org.graalvm.llvm-toolchain", ci.getId());
ci = instSequence.get(1).getComponentInfo();
assertEquals("org.graalvm.r", ci.getId());
}
use of org.graalvm.component.installer.remote.CatalogIterable in project graal by oracle.
the class CatalogInstallTest method testRejectMismatchingCatalog.
/**
* Checks that mismatched catalog is rejected entirely.
*
* @throws Exception
*/
@Test
public void testRejectMismatchingCatalog() throws Exception {
setupVersion("1.0.0-rc1");
URL rubyURL = new URL("test://release/graalvm-ruby.zip");
Handler.bind(rubyURL.toString(), new URLConnection(rubyURL) {
@Override
public void connect() throws IOException {
throw new UnsupportedOperationException("Should not be touched");
}
});
exception.expect(IncompatibleException.class);
exception.expectMessage("REMOTE_UnsupportedGraalVersion");
setupCatalog(null);
textParams.add("ruby");
paramIterable = new CatalogIterable(this, this);
paramIterable.iterator().next();
}
use of org.graalvm.component.installer.remote.CatalogIterable in project graal by oracle.
the class CatalogInstallTest method testInstallCorrectJavaVersion8.
/**
* Tests, that a correct java version flavour gets selected if the catalog contains two flavours
* of the component in the requested version.
*/
@Test
public void testInstallCorrectJavaVersion8() throws Exception {
storage.graalInfo.put(CommonConstants.CAP_JAVA_VERSION, "8");
setupVersion("1.0.0.0");
setupCatalog("catalogMultiFlavours.properties");
paramIterable = new CatalogIterable(this, this);
textParams.add("ruby");
InstallCommand cmd = new InstallCommand();
cmd.init(this, withBundle(InstallCommand.class));
cmd.executionInit();
cmd.executeStep(cmd::prepareInstallation, false);
List<Installer> installers = cmd.getInstallers();
assertEquals(1, installers.size());
}
use of org.graalvm.component.installer.remote.CatalogIterable in project graal by oracle.
the class CatalogInstallTest method testDepsBeforeUsageCommon.
private void testDepsBeforeUsageCommon() throws Exception {
paramIterable = new CatalogIterable(this, this);
textParams.add("ruby");
InstallCommand cmd = new InstallCommand();
cmd.init(this, withBundle(InstallCommand.class));
cmd.executionInit();
cmd.executeStep(cmd::prepareInstallation, false);
cmd.executeStep(cmd::completeInstallers, false);
List<Installer> instSequence = cmd.getInstallers();
assertEquals(3, instSequence.size());
ComponentInfo ci = instSequence.get(0).getComponentInfo();
assertEquals("org.graalvm.llvm-toolchain", ci.getId());
ci = instSequence.get(1).getComponentInfo();
assertEquals("org.graalvm.native-image", ci.getId());
ci = instSequence.get(2).getComponentInfo();
assertEquals("org.graalvm.ruby", ci.getId());
}
Aggregations