use of com.facebook.buck.io.ExecutableFinder in project buck by facebook.
the class PythonBuckConfigTest method whenToolsPythonDoesNotExistThenItIsNotUsed.
@Test(expected = HumanReadableException.class)
public void whenToolsPythonDoesNotExistThenItIsNotUsed() throws IOException {
String invalidPath = temporaryFolder.getRoot().toAbsolutePath() + "DoesNotExist";
PythonBuckConfig config = new PythonBuckConfig(FakeBuckConfig.builder().setSections(ImmutableMap.of("python", ImmutableMap.of("interpreter", invalidPath))).build(), new ExecutableFinder());
config.getPythonInterpreter();
fail("Should throw exception as python config is invalid.");
}
use of com.facebook.buck.io.ExecutableFinder in project buck by facebook.
the class NdkLibraryTest method setUp.
@Before
public void setUp() {
AssumeAndroidPlatform.assumeNdkIsAvailable();
projectFilesystem = new ProjectFilesystem(Paths.get(".").toAbsolutePath());
AndroidDirectoryResolver resolver = new DefaultAndroidDirectoryResolver(projectFilesystem.getRootPath().getFileSystem(), ImmutableMap.copyOf(System.getenv()), Optional.empty(), Optional.empty());
AndroidPlatformTarget androidPlatformTarget = AndroidPlatformTarget.getDefaultPlatformTarget(resolver, Optional.empty());
executionContext = TestExecutionContext.newBuilder().setAndroidPlatformTargetSupplier(Suppliers.ofInstance(androidPlatformTarget)).build();
ndkBuildCommand = new ExecutableFinder().getOptionalExecutable(Paths.get("ndk-build"), resolver.getNdkOrAbsent().get()).get().toAbsolutePath().toString();
}
Aggregations