use of com.facebook.buck.testutil.integration.BuckBuildLog in project buck by facebook.
the class RustBinaryIntegrationTest method simpleAliasedBinary.
@Test
public void simpleAliasedBinary() throws IOException, InterruptedException {
ProjectWorkspace workspace = TestDataHelper.createProjectWorkspaceForScenario(this, "simple_binary", tmp);
workspace.setUp();
workspace.runBuckBuild("//:xyzzy_aliased").assertSuccess();
BuckBuildLog buildLog = workspace.getBuildLog();
buildLog.assertTargetBuiltLocally("//:xyzzy_aliased");
workspace.resetBuildLogFile();
ProcessExecutor.Result result = workspace.runCommand(workspace.resolve("buck-out/gen/xyzzy_aliased#binary,default/xyzzy").toString());
assertThat(result.getExitCode(), Matchers.equalTo(0));
assertThat(result.getStdout().get(), Matchers.containsString("Hello, world!"));
assertThat(result.getStderr().get(), Matchers.blankString());
}
use of com.facebook.buck.testutil.integration.BuckBuildLog in project buck by facebook.
the class RustBinaryIntegrationTest method binaryWithGeneratedSource.
@Test
public void binaryWithGeneratedSource() throws IOException, InterruptedException {
ProjectWorkspace workspace = TestDataHelper.createProjectWorkspaceForScenario(this, "binary_with_generated", tmp);
workspace.setUp();
workspace.runBuckBuild("//:thing").assertSuccess();
BuckBuildLog buildLog = workspace.getBuildLog();
buildLog.assertTargetBuiltLocally("//:thing");
workspace.resetBuildLogFile();
ProcessExecutor.Result result = workspace.runCommand(workspace.resolve("buck-out/gen/thing#binary,default/thing").toString());
assertThat(result.getExitCode(), Matchers.equalTo(0));
assertThat(result.getStdout().get(), Matchers.containsString("info is: this is generated info"));
assertThat(result.getStderr().get(), Matchers.blankString());
}
use of com.facebook.buck.testutil.integration.BuckBuildLog in project buck by facebook.
the class RustBinaryIntegrationTest method simpleCrateRootBinary.
@Test
public void simpleCrateRootBinary() throws IOException, InterruptedException {
ProjectWorkspace workspace = TestDataHelper.createProjectWorkspaceForScenario(this, "simple_binary", tmp);
workspace.setUp();
workspace.runBuckBuild("//:xyzzy_crate_root").assertSuccess();
BuckBuildLog buildLog = workspace.getBuildLog();
buildLog.assertTargetBuiltLocally("//:xyzzy_crate_root");
workspace.resetBuildLogFile();
ProcessExecutor.Result result = workspace.runCommand(workspace.resolve("buck-out/gen/xyzzy_crate_root#binary,default/xyzzy_crate_root").toString());
assertThat(result.getExitCode(), Matchers.equalTo(0));
assertThat(result.getStdout().get(), Matchers.containsString("Another top-level source"));
assertThat(result.getStderr().get(), Matchers.blankString());
}
Aggregations