use of org.graalvm.component.installer.ComponentParam in project graal by oracle.
the class UpgradeTest method testUpgradeToSameVersion.
/**
* Checks that upgrade will install graal for the specific Component.
*/
@Test
public void testUpgradeToSameVersion() throws Exception {
initVersion("1.0.0-dev");
textParams.add("1.0.0-dev");
textParams.add("python");
UpgradeCommand cmd = new UpgradeCommand();
cmd.init(this, this);
ComponentInfo graalInfo = cmd.configureProcess();
assertNotNull(graalInfo);
// check that GraalVM appropriate for 1.0.1 component is selected
assertEquals("1.0.0-dev", graalInfo.getVersion().displayString());
assertEquals(1, cmd.getProcess().addedComponents().size());
ComponentParam p = cmd.getProcess().addedComponents().iterator().next();
ComponentInfo ci = p.createMetaLoader().getComponentInfo();
// check that component 1.0.1 will be installed
assertEquals("1.0.0-dev", ci.getVersion().displayString());
}
use of org.graalvm.component.installer.ComponentParam in project graal by oracle.
the class UpgradeTest method testUpgradeFromDevToSpecificVersion.
/**
* Checks that upgrade will install graal of the specified version.
*/
@Test
public void testUpgradeFromDevToSpecificVersion() throws Exception {
initVersion("1.0.0-dev");
textParams.add("1.0.1");
textParams.add("python");
UpgradeCommand cmd = new UpgradeCommand();
cmd.init(this, this);
ComponentInfo graalInfo = cmd.configureProcess();
assertNotNull(graalInfo);
// check that GraalVM appropriate for 1.0.1 component is selected
assertEquals("1.0.1.0", graalInfo.getVersion().toString());
assertEquals(1, cmd.getProcess().addedComponents().size());
ComponentParam p = cmd.getProcess().addedComponents().iterator().next();
ComponentInfo ci = p.createMetaLoader().getComponentInfo();
// check that component 1.0.1 will be installed
assertEquals("1.0.1.0", ci.getVersion().toString());
}
use of org.graalvm.component.installer.ComponentParam in project graal by oracle.
the class CatalogInstallTest method testInstallWithIgnoredDeps.
@Test
public void testInstallWithIgnoredDeps() throws Exception {
setupVersion("19.3-dev");
setupCatalog(null);
paramIterable = new CatalogIterable(this, this);
textParams.add("r");
options.put(Commands.OPTION_NO_DEPENDENCIES, "");
InstallCommand cmd = new InstallCommand();
cmd.init(this, withBundle(InstallCommand.class));
cmd.executionInit();
cmd.executeStep(cmd::prepareInstallation, false);
List<ComponentParam> deps = cmd.getDependencies();
assertTrue(deps.isEmpty());
}
use of org.graalvm.component.installer.ComponentParam in project graal by oracle.
the class CatalogInstallTest method testInstallWithDepsSingleLevel.
@Test
public void testInstallWithDepsSingleLevel() throws Exception {
setupVersion("19.3-dev");
setupCatalog(null);
paramIterable = new CatalogIterable(this, this);
textParams.add("r");
InstallCommand cmd = new InstallCommand();
cmd.init(this, withBundle(InstallCommand.class));
cmd.executionInit();
cmd.executeStep(cmd::prepareInstallation, false);
List<ComponentParam> deps = cmd.getDependencies();
assertEquals(1, deps.size());
assertEquals("org.graalvm.llvm-toolchain", deps.get(0).createMetaLoader().getComponentInfo().getId());
}
Aggregations