99 Commits

Author SHA1 Message Date
bl2e
1f2de1e0a7 Add test for cargo install option --target-dir 2020-06-20 17:50:20 -07:00
kellda
1e0d38061c Add test for cargo install --index 2020-06-10 15:26:26 +00:00
Eric Huss
80e55c774b Fix tests with enoent error message on non-english systems. 2020-05-29 12:34:17 -07:00
Daniel Wagner-Hall
556c236f9a Bump to semver 0.10 for VersionReq::is_exact
This stops using `to_string` as a proxy for this now-provided precise API.

This reverts commit b71927224fd9306b2b5bd2b4f8c22268eadfeb6a and bupms the
dependency version in Cargo.toml.
2020-05-25 11:11:45 +01:00
Daniel Wagner-Hall
b71927224f Switch to using existing is_locked implementation
semver hasn't merged the upstream PR (yet)
2020-05-20 20:38:23 +01:00
Daniel Wagner-Hall
624ce68126 Merge branch 'master' into trywithout 2020-05-02 11:50:14 +01:00
Eric Huss
5bd74c41c4 Fix error with git repo discovery and symlinks. 2020-04-30 13:45:58 -07:00
Daniel Wagner-Hall
ad065e7414 Merge branch 'master' into trywithout 2020-04-20 22:52:35 +01:00
Odin Dutton
0c14dc2e74 Improve error message when running cargo install . 2020-04-20 13:16:11 +10:00
Eric Huss
4ae79d2ffd Use fs helpers instead of File functions. 2020-04-17 07:56:16 -07:00
Daniel Wagner-Hall
137e518d98 Explicitly check whether installed first instead 2020-03-21 00:04:17 +00:00
Matthias Krüger
1d912002e9 fix most remaining clippy findings (mostly redundant imports) 2020-02-21 12:15:16 +01:00
Christian Duerr
ae8dee513d
Test that git install reads virtual manifest 2020-01-20 00:41:30 +01:00
Christian Duerr
a08fe088b3
Fix failing test 2020-01-20 00:41:30 +01:00
Eric Huss
00a47302dd Fixes for some test errors on Windows. 2019-12-19 09:44:02 -08:00
Eric Huss
83571aee56 Minor testsuite organization. 2019-11-24 18:42:45 -08:00
Eric Huss
f7b29716ed Stabilize install-upgrade. 2019-11-11 14:47:48 -08:00
Eric Huss
d6d15141f8 Wrap some really long lines.
These do not wrap due to https://github.com/rust-lang/rustfmt/issues/3863.
2019-10-18 15:17:59 -07:00
Jonas Schievink
26229cd8ad Uncapitalize "Could not compile" error message
"could not compile ..." matches other Cargo and rustc errors and
warnings better.
2019-09-17 00:50:49 +02:00
Alex Crichton
ebd10526f3 Run rustfmt 2019-09-16 12:00:12 -07:00
Alex Crichton
9115b2c326 Extract support directory to its own crate
Extract out all our test support code to its own standalone crate so it
can be shared between multiple test suites if necessary.
2019-09-16 11:47:09 -07:00
Eric Huss
5a59b80966 cargo install: Remove orphaned executables. 2019-08-12 21:44:14 -07:00
Eric Huss
a4e9611453 Fix some formatting for some strings. 2019-07-13 16:00:47 -07:00
Jethro Beekman
0e0d968825 Update #[test] attribute on all tests in the testsuite
sed -i 's/^#\[test\]/#[cargo_test]/' $(rg -l '^#\[test\]')

Manual fixes:
* proc_macro::proc_macro_doctest
2019-06-07 12:41:26 -07:00
Eric Huss
87449f453b Remove unnecessary calls to masquerade_as_nightly_cargo.
These are not needed anymore.
2019-05-09 10:58:18 -07:00
Eric Huss
eae89007a6 Make --locked required for cargo install --path, too. 2019-04-16 08:54:24 -07:00
Eric Huss
3d89379367 cargo install: Ignore Cargo.lock for non --path installs.
Requires `--locked` to use Cargo.lock for registry and git installs.
2019-04-16 08:54:24 -07:00
Eric Huss
e023a6672b Add install-upgrade. 2019-04-02 08:40:34 -07:00
Eric Huss
fe8f29432d Allow cargo install --path P to load config from P. 2019-03-31 17:13:44 -07:00
Eric Huss
0b2b10b73c Cleanup: Misc. 2019-03-26 19:06:08 -07:00
Eric Huss
50277e88fe Testsuite: remove some unnecessary is_nightly checks. 2019-03-26 13:56:14 -07:00
Eric Huss
e7124ba262 Testsuite: Make cwd() relative to project root.
It's a fairly common pattern, and it seemed natural to me.
2019-03-20 16:34:56 -07:00
Alexander Regueiro
f7c91ba622
Various cosmetic improvements. 2019-02-20 10:58:27 +00:00
Eric Huss
3378a5a15c Better error message for bad manifest with cargo install.
The old code assumed that any error loading a manifest meant that the
manifest didn't exist, but there are many other reasons it may fail.
Add a few helpful messages for some common cases.
2019-01-17 12:59:43 -08:00
Eric Huss
f58d107e7c testsuite: Require failing commands to check output. 2018-12-28 17:59:36 -08:00
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
bors
18c8c5fb99 Auto merge of #6065 - zachlute:change-project-to-package, r=dwijnand
Replace 'project' with 'package' in many strings and comments.

Partial fix for #6056.

Shouldn't be anything too interesting or surprising in here.

Still need to do documentation, but will do that as a different PR.
2018-09-21 23:34:08 +00:00
Alex Crichton
d9534bf498 Only load ~/.cargo/config for cargo install
This commit tweaks how configuration is loaded for `cargo install`, ensuring
that we only load configuration from `$HOME` instead of the current working
directory. This should make installations a little more consistent in that they
probably shouldn't cover project-local configuration but should respect global
configuration!

Closes #6025
2018-09-21 13:21:32 -07:00
Zach Lute
3492a3905c Replace 'project' with 'package' in many strings and comments. 2018-09-20 23:47:09 -07:00
Dale Wijnand
494fdabe2f
If creating a new GitSource, updating it is required before querying it 2018-09-20 11:10:24 +01:00
Alex Crichton
e2637b6599 Review comments! 2018-09-18 11:33:18 -07:00
Zach Lute
b020d3789a Resolve merge conflicts with test string changes. 2018-09-09 16:48:57 -07:00
bors
5984312202 Auto merge of #5990 - dwijnand:no-crates.io-index-url, r=alexcrichton
Don't print crates.io-index URL when Updating

Following the lead from PackageId's Display, only display the registry's
URL if it's not the default registry (aka crates.io).

Before:

    $ cargo install lazy_static
        Updating registry `https://github.com/rust-lang/crates.io-index`

After:

    $ dcargo install lazy_static
        Updating crates.io index

Fixes #4208
2018-09-09 21:06:13 +00:00
Dale Wijnand
41aa6fbab4
Update tests to new Updating msg format 2018-09-08 10:23:57 +01:00
Zach Lute
89f43938fe Print file paths instead of file:// URLs.
This change ensures cargo will output file paths in the expected format
(C:\foo\... on Windows, /foo/... elsewhere). Previously it would output
file:// URLs instead.

To support this change, additional changes were made to the test suite
string processing such that [ROOT] is now replaced with the appropriate
file path root for the platform.

The CWD template was also updated to use [CWD] like other replacement
templates and to do the replacement on the expected value rather than
the actual value to avoid replacing things we don't expect with CWD.
2018-09-07 19:42:59 -07:00
Dale Wijnand
3b786a0dfd
Simplify test::install_ignores_cargo_config 2018-09-06 07:37:01 +01:00
Dale Wijnand
d036024000
Fix change in install::install_ignores_cargo_config 2018-09-06 07:36:54 +01:00
Dale Wijnand
4415c72828
Remove/reworksome redundant .cwd(p.root()) in tests 2018-09-06 01:12:53 +01:00
Matthias Krüger
2cd9cce6e3 clippy: resolve all warnings about useless format!() 2018-09-03 11:38:29 +02:00