Commit graph

477 commits

Author SHA1 Message Date
Lars Bergstrom
5c5acc0249 Add CCACHE infra and turn it on in travis 2015-11-05 14:47:23 -06:00
Benjamin Herr
a4fa004c39 mach_bootstrap: Don't get confused by interrupts
When mach_bootstrap got interrupted while it's setting up virtualenv or
calling out to pip, it wouldn't repeat that step on subsequent runs, and
mach fails because its environment isn't set up properly or dependencies
are missing.

So now we re-run virtualenv if activate_this.py doesn't exist, and only
create the marker file for required packages after pip has returned
successfully.
2015-11-05 21:04:53 +01:00
bors-servo
0699d38e80 Auto merge of #8288 - larsbergstrom:new_android_build, r=mbrubeck
New Android suppport

r/f? @mbrubeck

No need to r+ urgently; I want to do a little bit more testing of the release build, but I'm hoping to land this bit (moving to a more sane build process) next week.

The new version of building an APK:
1) Removes the glutin-based APK builder from the link step
2) Adds a build.rs step to the build of the final Servo library that adds the native code required by glutin's android_rs_glue (e.g., `ANativeActivity_onCreate` definition)
3) Replaces the link step with a `fake-ld.sh` script that instead creates a libservo.so
4) Adds a new mach `package` step to build the APK that has some Rust code that builds the library from a set of in-tree build files

This setup fixes a number of problems:
1) We can use gdb, because we use `ndk-build`, which adds the .gdbserver info, plus we keep around all of the build files (also required by the ndk gdb)
2) We can add more Java code & hooks to handle Android intents
3) We no longer have any git submodules or the awkward two-step build with android-rs-glue

Many other setups were tried (and failed). The most obvious ones is building a libservo.so from a `dylib` target from the servo build on Android. This doesn't work because you can't have a different default lib target on one platform than others in Cargo, and you also can't pass it in from the commandline (e.g., --lib does not have a dylib arg). Additionally, if you don't go through the intermediate libservo.rlib step (which removes unused symbols), then you end up with a TON of missing symbols because our -sys crates are super sloppy about that. I spent a few weeks beginning to clean them up, but since it's something we can't easily enforce (and new -sys packages will have this problem, too, since it's only an issue with the Android loader), it made more sense to me to just have the build set up to discard those unused bits of code before they ever get to the linker, much less the loader.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8288)
<!-- Reviewable:end -->
2015-11-05 05:51:48 +05:30
Lars Bergstrom
17a6cb5873 New Android suppport 2015-11-04 16:29:39 -06:00
Corey Farwell
d1824aea48 Expand tidy to lint parts of /tests/wpt 2015-11-03 17:11:44 -05:00
nxnfufunezn
03bf082fb3 Added support for using --features argument with --android 2015-10-30 22:08:04 +05:30
Brandon Fairchild
d1c2e79c89 Add clippy as a command to mach
This gives mach the ability to run clippy with `./mach clippy`.

Fixes #8134.
2015-10-21 19:21:20 -04:00
Anthony Ramine
bd363b009d Make test-tidy ignore braces surrounded by backticks 2015-10-21 10:59:36 +02:00
James Graham
9d41ddb72c Add create-wpt mach target to help with creating web-platform-tests 2015-10-20 10:43:55 +01:00
Till Schneidereit
499a847141 Whitelist drafts.fxtf.org in tidy.py's webidl spec link check 2015-10-17 22:25:21 +02:00
Gilles Leblanc
d99149701f Adds a tidy check for single-page HTML specification links
Flags links to the single-page WHATWG specification and suggests the URL
for the multi page one.

Fixes #7998
2015-10-15 21:03:58 -04:00
Tareq A Khandaker
4d994bbf4b Add clarity to missing notification module messages 2015-10-14 19:39:35 -04:00
bors-servo
0f597d3890 Auto merge of #7933 - mbrubeck:piston-image, r=glennw
Replace libpng and stb_image with PistonDevelopers/image

Fixes #3368. r? @glennw 

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7933)
<!-- Reviewable:end -->
2015-10-12 15:06:31 -06:00
Corey Farwell
85f2b6fc5b Replace usage of old-style WHATWG spec links 2015-10-10 11:55:09 -04:00
Matt Brubeck
e2e142aae8 Replace libpng with image everywhere. 2015-10-10 07:43:11 -07:00
Matt Brubeck
b649246fe2 Replace stb_image with PistonDevelopers/image
Fixes #3368
2015-10-09 12:23:33 -07:00
Pierre Chevalier
d2481c37d5 Refactor away unnecessary use of regex
We don't need regex matching since ": &Vec<" doesn't
contain any special character.

New code reads better.

Fixes #7914.
2015-10-09 16:43:26 +01:00
Matt Brubeck
d5f883ee45 Upgrade to latest mach from mozilla-central 2015-10-02 15:52:07 -07:00
Martin Robinson
f64a960ab1 Make Linux build notifications transient
Continuous non-transient notifications, common in workflows involving
many syntax errors, can completely take over the message tray. Making
Linux build notifications transient prevents them from stacking up in
Gnome Shell without having to click them individually.
2015-10-01 17:43:40 -07:00
bors-servo
ba2714f4f6 Auto merge of #7813 - servo:parallel-unit-tests, r=mbrubeck
Run all unit tests with just one Cargo command.

Upgrade Cargo to get https://github.com/rust-lang/cargo/pull/1828, and use it for unit tests. This allows Cargo to get some more parallelism when compiling the test crates’ dependencies.

`touch components/util/lib.rs && mach test-unit` on my machine goes from 149 seconds to 124.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7813)
<!-- Reviewable:end -->
2015-10-01 12:39:10 -06:00
Simon Sapin
9228b5011d Run all unit tests with just one Cargo command.
Upgrade Cargo to get https://github.com/rust-lang/cargo/pull/1828,
and use it for unit tests.
This allows Cargo to get some more parallelism
when compiling the test crates’ dependencies.

`touch components/util/lib.rs && mach test-unit` on my machine
goes from 149 seconds to 124.
2015-10-01 17:59:18 +02:00
Matt Brubeck
ab68d51eda Fixes for mach test-ref argument handling
* Change parameter from `name` to `include`. This is consistent with other
  test suites, and also fixes a bug in `mach test` caused by a conflicting
  keyword parameter in `Registrar.dispatch`.
* Allow any number of `include` arguments.
2015-10-01 08:54:18 -07:00
bors-servo
5d04f8dc8e Auto merge of #7809 - 6112:master, r=frewsxcv
Make `./mach test` work with unit tests

Fixes #7618.

Allows running a specific Rust test with one of:

```
./mach test tests/unit/net/http_loader.rs

./mach test-unit tests/unit/net/http_loader.rs
./mach test-unit tests/unit/net/http_loader
./mach test-unit net/http_loader
```

Allows running a whole package's tests with one of:

```
./mach test tests/unit/net

./mach test-unit tests/unit/net
```

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7809)
<!-- Reviewable:end -->
2015-09-30 20:30:26 -06:00
Nicolas
a844ce74f9 Allow ./mach test and ./mach test-unit to run unit tests with file path 2015-09-30 20:23:52 -04:00
bors-servo
4e749eb714 Auto merge of #7790 - frewsxcv:expand-python-executable-names, r=mbrubeck
Expand list of Python executable names to search in PATH

Fixes #7784

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7790)
<!-- Reviewable:end -->
2015-09-29 20:26:14 -06:00
bors-servo
9a4eb565c4 Auto merge of #7789 - 6112:master, r=mbrubeck
allow `./mach test` to run tests in tests/wpt/mozilla/

Allows running WPT tests in the tests/wpt/mozilla/ directory by using commands such as: 

```
./mach test tests/wpt/mozilla/tests/mozilla/union.html
```

Fixes #7772.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7789)
<!-- Reviewable:end -->
2015-09-29 19:58:28 -06:00
bors-servo
2049357d14 Auto merge of #7759 - jdramani:cmp_dromaeo_output_tool, r=mbrubeck
Add a tool for comparing Dromaeo outputs



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7759)
<!-- Reviewable:end -->
2015-09-29 18:58:28 -06:00
Corey Farwell
1a9263c2b4 Expand list of Python executable names to search in PATH
Fixes #7784
2015-09-29 18:13:43 -04:00
Nicolas
a3eee70727 allow ./mach test to run tests in tests/wpt/mozilla/ 2015-09-29 17:27:04 -04:00
Matt Brubeck
aa7e9ddb73 Fix build notifications in Python 2.x on Linux
In Python 2.x on Linux, `sys.platform == 'linux2'`.

https://docs.python.org/2/library/sys.html#sys.platform
2015-09-28 10:01:29 -07:00
Jaydeep
19be6f9f8e fix issue#6888 2015-09-27 10:18:15 -07:00
bors-servo
9523283c14 Auto merge of #7643 - jdramani:extra_ptr_dref, r=jdm
Check for Extra pointer dereferencing

Solves issue #7640

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7643)
<!-- Reviewable:end -->
2015-09-27 08:19:30 -06:00
Jaydeep
2a99915188 Check for Extra pointer dereferencing. Issue #7640. 2015-09-26 19:33:29 -07:00
Tamir Duberstein
b6bbd75479 mach: fix OS X notifications 2015-09-26 16:14:45 -04:00
bors-servo
83435d7765 Auto merge of #7716 - servo:host-triple-assign, r=Manishearth
Fix a comparison that should be an assignment in host_triple().



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7716)
<!-- Reviewable:end -->
2015-09-23 07:39:50 -06:00
bors-servo
8f1469eb08 Auto merge of #7692 - ddrmanxbxfr:TidyMaxLineOver120, r=nox
Raise max length error over 120 chars not at 120 chars. python/tidy.py

This is a follow up of issue : Tidy has an off-by-one error #7686 

It allows to raise the max length error when line is over than 120 not at 120 specifically.

Thanks for looking into it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7692)
<!-- Reviewable:end -->
2015-09-23 04:17:16 -06:00
Ms2ger
65e50be657 Fix a comparison that should be an assignment in host_triple(). 2015-09-23 09:40:08 +02:00
Mathieu Rheaume
705d8f7a1c Raise max length error over 120 chars not at 120 chars. python/tidy.py 2015-09-21 22:25:32 -04:00
bors-servo
44de9173cc Auto merge of #7678 - AnthonyBroadCrawford:improved-error-messaging-mach-bootstrap, r=frewsxcv
#7630 Adding better error messaging in mach bootstrap for missing virtualenv/pip dependencies 

This PR is in reference to #7630 

I've added a simple try catch around our use of subprocess.check_all when trying to invoke and use python's 

- virtualenv 
- pip

Upon failure, I use sys.exit with an error message for the user.  Exit seemed appropriate as anything beneath those dependencies will fail to execute and result in a non friendly error message

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7678)
<!-- Reviewable:end -->
2015-09-21 18:13:35 -06:00
Anthony Broad-Crawford
2e0e2288ed Added error handling and improved error messaging when running mach without python's virtualenv or pip installed 2015-09-21 13:38:30 -05:00
Brandon Fairchild
e924393be8 tidy.py: Check for import blocks separated by whitespace
This enables flagging multiple import blocks separated by whitespace
as errors.

Fixes #7381.
2015-09-19 12:46:01 -04:00
Hugo Thiessard
e81e91207c fixes #7390 : tidy now check the order of mod declarations even whith attribute 2015-09-18 21:32:00 +02:00
Aidan Hobson Sayers
9737b2375e Create a marker file to avoid running pip when possible 2015-09-14 20:55:22 +01:00
bors-servo
3a97455a65 Auto merge of #7570 - jxs:ignore_length_tidy_script, r=Ms2ger
ignore length on .lock files on tidy.py,

closes #7569

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7570)
<!-- Reviewable:end -->
2015-09-11 03:07:34 -06:00
João Oliveira
b9ffb80b7c ignore length on .lock files on tidy.py,
closes #7569
2015-09-09 14:02:43 +01:00
bors-servo
8397219660 Auto merge of #7568 - frewsxcv:os-agnostic-paths, r=jdm
Use OS-agnostic filesystem paths in Python

This will eventually need to be done for #1908

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7568)
<!-- Reviewable:end -->
2015-09-08 22:29:04 -06:00
bors-servo
2733060564 Auto merge of #7565 - akiss77:config-gold, r=SimonSapin
Make the use of gold linker configurable

Currently, ld.gold is always used for linking if found on the
system. There are some cases however when one may want to opt out
from using it. This patch adds the boolean field `rustc-with-gold`
to the `[tools]` section of `.servobuild`, which if set false,
disables the use of ld.gold.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7565)
<!-- Reviewable:end -->
2015-09-08 13:57:13 -06:00
Corey Farwell
244af42d89 Use OS-agnostic filesystem paths in Python
This will eventually need to be done for #1908
2015-09-08 21:16:02 +02:00
Akos Kiss
9afa930728 Make the use of gold linker configurable
Currently, ld.gold is always used for linking if found on the
system. There are some cases however when one may want to opt out
from using it. This patch adds the boolean field `rustc-with-gold`
to the `[tools]` section of `.servobuild`, which if set false,
disables the use of ld.gold.
2015-09-08 17:10:46 +00:00
bors-servo
c442132196 Auto merge of #7494 - wilmoz:upgradeWptRunner, r=jdm
Add a mach command to upgrade wptrunner

https://github.com/servo/servo/issues/7491

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7494)
<!-- Reviewable:end -->
2015-09-08 08:41:05 -06:00