Commit graph

694 commits

Author SHA1 Message Date
Ms2ger
e99cb474f0 Update ordered-float. 2016-08-11 09:13:22 +02:00
Simon Martin
1e60c915f9 Issue #12421: tidy should also check .html files 2016-08-09 22:04:57 +02:00
Ravi Shankar
a04028eede Prefer length and percentage for word spacing 2016-08-09 17:53:40 +05:30
bors-servo
aa900b91aa Auto merge of #12736 - aneeshusa:prohibit-backticks-in-shell-scripts, r=Wafflespeanut
Add more shell script lints

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

The "$(some_command arg1 arg2)" form is preferred to the
`some_command arg1 arg2` form because it nests unambiguously.
Add a lint for this to tidy.

---
<!-- 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: -->
- [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/12736)
<!-- Reviewable:end -->
2016-08-06 21:57:31 -05:00
tsawada
eba39ab98a Fix flag compose in runservo.sh
s/-S--pref/-S --pref/
2016-08-06 10:15:41 -04:00
UK992
6548325bd2 Run git command only with mach build commands 2016-08-05 22:47:27 +02:00
Aneesh Agrawal
f07d8f188a Add lint for [ instead of [[ in shells scripts 2016-08-05 09:42:04 -04:00
Aneesh Agrawal
9231ca1c69 Add lint to ensure substitutions use the full form
Check that any variable substitutions use the full ${VAR} form,
not just $VAR (but don't check for quoting yet).
2016-08-05 09:29:10 -04:00
Aneesh Agrawal
79ef9b4efc Add lint for backticks in shell scripts
The "$(some_command arg1 arg2)" form is preferred to the
`some_command arg1 arg2` form because it nests unambiguously.
Add a lint for this to tidy.
2016-08-05 09:29:09 -04:00
bors-servo
1086df67e0 Auto merge of #12244 - rev112:package-repro-pure, r=aneeshusa
Create .tar.gz package deterministically using Python's "tarfile"

<!-- Please describe your changes on the following line: -->
A development of #12108, creates a .tar.gz package using the `tarfile` and `gzip` modules, without external dependencies. Fixes #11981.
Also this fixes the issue when the existing `resources/` directory didn't allow to create a new package and failed with "File exists" error.

---
<!-- 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 #11981 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because "more general approach to reproducibility testing is needed"

<!-- 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/12244)
<!-- Reviewable:end -->
2016-08-04 18:15:49 -05:00
bors-servo
3dce4c62ca Auto merge of #12708 - paulrouget:multiprocessAndSandboxForBhtml, r=metajack
Enable multiprocess and sandbox

<!-- 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: -->
- [ ] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #12705 (github issue number if applicable).

<!-- Either: -->
- [ ] 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. -->

Enable multiprocess and sandbox for Mac and Linux when running
browserhtml.

<!-- 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/12708)
<!-- Reviewable:end -->
2016-08-04 16:13:45 -05:00
Anton Ovchinnikov
0a056a9b31 Create .tar.gz package deterministically
Fixes #11981.
2016-08-04 21:47:37 +02:00
bors-servo
4bc629b369 Auto merge of #12295 - jimberlage:12158/shell-linting, r=aneeshusa
Add linting for shell scripts

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

This changes tidy to check shell scripts for the proper shebang and
options.  It does not check that variables are formatted correctly.  It
also adds a check for the MPL 2.0 license in shell scripts.

---
<!-- 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 #12158 (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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12295)
<!-- Reviewable:end -->
2016-08-04 12:31:17 -05:00
Emilio Cobos Álvarez
27b2bad256
stylo: Fix and ensure alignment of restyle hints. Test it on Travis.
Turns out eRestyle_LaterSiblings was not really matching, sigh...
2016-08-03 15:18:32 -07:00
Paul Rouget
663f8530cf Enable multiprocess and sandbox
Enable multiprocess and sandbox for Mac and Linux when running
browserhtml.
2016-08-03 06:19:59 +02:00
bors-servo
9d795c3a3e Auto merge of #12650 - shinglyu:py3-tidy, r=Wafflespeanut
Add python3 licence check template

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

Add a python3 license template. #11107 uses python3 exclusively so we need this.
---
<!-- 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 do not require tests because covered by test-tidy self test

<!-- 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/12650)
<!-- Reviewable:end -->
2016-07-29 09:42:00 -05:00
Shing Lyu
7acc982db1 Add python3 licence check template 2016-07-29 16:42:56 +08:00
UK992
1a8871ea1b Add link arguments to test-unit 2016-07-29 00:20:28 +02:00
Jack Moffitt
ca8b375656 Fix font metrics and switch to windows subsystem
Currently fonts are using incorrect metrics and the app uses the console
subsystem. This patch adds aliases so that font metrics are found and
instructs the linker to use the windows subsystem.
2016-07-26 15:18:54 -06:00
bors-servo
2746c476d3 Auto merge of #11967 - metajack:windows-package, r=larsbergstrom
Add Windows packaging to create an MSI installer

<!-- 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 they require manual testing

<!-- 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/11967)
<!-- Reviewable:end -->
2016-07-25 16:48:33 -05:00
Jack Moffitt
d8c0b87eb2 Add Windows packaging to create an MSI installer 2016-07-25 14:58:33 -06:00
bors-servo
f5d589876b Auto merge of #12547 - jryans:wpt-firefox, r=jgraham
Allow running WPT in Firefox

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

When working with WPT tests, I find it convenient to compare the results of different browsers / engines. By installing a few more Python packages, we can easily test against Firefox from a Servo checkout.

As noted in the updated README.md, this change allows you to check WPT tests in Firefox by adding `--product firefox` to the `./mach test-wpt` command.

r? @jgraham

---
<!-- 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] These changes do not require tests because only the set of test harness packages is changed

<!-- 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/12547)
<!-- Reviewable:end -->
2016-07-25 10:09:29 -05:00
bors-servo
81a1e28da1 Auto merge of #12567 - servo:tidy-self-test-result, r=jdm
Return failure if the tidy self-tests fail.

<!-- 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/12567)
<!-- Reviewable:end -->
2016-07-24 02:51:25 -05:00
Ms2ger
3548b5edd0 Return failure if the tidy self-tests fail. 2016-07-23 15:29:06 +02:00
Simon Martin
c35cf9ad8a Issue #12564: Fix "./mach test-tidy --self-test". 2016-07-23 14:41:48 +02:00
Jim Berlage
7952bd00b6 Add linting for shell scripts
This changes tidy to check shell scripts for the proper shebang and
options.  It does not check that variables are formatted correctly.  It
also adds a check for the MPL 2.0 license in shell scripts.
2016-07-22 11:53:14 -05:00
J. Ryan Stinnett
3bc2a5632a Allow running WPT in Firefox 2016-07-21 19:31:24 -05:00
bors-servo
de4eaa4f21 Auto merge of #12511 - asajeffrey:test-tidy-dep-licenses, r=larsbergstrom
Added test-tidy for dependent licenses.

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

Add a test-tidy lint for dependency licenses. Note that #12507 should land first.

---
<!-- 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 do not require tests because we don't test our lints

<!-- 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/12511)
<!-- Reviewable:end -->
2016-07-21 12:23:24 -05:00
Alan Jeffrey
536314be79 Added test-tidy for dependent licenses. 2016-07-21 11:29:04 -05:00
bors-servo
03fa7f0ba5 Auto merge of #12467 - jeenalee:jeena-headersAPI, r=jdm
Add the append method for the Headers API

<!-- Please describe your changes on the following line: -->
This commit adds the append method for the Headers API. @malisas and I are both contributors.

There are a few TODOs related:
- The script needs to parse the header value for certain header names to decide the header group it belongs
- There are possible spec bugs that could change what a valid header value looks like (related: [issue page](https://github.com/whatwg/fetch/issues/332))

There are WPT tests already written for the Headers API, but they will fail as the Headers API is not fully implemented.

---
<!-- 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 tests for the Headers API already exists, but this commit does not implement the interface fully. The tests will fail.

<!-- 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/12467)
<!-- Reviewable:end -->
2016-07-20 16:24:48 -05:00
Jeena Lee
530b02790b Add the append method for the Headers API for the Fetch API
This commit will add the append method and associated helper functions, and introduce any necessary changes for it.
2016-07-19 13:40:31 -07:00
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