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 upRebuild after ./mach test-unit #4048
Conversation
hoppipolla-critic-bot
commented
Nov 20, 2014
|
Critic review: https://critic.hoppipolla.co.uk/r/3229 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
|
r? @metajack |
|
Could we just reorder the steps things are run in for the I'm a little wary of forcing a rebuild of the project after running unit tests, as it will add time to our builders, which I'm pushing pretty hard to keep as low as possible. I also suspect this problem should be fixed once cargo figures out what's supposed to be going on with target sharing: |
|
I realized I never updated this. Here's the conversation I had with @larsbergstrom on IRC on the 21st (link to full log):
I'm not sure where that leaves this PR, but I knew from the beginning that this was an ugly fix anyway. |
|
This is caused by a Cargo bug: rust-lang/cargo#961 |
|
I think reordering the targets to put test-unit last is probably the best workaround until we get a Cargo fix. We don't want to increase the build time on the builders. I'm also fine with putting a warning in when Cargo test runs. |
This comment has been minimized.
This comment has been minimized.
larsbergstrom
commented on f69dfc5
Dec 22, 2014
|
r+ |
This comment has been minimized.
This comment has been minimized.
|
saw approval from larsbergstrom |
This comment has been minimized.
This comment has been minimized.
|
merging mttr/servo/mach_unit_test_fix = f69dfc5 into auto |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
all tests pass: |
This comment has been minimized.
This comment has been minimized.
|
fast-forwarding master to auto = f06e0a8 |
This is a quick and dirty workaround for issue #3928. Basically, `cargo test` is deleting `./target/servo`, which is clearly not ideal if we want to do anything with servo after running the unit tests. This PR makes sure to rebuild after running `./mach test-unit`. I'm not familiar enough with cargo yet to know why it's doing this or what better alternatives there are to fixing this. Having to rebuild afterwards feels pretty ugly to me, but my rationalization right now is that the time it takes to build is negligible in comparison to the time it takes to run the tests. Ideally, this should be something we could take care of in Cargo.toml, but again, I'm new to this (and the documentation seems less than helpful from what I can tell so far). I won't be available for the rest of the day, so if anyone has suggestions, or wants to wait for a better solution, I'll get back to it tomorrow probably. Otherwise, this PR at least makes `./mach test` work properly, so there's that.
f69dfc5
into
servo:master
mttr commentedNov 20, 2014
This is a quick and dirty workaround for issue #3928. Basically,
cargo testis deleting./target/servo, which is clearly not ideal if we want to do anything with servo after running the unit tests. This PR makes sure to rebuild after running./mach test-unit.I'm not familiar enough with cargo yet to know why it's doing this or what better alternatives there are to fixing this. Having to rebuild afterwards feels pretty ugly to me, but my rationalization right now is that the time it takes to build is negligible in comparison to the time it takes to run the tests. Ideally, this should be something we could take care of in Cargo.toml, but again, I'm new to this (and the documentation seems less than helpful from what I can tell so far).
I won't be available for the rest of the day, so if anyone has suggestions, or wants to wait for a better solution, I'll get back to it tomorrow probably. Otherwise, this PR at least makes
./mach testwork properly, so there's that.