You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- BuildMutator allows commands to be executed prior to the SCENARIO or BUILD phase. Enabled for all types of builds, Gradle, Bazel, Buck, and Maven.
Signed-off-by: Alex Beggs <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+41
Original file line number
Diff line number
Diff line change
@@ -270,6 +270,7 @@ A scenario can define changes that should be applied to the source before each b
270
270
-`clear-project-cache-before`: Deletes the contents of the `.gradle` and `buildSrc/.gradle` project cache directories before the scenario is executed (`SCENARIO`), before cleanup (`CLEANUP`) or before the build is executed (`BUILD`).
271
271
-`clear-transform-cache-before`: Deletes the contents of the transform cache before the scenario is executed (`SCENARIO`), before cleanup (`CLEANUP`) or before the build is executed (`BUILD`).
272
272
-`clear-jars-cache-before`: Deletes the contents of the instrumented jars cache before the scenario is executed (`SCENARIO`), before cleanup (`CLEANUP`) or before the build is executed (`BUILD`).
273
+
-`execute-command-before`: Execute a command before the scenario is executed (SCENARIO) or before the build is executed (BUILD). This can be applied to Gradle, Bazel, Buck, or Maven builds.
273
274
-`git-checkout`: Checks out a specific commit for the build step, and a different one for the cleanup step.
274
275
-`git-revert`: Reverts a given set of commits before the build and resets it afterward.
275
276
-`iterations`: Number of builds to actually measure
@@ -325,11 +326,43 @@ You can compare Gradle against Bazel, Buck, and Maven by specifying their equiva
325
326
326
327
build_some_target {
327
328
tasks = ["assemble"]
329
+
execute-command-before = [
330
+
# Gradle specific executions
331
+
# Execute a command in the bash shell
332
+
{
333
+
schedule = BUILD
334
+
commands = ["/bin/bash","-c","echo helloworld"]
335
+
},
336
+
}
328
337
329
338
bazel {
330
339
# If empty, it will be infered from BAZEL_HOME environment variable
331
340
home = "/path/to/bazel/home"
332
341
targets = ["build" "//some/target"]
342
+
execute-command-before = [
343
+
# Bazel specific executions
344
+
# execute a command prior to the scenario running.
345
+
{
346
+
schedule = SCENARIO
347
+
# Note: Ensure that this is calling the same Bazel that is used in the benchmarks
348
+
commands = ["bazel","clean","--expunge"]
349
+
},
350
+
# Execute a command in the bash shell
351
+
{
352
+
schedule = BUILD
353
+
commands = ["/bin/bash","-c","echo helloworld"]
354
+
},
355
+
# Remove the contents of the remote cache Bazel bucket
0 commit comments