375 Commits

Author SHA1 Message Date
Lukas Lueg
257c23323d Do not allow crate-type or proc-macro for [[bin]]-targets
in the current workspace.

Fixes #5199.
2018-03-20 16:51:03 +01:00
Ximin Luo
0bc1155753 Split tests, apparently cargo clean does not work well on windows 2018-03-19 18:20:54 +01:00
Aleksey Kladov
e5971b935c Slightly improve ergonomics of writing Cargo tests 2018-03-17 00:08:23 +03:00
Ximin Luo
0bf8e541db Add tests for --all-targets 2018-03-15 17:08:40 +01:00
Ximin Luo
89d274875f Revert "Work around #5134 for now"
This reverts commit d46db71b3ff17dfc0f4be6308c8b94613d65a572.
2018-03-15 17:05:13 +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
Aleksey Kladov
f930609404 Don't check for filenames in message-format tests
Depending on the OS, there might be an additional artifacts for
debuginfo (dSYM folder for macs, .pbd file for windows). Given that we
can't disable `.pdb` for windows[1], let's just ignore all filenames!

[1]: https://github.com/rust-lang/rust/pull/28505)
2018-03-15 00:37:26 +03:00
Aleksey Kladov
9c0d3f2980 Copy .pdb files to target directory
`.pdb` files are for windows debug info (unlike on linux, debug info is
in a separate file). Windows executable actually hard-code paths to
`.pdb` files, so debugging mvsc rust programs works even without this
patch. However, if you want to distribute the executable to other
machines, you'd better distribute both `foo.exe` and `foo.pdb`, because
absolute paths won't work on another machine. Having same-named .pdb
file alongside the binary would work though.

closes #4960
2018-03-14 22:31:19 +03:00
bors
3cfb23bc56 Auto merge of #5152 - matklad:clap, r=alexcrichton
Clap

Reopening of #5129

So, looks like all tests are 🍏 on my machine!

I definitely want to refactor it some more, and also manually checked that we haven't regressed any help messages, but all the major parts are in place already.
2018-03-13 14:46:45 +00:00
Aleksey Kladov
a64df78ea6 Relax tests for windows
On windows, clap prints `cargo.exe` rather than just `cargo`.
2018-03-10 18:46:32 +03:00
bors
d147e10374 Auto merge of #5126 - gilescope:cycle-error-message, r=alexcrichton
Error message for package "depends on itself" lists the packages in the cycle.

I got a cycle while trying to build someone else's code and cargo's error message didn't point me in the right direction, just mentioned there was a cycle. I thought we could be a bit more helpful.

Don't know what you think of {:#?} as the display but it seemed minimal code so I thought I'd start with that. I could compress the output to one package per line if preferred.
2018-03-09 19:40:03 +00:00
Aleksey Kladov
67968e6b0e Validate that jobs argument is a number 2018-03-09 11:05:47 +03:00
Aleksey Kladov
31ea0d93f7 Fix some trivially fixable tests 2018-03-08 23:31:56 +03:00
Aleksey Kladov
178b16d12b Temporarly ignore some tests 2018-03-08 23:30:46 +03:00
Giles Cope
74deb8c96d Switch to exhaustive matches in tests. 2018-03-08 18:37:30 +00:00
Giles Cope
32c7ac144b As pointed out by Jacob, we can display the ordered cycle in the error message. 2018-03-07 22:56:47 +00:00
Ximin Luo
d46db71b3f Work around #5134 for now 2018-03-07 14:46:43 +01:00
Giles Cope
3cd7708774 Neater error message. Tests now check the cycle is output. 2018-03-06 09:30:37 +00:00
Giles Cope
2ee2741e80 Error message for package cycles lists the packages in the cycle. 2018-03-06 00:41:21 +00:00
Ximin Luo
9c5eecd419 Merge remote-tracking branch 'upstream/master' into pr4988 2018-03-03 12:56:08 +01:00
Timothy Bess
05b896ac90 Issue #5087
* targeted error message for virtual manifests
* assert correct error message
2018-02-28 16:43:08 -05:00
Timothy Bess
68a681ff03 Issue #5087
* remove Workspace::current_manifest
* remove incorrect logging
* move empty check to Packages::into_package_id_specs
* add test case mentioned in issue
2018-02-27 21:37:40 -05:00
Eh2406
68a40ad42b Merge remote-tracking branch 'origin/master' into links 2018-02-21 15:41:48 -05:00
André Rocha
c2ff988c9f Reorganize integration tests as one crate with many modules. Issue #4867. 2018-02-21 13:33:51 -05:00