use of org.graalvm.component.installer.remote.CatalogIterable in project graal by oracle.
the class CatalogInstallTest method testInstallDepsWithDependecnyInstalledCommon.
private void testInstallDepsWithDependecnyInstalledCommon() throws Exception {
ComponentInfo fakeInfo = new ComponentInfo("org.graalvm.llvm-toolchain", "Fake Toolchain", "19.3-dev");
fakeInfo.setInfoPath("");
storage.installed.add(fakeInfo);
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);
assertTrue(cmd.getDependencies().isEmpty());
}
use of org.graalvm.component.installer.remote.CatalogIterable 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.remote.CatalogIterable in project graal by oracle.
the class CatalogInstallTest method testInstallCorrectJavaVersion11.
@Test
public void testInstallCorrectJavaVersion11() throws Exception {
storage.graalInfo.put(CommonConstants.CAP_JAVA_VERSION, "11");
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 testInstallWithBrokenIgnoredDeps.
@Test
public void testInstallWithBrokenIgnoredDeps() throws Exception {
setupVersion("19.3-dev");
setupCatalog(null);
paramIterable = new CatalogIterable(this, this);
textParams.add("additional");
options.put(Commands.OPTION_NO_DEPENDENCIES, "");
InstallCommand cmd = new InstallCommand();
cmd.init(this, withBundle(InstallCommand.class));
cmd.executionInit();
cmd.executeStep(cmd::prepareInstallation, false);
}
use of org.graalvm.component.installer.remote.CatalogIterable in project graal by oracle.
the class CatalogInstallTest method testPostinstMessagePrinted.
@Test
public void testPostinstMessagePrinted() throws Exception {
setupVersion("0.33");
URL x = getClass().getResource("postinst2.jar");
URL rubyURL = new URL("test://release/postinst2.jar");
Handler.bind(rubyURL.toString(), x);
setupCatalog(null);
paramIterable = new CatalogIterable(this, this);
textParams.add("ruby");
InstallCommand cmd = new InstallCommand();
cmd.init(this, withBundle(InstallCommand.class));
String[] formatted = new String[1];
delegateFeedback(new FeedbackAdapter() {
@Override
public boolean verbatimOut(String aMsg, boolean beVerbose) {
if (aMsg.contains("Ruby openssl")) {
// NOI18N
formatted[0] = aMsg;
}
return super.verbatimOut(aMsg, beVerbose);
}
});
cmd.execute();
assertNotNull(formatted[0]);
}
Aggregations