-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add execute-command-before BuildMutator #310
base: master
Are you sure you want to change the base?
Add execute-command-before BuildMutator #310
Conversation
34a5304
to
8bd8259
Compare
} | ||
|
||
public enum ExecuteCommandSchedule { | ||
SCENARIO, BUILD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't handle CLEANUP, Bazel, Buck and Maven don't implement that
.redirectOutput(ProcessBuilder.Redirect.INHERIT) | ||
.redirectError(ProcessBuilder.Redirect.INHERIT); | ||
Process process = processBuilder.start(); | ||
return process.waitFor(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could potentially add a timeout option but for now I left it
b1d27b8
to
f34a35c
Compare
d4c772c
to
3d31a95
Compare
@@ -212,80 +218,26 @@ public ScenarioLoader(GradleBuildConfigurationReader gradleBuildConfigurationRea | |||
String title = scenario.hasPath(TITLE) ? scenario.getString(TITLE) : null; | |||
|
|||
List<BuildMutator> mutators = BUILD_MUTATOR_CONFIGURATORS.entrySet().stream() | |||
.filter(entry -> scenario.hasPath(entry.getKey())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filtering isn't done here. The BuildMutator's should be responsible for determining if they support the configuration or not.
- 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]>
3d31a95
to
c1b2376
Compare
Does this run commands in the root directory of the project? It would be helpful I think to have an example that runs a script that is local to the project being profiled since I think that would be a common case. |
If I recall correctly, this runs the command in the working directory or |
Dependent on #315