Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRefactor python function to create commandline arguments #338
Comments
|
Are you suggesting something like this ? def make_cd_command(command):
return ["bash", "-l", "-c", "cd /c/buildbot/slave/windows/build ; " + command ]
windows = ServoFactory([
# TODO: convert this to use DynamicServoFactory
# We need to run each command in a bash login shell, which breaks the
# heuristics used by DynamicServoFactory.make_step
steps.Compile(command= make_cd_command("./mach build -d -v"),
env=envs.build_windows),
steps.Compile(command= make_cd_command("./mach test-unit"),
env=envs.build_windows),
# TODO: run lockfile_changed.sh and manifest_changed.sh scripts
]) |
|
@ashrko619 Yes, that's the right direction. If you open a PR I have a few style nits, but it looks good otherwise. |
|
@aneeshusa Thanks, I will open a PR, btw what are the style nits here ? |
|
Here, we need to rename the Generally, I prefer to do reviewing on PRs because inline comments are clearer, so go ahead and open a PR and I'll make any future comments there. |
bors-servo
added a commit
that referenced
this issue
Apr 27, 2016
Refactored python function to create command line arguments This commit is for issue #338 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/342) <!-- Reviewable:end -->
|
Fixed by #342. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In #331, we added a function to create the path string,
make_cd_string:https://github.com/servo/saltfs/blob/master/buildbot/master/files/config/factories.py#L118-L119
However, this could be cleaner! As seen in https://github.com/servo/saltfs/blob/master/buildbot/master/files/config/factories.py#L126-L127, there are more arguments in the array that are static.
In this fix, please rename the function and make it return an array with all of the arguments required, while still taking the same single argument (the command to execute).