Commit graph

83 commits

Author SHA1 Message Date
Alex Crichton fecb724643 Format with cargo fmt 2018-12-08 03:19:47 -08:00
Dale Wijnand 04ddd4d0fc
Upgrade to Rust 2018 2018-12-06 20:18:35 +01:00
Eric Huss 61f9588cfd Don't hardlink rmeta files. 2018-11-08 21:05:17 -08:00
David Tolnay d1218d2961
Fix missing messages when --message-format=json is deeply nested
This commit switches from serde_json::Value to RawValue, which can
process arbitrarily deeply nested JSON content without recursion.
2018-09-23 14:12:10 -07:00
kennytm 4779dbfe85
Update the testsuite to include the explicit '--color' flags. 2018-09-12 11:59:08 +08:00
Dale Wijnand 9b67b272ba
Don't use an empty RUSTC_WRAPPER 2018-09-06 08:09:08 +01:00
Dale Wijnand 570fe8927d
Remove hamcrest existing_file() 2018-08-29 10:26:12 +02:00
Dale Wijnand 85984a8700
Migrate from tests fom assert_that/execs to .run() 2018-08-28 15:08:12 +02:00
Dale Wijnand 511d4bc503
Collapse multiline ProcessBuilder::arg calls in tests
.. by calling this a bunch of times:

    fastmod --multiline '\.cargo\("([^"]+)"\).[ ]+\.arg\("([^"]+)"\)' '.cargo("${1} ${2}")' tests/testsuite/
2018-08-18 15:12:54 +01:00
Dale Wijnand af4f1392f7
Collapse ProcessBuilder::arg calls in tests
.. with mutliple calls of:

    fastmod --accept-all '\.cargo\("([^"]+)"\)\.arg\("([^"]+)"\)' '.cargo("${1} ${2}")' tests/testsuite/

until no changes are left.
2018-08-18 15:05:45 +01:00
Dale Wijnand a14f7fe024
Add a test for "cargo check --message-format=short" 2018-08-10 08:22:39 +01:00
Dale Wijnand 16aeb0cd4f
Default test support's Execs to exit code 0 2018-08-03 07:44:42 +01:00
Dale Wijnand 05400b8018
Drop the [/] test output macro 2018-08-02 10:18:48 +01:00
Dale Wijnand ca7d9ee292
Declare one-line files on one line, in test projects 2018-07-25 09:58:50 +01:00
Dale Wijnand ab19c48358
Dedup a bunch more manifest 2018-07-25 00:43:30 +01:00
Dale Wijnand 081e7930d2
Drop now unnecessary basic manifests 2018-07-24 16:33:55 +01: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
Dale Wijnand f8c9928cc1
Rework some test projects to use the "foo" default
Generally that means either switching "foo" and "bar" around (reversing
the arrow), or it means push "foo" to "bar" (and sometimes "bar" to
"baz", etc..) to free up "foo".

For trivia that leaves 80/1222 outliers, therefore 93.4% of test
project use the default. :)
2018-07-21 19:40:45 +01:00
Dale Wijnand 7fe2fbc8a3
Remove the argument from the project test support function
By rewriting the tests, with rerast (https://github.com/google/rerast),
to use the newly introduced "at" method.

First I added the following temporary function to cargotest::support:

    pub fn project_foo() -> ProjectBuilder {
        project("foo")
    }

Then I defined the following rewrite.rs:

    use cargotest::support::{ project, project_foo };

    fn rule1(a: &'static str) {
        replace!(project("foo") => project_foo());
        replace!(project(a) => project_foo().at(a));
    }

Then I ran rerast:

    cargo +nightly rerast --rules_file=rewrite.rs --force --targets tests --file tests/testsuite/main.rs

Finally I searched and replaced the references to project_foo with
argument-less project (a little awkardly on macOS with a git clean).

    find tests -type f -exec sed -i -e 's/project_foo/project/g' {} +
    git clean -d tests
2018-07-20 13:31:50 +01:00
Alex Crichton 5e76cbc55a Fix mode generated in maybe_lib
The new `mode` for the library dependency is dependent on the library target
rather than the target which is the reason for the dependency on the library!

Closes rust-lang/rust#50640
2018-05-11 08:04:55 -07:00
Eric Huss f4dc629d9e Fix broken test. 2018-05-10 08:46:02 -07:00
Eric Huss 27edc433c9 Be more conservative about which files are linked to the output dir.
This changes it so that only top-level targets requested on the command-line will be included in the output directory.  Dependencies are no longer included.

Fixes #5444.
2018-05-10 08:46:02 -07:00
Eric Huss ec7be849e3 Some test cleanup for profiles. 2018-04-27 13:42:30 -07:00
Eric Huss 7dc9e071c7 Minor tweaks on how examples are handled with tests, and some panic propagation. 2018-04-27 13:42:30 -07:00
Eric Huss 575d6e819c Profile Overrides (RFC #2282 Part 1) 2018-04-27 13:22:00 -07:00
Aleksey Kladov 14067b952e Remove some is_nightly checks from tests 2018-04-22 18:08:31 +03:00
Eric Huss e7896a2f68 Fix with_*_does_not_contain to support [..] and macro matching. 2018-04-18 22:13:30 -07:00
Ximin Luo 0bc1155753 Split tests, apparently cargo clean does not work well on windows 2018-03-19 18:20:54 +01:00
Ximin Luo 0bf8e541db Add tests for --all-targets 2018-03-15 17:08:40 +01:00
Aleksey Kladov b0c181d91c Prettify rustfmted single-line strings 2018-03-14 17:48:44 -07:00
Alex Crichton 1e6828485e cargo fmt 2018-03-14 17:48:23 -07:00
Alex Crichton 2a063798eb Drop outdated hamcrest dependency
This hasn't been updated in awhile and in general we've been barely using it.
This drops the outdated dependency and vendors a small amount of the
functionality that it provided. I think eventually we'll want to transition away
from this method of assertions but I wanted to get this piece in to avoid too
much churn in one commit.
2018-03-01 11:03:54 -08:00
André Rocha c2ff988c9f Reorganize integration tests as one crate with many modules. Issue #4867. 2018-02-21 13:33:51 -05:00
Renamed from tests/check.rs (Browse further)