use of org.eclipse.tycho.core.shared.TargetEnvironment in project tycho by eclipse.
the class TargetDefinitionResolverWithPlatformSpecificUnitsTest method testPlannerResolutionWithMultiplePlatforms.
@Test
public void testPlannerResolutionWithMultiplePlatforms() throws Exception {
List<TargetEnvironment> environments = Arrays.asList(new TargetEnvironment("linux", "gtk", "x86_64"), new TargetEnvironment("win32", "win32", "x86"), new TargetEnvironment("macosx", "carbon", "x86"));
targetDefinition = definitionWith(new FilterRepoLocationStubWithLauncherUnit(IncludeMode.PLANNER));
subject = createResolver(environments);
TargetDefinitionContent units = subject.resolveContent(targetDefinition);
assertThat(versionedIdsOf(units), bagEquals(versionedIdList(LAUNCHER_FEATURE, LAUNCHER_FEATURE_JAR, LAUNCHER_BUNDLE, LAUNCHER_BUNDLE_LINUX, LAUNCHER_BUNDLE_WINDOWS, LAUNCHER_BUNDLE_MAC)));
}
use of org.eclipse.tycho.core.shared.TargetEnvironment in project tycho by eclipse.
the class TargetDefinitionResolverWithPlatformSpecificUnitsTest method testConflictingIncludeAllEnvironments.
@Test(expected = TargetDefinitionResolutionException.class)
public void testConflictingIncludeAllEnvironments() throws Exception {
targetDefinition = definitionWith(new FilterRepoLocationStubWithLauncherUnit(IncludeMode.SLICER, true), new FilterRepoLocationStubWithLauncherUnit(IncludeMode.SLICER, false));
subject = createResolver(Collections.singletonList(new TargetEnvironment(null, null, null)));
subject.resolveContentWithExceptions(targetDefinition);
}
use of org.eclipse.tycho.core.shared.TargetEnvironment in project tycho by eclipse.
the class TargetDefinitionResolverWithPlatformSpecificUnitsTest method testSlicerResolutionWithIncludeAllEnvironments.
@Test
public void testSlicerResolutionWithIncludeAllEnvironments() throws Exception {
TargetEnvironment environment = new TargetEnvironment("gtk", "linux", "x86_64");
targetDefinition = definitionWith(new FilterRepoLocationStubWithLauncherUnit(IncludeMode.SLICER, true));
subject = createResolver(Collections.singletonList(environment));
TargetDefinitionContent units = subject.resolveContent(targetDefinition);
assertThat(versionedIdsOf(units), bagEquals(versionedIdList(LAUNCHER_FEATURE, LAUNCHER_FEATURE_JAR, LAUNCHER_BUNDLE, LAUNCHER_BUNDLE_LINUX, LAUNCHER_BUNDLE_WINDOWS, LAUNCHER_BUNDLE_MAC)));
}
use of org.eclipse.tycho.core.shared.TargetEnvironment in project tycho by eclipse.
the class TargetDefinitionResolverWithPlatformSpecificUnitsTest method testSlicerResolutionWithOnePlatform.
@Test
public void testSlicerResolutionWithOnePlatform() throws Exception {
TargetEnvironment environment = new TargetEnvironment("linux", "gtk", "x86_64");
targetDefinition = definitionWith(new FilterRepoLocationStubWithLauncherUnit(IncludeMode.SLICER));
subject = createResolver(Collections.singletonList(environment));
TargetDefinitionContent units = subject.resolveContent(targetDefinition);
assertThat(versionedIdsOf(units), bagEquals(versionedIdList(LAUNCHER_FEATURE, LAUNCHER_FEATURE_JAR, LAUNCHER_BUNDLE, LAUNCHER_BUNDLE_LINUX)));
}
use of org.eclipse.tycho.core.shared.TargetEnvironment in project tycho by eclipse.
the class TargetDefinitionResolverWithPlatformSpecificUnitsTest method testResolutionWithGenericPlatform.
@Test
public void testResolutionWithGenericPlatform() throws Exception {
targetDefinition = definitionWith(new FilterRepoLocationStubWithLauncherUnit(IncludeMode.PLANNER));
subject = createResolver(Collections.singletonList(new TargetEnvironment(null, null, null)));
TargetDefinitionContent units = subject.resolveContent(targetDefinition);
assertThat(versionedIdsOf(units), bagEquals(versionedIdList(LAUNCHER_FEATURE, LAUNCHER_FEATURE_JAR, LAUNCHER_BUNDLE)));
}
Aggregations