Skip to content
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

Windows support for the --nightly | -n flag to mach run commands. #20122

Merged
merged 1 commit into from Mar 16, 2018

Conversation

@o0Ignition0o
Copy link
Contributor

o0Ignition0o commented Feb 26, 2018

Add windows support to the -n flag.

Followup to #19947 , this PR will add windows support to the -n flag.
This is part of step two for #19505

  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #__ (github issue number if applicable).

The feature does not work just yet, I'm able to download and extract the archive, but it's not running the executable yet.
@tigercosmos might be a good reviewer on this one :)

  • There are tests for these changes OR
  • These changes do not require tests because they're part of a ./mach command.

This change is Reviewable

@highfive
Copy link

highfive commented Feb 26, 2018

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @pcwalton (or someone else) soon.

@highfive
Copy link

highfive commented Feb 26, 2018

Heads up! This PR modifies the following files:

  • @wafflespeanut: python/servo/command_base.py, python/servo/post_build_commands.py
@o0Ignition0o o0Ignition0o force-pushed the o0Ignition0o:mach_run_nightly_windows branch from 336a10b to b97aa8e Feb 26, 2018
@tigercosmos
Copy link
Collaborator

tigercosmos commented Feb 26, 2018

I guess we should merge #19947, and then go to work on this. The two code are overlaid.

@jdm jdm assigned jdm and unassigned pcwalton Feb 26, 2018
@o0Ignition0o
Copy link
Contributor Author

o0Ignition0o commented Feb 26, 2018

Yeah definitely ! :)

Copy link
Member

jdm left a comment

This looks like a good improvement on the original PR. Thanks!

print("Extracting to {} ...".format(destination_folder))
if is_windows():
command = 'msiexec /a {} /qn TARGETDIR={}' \
.format(os.path.join(nightlies_folder, destination_file), destination_folder)

This comment has been minimized.

@jdm

jdm Mar 5, 2018

Member

Let's use this formatting instead:

command = 'msiexec /a {} /qn TARGETDIR={}'.format(
    path.join(...), destination_folder)
bin_folder = path.join(destination_folder, "servo")
if is_windows():
bin_folder = path.join(destination_folder, "PFiles", "Mozilla research", "Servo Tech Demo")
print(path.join(bin_folder, "servo{}".format(BIN_SUFFIX)))

This comment has been minimized.

@jdm

jdm Mar 5, 2018

Member

Do we still need this?

This comment has been minimized.

@o0Ignition0o

o0Ignition0o Mar 8, 2018

Author Contributor

I think I could extract the .msi archive to %temp% and just keep the .exe file instead :)

This comment has been minimized.

@jdm

jdm Mar 8, 2018

Member

I was asking about the print, but it's worth a try!

This comment has been minimized.

@o0Ignition0o

o0Ignition0o Mar 9, 2018

Author Contributor

Oh I see, no it's debug code I use (I seem to get the right path but when I try to ./mach run with a path to the executable it just won't ^^
I guess as soon as I figure it out I'll remove the WIP tag on the PR (Probably this weekend :))

@bors-servo
Copy link
Contributor

bors-servo commented Mar 7, 2018

The latest upstream changes (presumably #19947) made this pull request unmergeable. Please resolve the merge conflicts.

@o0Ignition0o o0Ignition0o force-pushed the o0Ignition0o:mach_run_nightly_windows branch from b97aa8e to 887fcf6 Mar 11, 2018
@o0Ignition0o o0Ignition0o force-pushed the o0Ignition0o:mach_run_nightly_windows branch from 887fcf6 to a132a9b Mar 11, 2018
@o0Ignition0o o0Ignition0o changed the title [WIP] Windows support for the --nightly | -n flag to mach run commands. Windows support for the --nightly | -n flag to mach run commands. Mar 11, 2018
@o0Ignition0o
Copy link
Contributor Author

o0Ignition0o commented Mar 11, 2018

This should be reviewable now.
Please not I have not been able to run the executable on my windows virtual machine (but I still couldn't do so when downloading and running it manually). So extra caution / trying to run it on windows would be more than appreciated ^^'

The command to run would be

./mach run -n 2018-02-25 https://mozilla.org

@jdm
Copy link
Member

jdm commented Mar 11, 2018

Is there a difference if you run a windows nightly since March 1? There was a two month period in which we broke nightlies on windows at startup.

@o0Ignition0o
Copy link
Contributor Author

o0Ignition0o commented Mar 11, 2018

I got the same result as I ran

PS C:\Users\jerem\Documents\Mozilla\servo> .\mach.bat run -n 2018-03-08 https://mozilla.org

The window seems to open and closes instantly.
The same behaviour happens when I run the Windows Build ZIP from https://download.servo.org/ so I'm pretty convinced it has to do with my setup
Edit :

Failed to create window.: NoAvailablePixelFormat (thread main, at libcore\result.rs:916)

This is definitely related to my VM setup x)

@jdm
Copy link
Member

jdm commented Mar 16, 2018

Let's go ahead and merge this. If anybody tests it in a non-VM environment they can let us know how it goes.
@bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented Mar 16, 2018

📌 Commit a132a9b has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Mar 16, 2018

Testing commit a132a9b with merge f5c1f51...

bors-servo added a commit that referenced this pull request Mar 16, 2018
Windows support for the --nightly | -n flag to mach run commands.

<!-- Please describe your changes on the following line: -->
Add windows support to the -n flag.
---
Followup to #19947 , this PR will add windows support to the -n flag.
 This is part of step two for #19505

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

The feature does not work just yet, I'm able to download and extract the archive, but it's not running the executable yet.
@tigercosmos might be a good reviewer on this one :)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they're part of a ./mach command.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20122)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Mar 16, 2018

@bors-servo bors-servo merged commit a132a9b into servo:master Mar 16, 2018
3 of 4 checks passed
3 of 4 checks passed
Taskcluster (pull_request) TaskGroup: failure
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@o0Ignition0o o0Ignition0o deleted the o0Ignition0o:mach_run_nightly_windows branch Dec 8, 2018
@o0Ignition0o o0Ignition0o mentioned this pull request Dec 8, 2018
3 of 5 tasks complete
bors-servo added a commit that referenced this pull request Dec 22, 2018
./mach run -n on mac os.

<!-- Please describe your changes on the following line: -->
Add macos support to the -n flag.

Followup to #20122 , this PR will add macos support to the -n flag.
 This is part of step two for #19505

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because this mach command does not build anything

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22387)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.