From 5d18defe95d1d8c71d93c5993cefe16a28608309 Mon Sep 17 00:00:00 2001 From: Benjamin Muskalla Date: Mon, 16 Mar 2020 21:51:04 +0100 Subject: [PATCH] Allow scenarios to use different commands than `build` --- README.md | 2 +- src/main/java/org/gradle/profiler/BazelScenarioInvoker.java | 1 - .../org/gradle/profiler/ProfilerIntegrationTest.groovy | 6 +++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6d897d2d..55ab0f6d 100644 --- a/README.md +++ b/README.md @@ -303,7 +303,7 @@ You can compare Gradle against Bazel, Buck, and Maven by specifying their equiva tasks = ["assemble"] bazel { - targets = ["//some/target"] + targets = ["build" "//some/target"] } } diff --git a/src/main/java/org/gradle/profiler/BazelScenarioInvoker.java b/src/main/java/org/gradle/profiler/BazelScenarioInvoker.java index 5507756c..3a0f8b2a 100644 --- a/src/main/java/org/gradle/profiler/BazelScenarioInvoker.java +++ b/src/main/java/org/gradle/profiler/BazelScenarioInvoker.java @@ -19,7 +19,6 @@ void doRun(BazelScenarioDefinition scenario, InvocationSettings settings, Consum List commandLine = new ArrayList<>(); commandLine.add(bazelExe); - commandLine.add("build"); commandLine.addAll(targets); ScenarioContext scenarioContext = ScenarioContext.from(settings, scenario); diff --git a/src/test/groovy/org/gradle/profiler/ProfilerIntegrationTest.groovy b/src/test/groovy/org/gradle/profiler/ProfilerIntegrationTest.groovy index 21dca0c2..fcd9b9dc 100644 --- a/src/test/groovy/org/gradle/profiler/ProfilerIntegrationTest.groovy +++ b/src/test/groovy/org/gradle/profiler/ProfilerIntegrationTest.groovy @@ -1195,7 +1195,7 @@ buildTarget { buildTarget { tasks = ["some:assemble"] bazel { - targets = [":hello"] + targets = ["build", ":hello"] } } """ @@ -1254,7 +1254,7 @@ help { buildTarget { tasks = ["help"] bazel { - targets = "//some/target" + targets = ["build", "//some/target"] } } """ @@ -1274,7 +1274,7 @@ buildTarget { buildTarget { tasks = ["help"] bazel { - targets = "//some/target" + targets = ["build", "//some/target"] } } """