Commit graph

663 commits

Author SHA1 Message Date
Jeremy Chen
aec2e4f1e6 Upgrade mozlog package from 3.0 to 3.3.
With this upgrade, we are able to run wpt test with "--log-html" to see visual
results on screen.
2016-07-19 23:52:33 +08:00
Aravind Gollakota
1fc05dd7e6 mach: Don't bail out early when unable to find the right suite for a test 2016-07-17 19:27:08 -07:00
bors-servo
e7a55ae55e Auto merge of #10618 - zwn:fix-windows-build, r=larsbergstrom
Ensure virtualenv activates

Fixes #10595. For more info see #10595 or the commit message.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10618)
<!-- Reviewable:end -->
2016-07-17 15:58:12 -07:00
Jean SIMARD
5783b75c7b Add a missing pip dependency for html5lib 2016-07-17 13:19:25 -04:00
bors-servo
650d1d1185 Auto merge of #12447 - asajeffrey:license-mpl-2.0, r=frewsxcv
All our Cargo.toml files should contain an MPL-2.0 license field.

<!-- Please describe your changes on the following line: -->

Added a `license = "MPL-2.0"` field to all our `Cargo.toml` files, and added a check to `test-tidy` that the license is present.

---
<!-- 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
- [X] These changes fix #12434
- [X] There are tests for these changes

<!-- 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/12447)
<!-- Reviewable:end -->
2016-07-14 09:33:18 -07:00
Alan Jeffrey
9fa54af347 Allow MIT/Apache-2.0 license as well as MPL-2.0. 2016-07-14 11:24:29 -05:00
Alan Jeffrey
62e95c5a61 All our Cargo.toml files should contain an MPL-2.0 license field. 2016-07-14 10:26:34 -05:00
bors-servo
84fbd8946f Auto merge of #11604 - talklittle:mach_test_wpt_paths_10883, r=jdm
Mach re-dispatch test-wpt and test-css based on path

<!-- Please describe your changes on the following line: -->
Print a warning and dispatch to the correct test suite, when non-WPT test paths are given to `mach test-wpt` or non-CSS paths to `mach test-css`

---
<!-- 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
- [X] These changes fix #10883 (github issue number if applicable).

<!-- Either: -->
- [X] These changes do not require tests because improving mach test script itself

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11604)
<!-- Reviewable:end -->
2016-07-14 07:42:08 -07:00
Manish Goregaokar
3ead9cc67b Improve mach clippy, add plugins to style/util 2016-07-12 19:59:58 +05:30
bors-servo
184b1ba91b Auto merge of #12377 - upsuper:build-with-mozillabuild, r=metajack
Build geckolib with MozillaBuild on Windows

<!-- Please describe your changes on the following line: -->

Given #12319 removes the direct dependency of geckolib to gcc, geckolib is now compilable without gcc, and thus builds within MozillaBuild.

This changeset also changes the triple to use the MSVC backend rather than GNU for Windows . I'm not sure whether this change is necessary, but given we use MSVC to compile Gecko on Windows, I think we would eventually need this anyway. Triples for MinGW64 and Cygwin are unchanged, so that existing build targets should not be broken.

Servo itself is still not buildable with MozillaBuild. To make that work, some changes to mozjs are necessary as well.

It is probably worth some infra coverage to avoid regression.

---
<!-- 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 (on MinGW)
- [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 it only changes build system

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

r? @bholley

<!-- 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/12377)
<!-- Reviewable:end -->
2016-07-11 10:37:16 -07:00
bors-servo
638eb80110 Auto merge of #12318 - tallowen:tidy-features, r=frewsxcv
[tidy] prevent duplicate json keys

Throws a tidy error when duplicated keys are present.
![screenshot from 2016-07-07 16-54-17](fd19cece-4465-11e6-89b1-a79296ba6a72.png)

---
<!-- 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
- [X] These changes fix #12283 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/12318)
<!-- Reviewable:end -->
2016-07-10 19:15:35 -07:00
Xidorn Quan
ce2447f921 Change to use msvc triple for Windows Python 2016-07-11 11:28:45 +10:00
Xidorn Quan
cb62b5dd26 Ensure all env vars are str
This is necessary for the Python build bundled in MozillaBuild.
2016-07-11 11:27:24 +10:00
Simon Sapin
38b6b24a5d Fix #12359: make ensure_bootstrap check for host std if rustc exists. 2016-07-09 00:33:12 +02:00
Simon Sapin
e2262882ad Use static-rust-lang-org.s3.amazonaws.com everywhere. 2016-07-08 22:28:54 +02:00
Simon Sapin
24575ff226 Move ports/geckolib/target to target/geckolib 2016-07-08 22:28:53 +02:00
Simon Sapin
79ef0a5d7f Remove the "./mach build-stable" subcommand
It is replaced by "./mach build-gecklibo" using stable Rust.
2016-07-08 22:28:51 +02:00
Simon Sapin
26a78817c1 Make "./mach geckolib" use the stable Rust compiler 2016-07-08 22:28:48 +02:00
Simon Sapin
6ae5598a5c Fix "looking for rustc at …" message for stable when already bootstrapped
Also always download from static-rust-lang-org.s3.amazonaws.com instead
of static.rust-lang.org. They host the same content, but the latter goes
through a CDN and has a TLS certificate that failed to verify and some
Python versions:

https://github.com/servo/servo/issues/3582
https://github.com/servo/servo/pull/3971
2016-07-08 22:27:20 +02:00
Owen Coutts
ff4cb7f80a [tidy] check for duplicate keys in .json files 2016-07-08 11:12:12 +02:00
Xidorn Quan
064f1adb78 Get the build env before change dir
Otherwise, build_env may fail to find git information.
2016-07-08 18:51:02 +10:00
bors-servo
34e53b1dca Auto merge of #12317 - tallowen:add-tidy-test, r=jdm
[tidy] Test json parsing functionality

We didn't have a test for json parsing so lets start with that

---
<!-- 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

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/12317)
<!-- Reviewable:end -->
2016-07-07 20:12:38 -07:00
Owen Coutts
28399d0877 [tidy] Add test for existing json functionality 2016-07-07 17:07:03 +02:00
Nikhil Shagrithaya
6c6bfdb523 Added a subdirectory with a file to test whether tidy command ignores files in subdirectories 2016-07-07 15:08:41 +05:30
Nikhil Shagrithaya
be98fc4c59 tidy command now ignores files in subdirectories of ignored directories 2016-07-07 15:06:06 +05:30
bors-servo
beff8ee68f Auto merge of #12271 - mbrubeck:host_triple, r=emilio
Fix installation location for downloaded std packages

Fixes a "can't find crate for `std`" error in mach build. Regression from #11945. r? @larsbergstrom

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12271)
<!-- Reviewable:end -->
2016-07-06 07:31:08 -07:00
Emilio Cobos Álvarez
eb77873989
stylo: Move all binding-generator code to a python script.
This not only makes us more consistent with the rest of the codebase but also:

 * Makes us repeat less code like common flags and all that stuff.
 * Reduces the noise of the build: You only get the output of the commands on
   failure or when you pass the -v flag.
 * Makes you able to select a single kind of build or multiple in the same
   place.

I've basically kept the regen.sh script because of the LIBCLANG_PATH checks, but
at least from Linux I don't need them anymore. Also, that logic could be moved
to the new script.

The whole point of this isn't only making it prettier and easier to use, but
also allowing me to write more complex logic in the binding generator scripts,
that I will probably need to integrate the DOM enum types we need for animations
and such easily (can't be just an include, because that pulls in another header
with the same name bringing a lot of DOM and IDL churn).
2016-07-05 20:14:39 -07:00
Matt Brubeck
a824177bf1 Fix error in cross-compiling bootstrap 2016-07-05 11:17:46 -07:00
bors-servo
1e1db061c0 Auto merge of #11945 - gpoesia:master, r=SimonSapin
Add mach build-stable to build with stable rustc

<!-- Please describe your changes on the following line: -->

Added mach subcommand (build-stable) to build servo and its dependencies using a stable version of rustc.

---
<!-- 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
- [X] These changes fix #11806 (github issue number if applicable).

<!-- Either: -->
- [X] These changes do not require tests because they're in the build process. I've manually tested both build and build-stable several times and in different orders and it seems to work. If the mach subcommands are tested automatically somewhere, I'll be happy to add a test, but I couldn't find it.

This is an example of output I get, which is what I'd expect:

```plain
[gpoesia@gabriel-notebook servo]$ ./mach build
looking for rustc at /home/gpoesia/dev/servo/.servo/rust/2016-06-24/rustc-nightly-x86_64-unknown-linux-gnu/rustc/bin/rustc
Downloading Rust compiler...
Downloading Rust compiler: 100.0%
Extracting Rust compiler...
Rust compiler ready.
Downloading Host rust library for target x86_64-unknown-linux-gnu...
Downloading Host rust library for target x86_64-unknown-linux-gnu: 100.0%
Extracting Rust stdlib for target x86_64-unknown-linux-gnu...
Rust x86_64-unknown-linux-gnu libs ready.
Build completed in 0:00:01
[gpoesia@gabriel-notebook servo]$ ./mach build
Build completed in 0:00:02
[gpoesia@gabriel-notebook servo]$ ./mach build-stable
looking for rustc at /home/gpoesia/dev/servo/.servo/rust/rustc-1.9.0-x86_64-unknown-linux-gnu/rustc/bin/rustc
Rust compiler already downloaded. Use |bootstrap-rust --force| to download again.
Rust lib for target x86_64-unknown-linux-gnu already downloaded. Use |bootstrap-rust --force| to download again.
   Compiling log v0.3.6
   Compiling tenacious v0.2.1
   Compiling traitobject v0.0.1
   Compiling azure v0.4.6 (https://github.com/servo/rust-azure#4d72934a)
   Compiling crossbeam v0.2.9
/home/gpoesia/dev/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/tenacious-0.2.1/src/lib.rs:1:1: 1:42 error: #[feature] may not be used on the stable release channel
/home/gpoesia/dev/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/tenacious-0.2.1/src/lib.rs:1 #![feature(plugin_registrar, box_syntax)]
                                                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gpoesia/dev/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/tenacious-0.2.1/src/lib.rs:3:1: 3:27 error: #[feature] may not be used on the stable release channel
/home/gpoesia/dev/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/tenacious-0.2.1/src/lib.rs:3 #![feature(rustc_private)]
                                                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 2 previous errors
Build failed, waiting for other jobs to finish...
error: Could not compile `tenacious`.

To learn more, run the command again with --verbose.
Build completed in 0:00:03
[gpoesia@gabriel-notebook servo]$ ./mach build-stable
looking for rustc at /home/gpoesia/dev/servo/.servo/rust/rustc-1.9.0-x86_64-unknown-linux-gnu/rustc/bin/rustc
Rust compiler already downloaded. Use |bootstrap-rust --force| to download again.
Rust lib for target x86_64-unknown-linux-gnu already downloaded. Use |bootstrap-rust --force| to download again.
   Compiling js v0.1.3 (https://github.com/servo/rust-mozjs#707bfb4f)
   Compiling serde_item v0.2.0
   Compiling encoding-index-tradchinese v1.20141219.5
   Compiling angle v0.1.0 (https://github.com/servo/angle?branch=servo#d0a2db05)
/home/gpoesia/dev/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_item-0.2.0/src/lib.rs:3:43: 3:74 error: #[feature] may not be used on the stable release channel
/home/gpoesia/dev/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_item-0.2.0/src/lib.rs:3 #![cfg_attr(not(feature = "with-syntex"), feature(rustc_private, plugin))]
                                                                                                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
Build failed, waiting for other jobs to finish...
error: Could not compile `serde_item`.

To learn more, run the command again with --verbose.
Build completed in 0:00:37
[gpoesia@gabriel-notebook servo]$
```

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

Github issue: #11806
Building with current stable rust (1.9.0) still fails because of
feature pragmas in some dependencies (e.g. serde_item).

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11945)
<!-- Reviewable:end -->
2016-07-05 07:17:48 -07:00
Travis Dean
6642358217 Add style check, test, and code fixes for an else brace check. 2016-07-04 18:38:13 -04:00
bors-servo
bb18e99597 Auto merge of #12088 - this-jacob:colon_to_dash, r=ConnorGBrewster
Change colons to dashes in package name

<!-- Please describe your changes on the following line: -->

Updating packaging so that packages use '-' instead of a ':'

r? @ConnorGBrewster

---
<!-- 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] These changes fix #11984  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because they are updating packaging

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12088)
<!-- Reviewable:end -->
2016-07-03 05:42:41 -07:00
Jacob Thomas
fe818addd0 Change colons to dashes in package name 2016-07-01 10:48:10 -06:00
Marco Neumann
f7b86f349b Add shebang to Linux runservo.sh 2016-07-01 10:56:51 +02:00
Connor Brewster
322d39442c fix runservo.sh using absolute path 2016-06-30 22:28:22 -06:00
Connor Brewster
0b84921d03 Copy resources on linux package 2016-06-30 22:17:09 -06:00
Connor Brewster
352090875c put run script in the right folder for packaging 2016-06-30 18:33:07 -06:00
Gabriel Poesia
a1a1dec4d5 Add mach build-stable to build with stable rustc
Github issue: #11806
Building with current stable rust (1.9.0) still fails because of
feature pragmas in some dependencies (e.g. serde_item).
2016-06-30 00:15:50 -03:00
bors-servo
5478e605ae Auto merge of #11262 - campaul:add_version_flag, r=Manishearth
Add `--version` flag

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy --faster` does not report any errors
- [X] These changes fix #11241 (github issue number if applicable).

Either:
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

Not 100% sure of a good way to test this, so I'm submitting as is for feedback. Manually testing it appears to work fine.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11262)
<!-- Reviewable:end -->
2016-06-29 09:05:35 -05:00
Cameron Paul
d76ffa8fd8 Add --version flag 2016-06-28 20:00:39 -05:00
Connor Brewster
694b930891 fix dylib relinking issue for mac packaging 2016-06-28 16:24:21 -06:00
Connor Brewster
96b7a19ca0 create an app bundle and package it in dmg
Fix resource lookup, add package prefs

fix tidy issues
2016-06-28 13:09:08 -06:00
bors-servo
887376b225 Auto merge of #11740 - perlun:detect-case-sensitive-file-system, r=metajack
Added detection for case-sensitive file systems

- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because they only change Mach code

This is needed for the moment because of a bug in virtualenv (reported upstream).

r? @metajack (you were the one who suggested that we check this. I did it in a slightly simpler way since I realized we over-complicated things a bit when talking about it the other day.)

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11740)
<!-- Reviewable:end -->
2016-06-27 12:13:45 -05:00
bors-servo
86d65b6064 Auto merge of #11849 - paulrouget:prefNameUpdate, r=jdm
Fix preference name

<!-- Please describe your changes on the following line: -->

---
<!-- 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 not testable

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

Follow up of https://github.com/servo/servo/pull/11735. `.enabled` is missing in the python scripts.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11849)
<!-- Reviewable:end -->
2016-06-24 06:48:53 -05:00
Paul Rouget
8836250d71 Fix preference name 2016-06-24 12:03:01 +02:00
Ms2ger
79b1e6c40c Update web-platform-tests to revision 346d5b51a122f7bb1c7747064499ef281a0200f7 2016-06-24 11:36:34 +02:00
bors-servo
eeed5b6ec2 Auto merge of #11735 - mrmiywj:reload-page-shortcut, r=jdm
add reload keyboard shortcut

<!-- Please describe your changes on the following line: -->

---
<!-- 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
- [X] These changes fix #11686  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because this cannot be automated tested.

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11735)
<!-- Reviewable:end -->
2016-06-23 10:58:54 -05:00
Simon Sapin
f7f81e0ed0 Use our copy of RefCell for style data.
This allows removing `#![feature(as_unsafe_cell)]` in geckolib
and make progress towards #11815.
2016-06-23 16:13:49 +02:00
mrmiywj
909f0da3c2 add reload keyboard shortcut
rename the preference to shell.builtin-key-shortcuts.enabled
2016-06-23 17:37:56 +08:00
Simon Martin
ec5792ed2a Issue #11388: --debug and --browserhtml are not exclusive in 'mach run'. 2016-06-18 00:15:29 +02:00
bors-servo
f029e1a5cd Auto merge of #11771 - jdm:osx_gdb, r=Wafflespeanut
Pass Ctr+C to underlying process when invoking commands through mach.

This is based on the patch in https://bugzilla.mozilla.org/show_bug.cgi?id=996823 and the [suprocess.check_call documentation](https://docs.python.org/2/library/subprocess.html#subprocess.check_call).

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11770 (github issue number if applicable).
- [X] These changes do not require tests because we can't test the mach subprocess invocation

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11771)
<!-- Reviewable:end -->
2016-06-17 08:13:07 -05:00