Commit graph

33 commits

Author SHA1 Message Date
Dale Wijnand 0e031b5a96
Allow testsuite warnings in dev
This makes the deny(warnings) in the testsuite conditional on a new
"deny-warnings" feature, that is then enabled in CI.

Ideally I could use the (reasonably well established) CI env var (like
we do for proptests), but I don't know how to get the attribute to be
defined in terms of an env var.
2018-12-13 01:03:08 +00:00
Alex Crichton 92bf2c3604 Turn on Rust 2018 idiom warnings unconditionally
It may take us awhile to get used to them, so let's see how this goes!
2018-12-11 05:45:46 -08:00
Alex Crichton b8b7faee50 Run cargo fix --edition-idioms and fixup output
This gets Cargo passing the `--edition-idioms` lints and more down the
road of the 2018 edition!
2018-12-11 05:45:46 -08:00
Alex Crichton 9ebf0657e4 Remove unused imports 2018-12-08 08:21:33 -08:00
Alex Crichton fecb724643 Format with cargo fmt 2018-12-08 03:19:47 -08:00
Dale Wijnand 6d1d3a6840
Fix 2018 edition idioms 2018-12-06 20:26:07 +01:00
Eric Huss fa0787aaf7 Check for duplicate output filenames. 2018-11-12 12:07:22 -08:00
Alex Butler 49ab03e3b0
Expose manifest error chain 2018-10-12 20:54:40 +01:00
Eh2406 40d9de46d6 Merge remote-tracking branch 'origin/master' into proptest 2018-09-19 22:04:11 -04:00
Dale Wijnand 1d2e0ea107
Run the cross-compile disable check ASAP 2018-09-16 10:09:45 +01:00
Eh2406 d6258e9eb3 Merge remote-tracking branch 'origin/master' into proptest
# Conflicts:
#	tests/testsuite/resolve.rs
2018-08-30 14:32:13 -04:00
Dale Wijnand 85984a8700
Migrate from tests fom assert_that/execs to .run() 2018-08-28 15:08:12 +02:00
Eric Huss 2be857af59 Metabuild (RFC 2196) 2018-08-23 13:31:50 -07:00
Eh2406 17618869e0 cache the example url to solve performance problem 2018-08-21 16:21:53 -04:00
Eh2406 56a222cd30 a start on using proptest to fuzz the resolver 2018-08-21 14:10:14 -04:00
Matthias Krüger 8798bf0d28 fix a bunch of clippy warnings (invocation: cargo clippy --all-targets --all-features -- --cap-lints warn )
Special thanks to dwijnand for helping me with this! :)
2018-08-12 10:00:12 +02:00
Alex Crichton 152eca58d8 Fix the edition build scripts are compiled with
Previously build scripts were accidentally and unconditionally compiled with the
2015 edition, but they should instead use the edition of the `[package]` itself.

Closes #5860
2018-08-04 08:44:16 -07:00
Eh2406 7fc0dffed2 remove all of the (now) unnecessary temp file usage in tests 2018-07-26 15:10:48 -04:00
Dale Wijnand 43b42d6f4c
Reorganise the testsuite crate module hierarchy
* Collapse the nested cargotest::support module into the cargotest
  module (merge the mod.rs's)
* Rename the cargotest module to support
* Nest the top-level hamcrest module into support
2018-07-22 08:46:44 +01:00
Alex Crichton b02ba3771e Import cargo fix directly in to Cargo
This commit imports the `cargo fix` subcommand in rust-lang-nursery/rustfix
directly into Cargo as a subcommand. This should allow us to ease our
distribution story of `cargo fix` as we prepare for the upcoming 2018 edition
release.

It's been attempted here to make the code as idiomatic as possible for Cargo's
own codebase. Additionally all tests from cargo-fix were imported into Cargo's
test suite as well. After this lands and is published in nightly the `cargo-fix`
command in rust-lang-nursery/rustfix will likely be removed.

cc rust-lang/rust#52272
2018-07-16 21:58:58 -07:00
Michael Hewson d1cb78acc6 get the new test working
- Added `mod shell_quoting` to testsuite/main.rs
- fixed up errors in the test, now that the test suite knows about it
2018-07-04 11:04:10 -04:00
Eric Huss 2f7b52259b Config Profiles (RFC 2282 Part 2)
Notes:
- `-Z config-profile` CLI option is required to use.
- Config values no longer reject mixed base types (integer, string, boolean) in order to support the mixed types in profiles.
2018-05-30 17:53:41 -07:00
Mike Shal 72e6b9d326 Add --build-plan for 'cargo build'
With 'cargo build --build-plan', cargo does not actually run any
commands, but instead prints out what it would have done in the form of
a JSON data structure.

Fixes #3815
2018-05-07 17:35:47 -04:00
Eric Huss 10a6da6298 Add thorough tests for target/profile selection. 2018-04-27 13:42:30 -07:00
Eric Huss 9ca36de444 Move profile override tests to a dedicated file. 2018-04-27 13:42:30 -07:00
Aleksey Kladov 6b1dc52b86 Speedup no-op builds by caching rustc invocations 2018-04-14 13:39:59 +03:00
Aleksey Kladov 5baac6b3b8 Implement --out-dir option 2018-04-03 15:52:21 +03:00
bors 715fc78caa Auto merge of #5228 - phil-opp:target-spec, r=alexcrichton
Add support for absolute target.json paths

Builds upon https://github.com/rust-lang/rust/pull/49019 with the goal to provide a solution to https://github.com/rust-lang/cargo/issues/4905.

This PR does two things:

~~1. It appends a hash of the target path to the target folder name if a `*.json` path is passed as `--target`, like it's done in https://github.com/rust-lang/rust/pull/49019. This helps differentiating targets with the same JSON file name and avoids sysroot clashes in `xargo`.~~ See https://github.com/rust-lang/cargo/pull/5228#discussion_r176827531
2. It canonicalizes the passed target path (if it's a `*.json` path), so that the path stays valid when building dependencies and setting the `RUST_TARGET_PATH` environment variable is no longer necessary.
2018-03-26 13:00:26 +00:00
Bastien Orivel 8daf81e193 Replace tempdir by tempfile
The former has been deprecated in favor of the latter
2018-03-26 13:29:02 +02:00
Philipp Oppermann 6ab70197e5 Add custom target tests 2018-03-25 12:53:22 +02:00
Aleksey Kladov 81713956f3 Deny warnings in tests 2018-03-16 12:32:31 +03:00
Alex Crichton 51d235606a Don't abort resolution on transitive updates
This commit is directed at fixing #4127, allowing the resolver to automatically
perform transitive updates when required. A few use casese and tagged links are
hanging off #4127 itself, but the crux of the issue happens when you either add
a dependency or update a version requirement in `Cargo.toml` which conflicts
with something listed in your `Cargo.lock`. In this case Cargo would previously
provide an obscure "cannot resolve" error whereas this commit updates Cargo to
automatically perform a conservative re-resolution of the dependency graph.

It's hoped that this commit will help reduce the number of "unresolvable"
dependency graphs we've seen in the wild and otherwise make Cargo a little more
ergonomic to use as well. More details can be found in the source's comments!

Closes #4127
Closes #5182
2018-03-15 07:44:35 -07:00
Aleksey Kladov cbd14ee8f0 Use conventions to specify the integration tests 2018-03-14 14:55:19 +03:00
Renamed from tests/testsuite/lib.rs (Browse further)