Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lptr committed Sep 3, 2024
1 parent 0646f5c commit f604495
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class BazelScenarioInvoker extends BuildToolCommandLineInvoker<BazelScena
@Override
public void run(BazelScenarioDefinition scenario, InvocationSettings settings, Consumer<BuildInvocationResult> resultConsumer) {
if (settings.isProfile()) {
throw new IllegalArgumentException("Profiling is not supported for Buck builds");
throw new IllegalArgumentException("Profiling is not supported for Bazel builds");
}

List<String> targets = scenario.getTargets();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1173,10 +1173,10 @@ class ProfilerIntegrationTest extends AbstractProfilerIntegrationTest {
new Main().run("--project-dir", projectDir.absolutePath, "--output-dir", outputDir.absolutePath, "--buck", "--profile", "jfr", "--scenario-file", scenarios.absolutePath, "--gradle-version", minimalSupportedGradleVersion, "buildTarget")

then:
thrown(IllegalArgumentException)
thrown(Exception)

and:
output.contains("Can only profile scenario 'buildTarget' when building using Gradle.")
output.contains("Profiling is not supported for Buck builds")
}

def "can profile a scenario that contains buck build instructions when building with Gradle"() {
Expand Down Expand Up @@ -1272,10 +1272,10 @@ class ProfilerIntegrationTest extends AbstractProfilerIntegrationTest {
new Main().run("--project-dir", projectDir.absolutePath, "--output-dir", outputDir.absolutePath, "--bazel", "--profile", "jfr", "--scenario-file", scenarios.absolutePath, "--gradle-version", minimalSupportedGradleVersion, "buildTarget")

then:
thrown(IllegalArgumentException)
thrown(Exception)

and:
output.contains("Can only profile scenario 'buildTarget' when building using Gradle.")
output.contains("Profiling is not supported for Bazel builds")
}

def "can profile a scenario that contains bazel build instructions when building with Gradle"() {
Expand Down

0 comments on commit f604495

Please sign in to comment.