Commit Graph

6321 Commits

Author SHA1 Message Date
bors
50e1e53f0e Auto merge of #14132 - heisen-li:cre_cro_cus, r=weihanglo
test: Migrate some files to snapbox

### What does this PR try to resolve?
```
 tests/testsuite/credential_process.rs
 tests/testsuite/cross_compile.rs
 tests/testsuite/cross_publish.rs
 tests/testsuite/custom_target.rs
```
part of #14039
2024-06-30 17:05:33 +00:00
bors
814f91854a Auto merge of #14167 - weihanglo:fix-test-assertion, r=ehuss
test:  fix several assertions

These were found during submodule update. See each commit for details.

```console
---- git::use_the_cli stdout ----
running `/projects/rust/build/aarch64-apple-darwin/stage2-tools/aarch64-apple-darwin/release/cargo check -v`
thread 'git::use_the_cli' panicked at tests/testsuite/git.rs:2872:10:

---- expected: tests/testsuite/git.rs:2854:18
++++ actual:   stderr
   1    1 | [UPDATING] git repository `[ROOTURL]/dep1`
   2    2 | [RUNNING] `git fetch --verbose --force --update-head-ok [..][ROOTURL]/dep1[..] [..]+HEAD:refs/remotes/origin/HEAD[..]`
   3    3 | From [ROOTURL]/dep1
   4      -  * [new ref]         HEAD       -> origin/HEAD
        4 +  * [new ref]                    -> origin/HEAD
   5    5 | [LOCKING] 2 packages to latest compatible versions
   6    6 | [CHECKING] dep1 v0.5.0 ([ROOTURL]/dep1#[..])
   7    7 | [RUNNING] `rustc --crate-name dep1 [..]`
   8    8 | [CHECKING] foo v0.5.0 ([ROOT]/foo)
   9    9 | [RUNNING] `rustc --crate-name foo [..]`
  10   10 | [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s

Update with SNAPSHOTS=overwrite

---- publish_lockfile::note_resolve_changes stdout ----
running `/projects/rust/build/aarch64-apple-darwin/stage2-tools/aarch64-apple-darwin/release/cargo generate-lockfile`
running `/projects/rust/build/aarch64-apple-darwin/stage2-tools/aarch64-apple-darwin/release/cargo package --no-verify -v --allow-dirty`
thread 'publish_lockfile::note_resolve_changes' panicked at tests/testsuite/publish_lockfile.rs:247:10:

---- expected: tests/testsuite/publish_lockfile.rs:234:27
++++ actual:   stderr
   1    1 | [PACKAGING] foo v0.0.1 ([ROOT]/foo)
   2    2 | [ARCHIVING] Cargo.lock
   3    3 | [UPDATING] `dummy-registry` index
   4    4 | [NOTE] package `multi v0.1.0` added to the packaged Cargo.lock file, was originally sourced from `[ROOT]/foo/multi`
   5    5 | [NOTE] package `patched v1.0.0` added to the packaged Cargo.lock file, was originally sourced from `[ROOT]/foo/patched`
   6    6 | [ARCHIVING] Cargo.toml
   7    7 | [ARCHIVING] Cargo.toml.orig
   8    8 | [ARCHIVING] src/main.rs
   9    9 | [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed)
  10      - [WARNING] no (git) Cargo.toml found at `target/tmp/[..]/foo/Cargo.toml` in workdir `[..]`
       10 + [WARNING] no (git) Cargo.toml found at `build/[HOST_TARGET]/stage2-tools/[HOST_TARGET]/tmp/cit/t2393/foo/Cargo.toml` in workdir `/projects/rust/`
```
2024-06-29 12:35:34 +00:00
Weihang Lo
fb56fffbb1
test: omit target-dir name (again)
See commit 47ddb3a57d
2024-06-28 22:42:25 -04:00
Weihang Lo
d8eed0785c
test: relax git cli assertion
See commit 51ebba2fc1
2024-06-28 22:32:13 -04:00
bors
9f6247ce71 Auto merge of #14166 - eth3lbert:snapbox-features-unordered, r=epage
test: replace glob with explicit unordered calls

### What does this PR try to resolve?

This PR replace glob,  which previously addressed ordering issues, with explicit `unordered()` calls.
2024-06-29 02:19:51 +00:00
eth3lbert
bf3ca3cc64
test: replace glob with explicit unordered calls 2024-06-29 07:59:35 +08:00
bors
9441b91186 Auto merge of #14159 - dieterplex:migrate-git-snapbox, r=weihanglo
test: Migrate git to snapbox

Part of #14039.

There is a case need to modify regex for file size redaction.
2024-06-28 13:05:10 +00:00
d1t2
32cdb261ef
test: Migrate git to snapbox 2024-06-28 17:39:24 +08:00
bors
80091058fe Auto merge of #14158 - eth3lbert:snapbox-l, r=epage
test: migrate some files to snapbox

### What does this PR try to resolve?

Part of https://github.com/rust-lang/cargo/issues/14039.

Migrate following to snapbox:

- `tests/testsuite/local_registry.rs`
- `tests/testsuite/locate_project.rs`
- `tests/testsuite/lockfile_compat.rs`
- `tests/testsuite/login.rs`
- `tests/testsuite/logout.rs`
2024-06-28 02:59:26 +00:00
eth3lbert
8a3787ed59
test: migrate logout to snapbox 2024-06-28 10:20:28 +08:00
eth3lbert
56471efb3f
test: migrate login to snapbox 2024-06-28 10:20:28 +08:00
eth3lbert
6d0825dc29
test: migrate lockfile_compat to snapbox 2024-06-28 10:20:28 +08:00
eth3lbert
02c0f7ef57
test: migrate locate_project to snapbox 2024-06-28 10:20:28 +08:00
eth3lbert
c3327ed04a
test: migrate local_registry to snapbox 2024-06-28 10:20:28 +08:00
bors
6ed64a7841 Auto merge of #14149 - eth3lbert:snapbox-registry, r=weihanglo
test: migrate registry and registry_auth to snapbox

### What does this PR try to resolve?

Part of https://github.com/rust-lang/cargo/issues/14039.

Migrate following to snapbox:

- `tests/testsuite/registry.rs`
- `tests/testsuite/registry_auth.rs`

### Additional information

Parameterize shared logic over inline snapshots to prevent the content from being appended multiple times in `str![]` when it's called multiple times within a reusable function.

Big thanks to `@weihanglo` for helping me out!
2024-06-27 18:09:02 +00:00
eth3lbert
b7c005459c
test: migrate registry_auth to snapbox 2024-06-27 22:41:17 +08:00
eth3lbert
a00d03fd39
test: migrate registry to snapbox 2024-06-27 22:41:17 +08:00
bors
0664c7e44a Auto merge of #14130 - eth3lbert:snapbox-package-n-publish, r=epage
test: migrate package* and publish* to snapbox

### What does this PR try to resolve?

Part of https://github.com/rust-lang/cargo/issues/14039.

Migrate following to snapbox:

- `tests/testsuite/package.rs`
- `tests/testsuite/package_features.rs`
- `tests/testsuite/publish.rs`
- `tests/testsuite/publish_lockfile.rs`
2024-06-27 11:11:29 +00:00
bors
2607661b39 Auto merge of #14049 - tweag:issue-12425-more-tests, r=epage
More `update --breaking` tests

Related to https://github.com/rust-lang/cargo/issues/12425#issuecomment-2161374345 in #12425.
2024-06-27 10:35:36 +00:00
Tor Hovland
f41bdc142b fix: update --breaking now handles mixed renaming and pinning. 2024-06-27 09:12:10 +02:00
Tor Hovland
f096a9446f fix: update --breaking now understands package@version. 2024-06-27 09:12:10 +02:00
Tor Hovland
8882d0504e test: More update --breaking tests. 2024-06-27 09:12:10 +02:00
Tor Hovland
abc86e24c8 refactor: Clean up test output and tracing, and introduce variable. 2024-06-27 09:12:10 +02:00
eth3lbert
a2b706b73b
test: migrate publish_lockfile to snapbox 2024-06-27 13:55:55 +08:00
eth3lbert
798108d047
test: migrate publish to snapbox 2024-06-27 12:55:35 +08:00
eth3lbert
a625d20b03
test: migrate package_features to snapbox 2024-06-27 12:55:34 +08:00
eth3lbert
5efed1bfdf
test: migrate package to snapbox 2024-06-27 12:55:34 +08:00
bors
c81c32bf2a Auto merge of #14096 - dieterplex:migrate-clean-snapbox, r=weihanglo
test: migrate clean to snapbox

Part of #14039, migrating `tests/testsuite/clean.rs` to snapbox.
2024-06-26 20:19:49 +00:00
bors
c7cb45c0fd Auto merge of #14153 - Urgau:builtin_cfgs_lint, r=ehuss
Allow `unexpected_builtin_cfgs` lint in `user_specific_cfgs` test

### What does this PR try to resolve?

This PR allows the to be added `unexpected_builtin_cfgs` lint from https://github.com/rust-lang/rust/pull/126158 in the `user_specific_cfgs_are_filtered_out` test in order to be able to merge the lint in rust-lang/rust CI.

### How should we test and review this PR?

The new lint is described in https://github.com/rust-lang/rust/pull/126158#issue-2341646795 and testing should be "as simple" as executing the test with my rustc branch.

### Additional information

https://github.com/rust-lang/rust/pull/126158#issuecomment-2190730869 shows the test failing with the addition of the lint.
2024-06-26 16:03:23 +00:00
bors
05a095143a Auto merge of #14151 - eth3lbert:snapbox-s, r=epage
test: migrate search, source_replacement and standard_lib to snapbox

### What does this PR try to resolve?

Part of https://github.com/rust-lang/cargo/issues/14039.

Migrate following to snapbox:

- `tests/testsuite/search.rs`
- `tests/testsuite/source_replacement.rs`
- `tests/testsuite/standard_lib.rs`
2024-06-26 15:29:16 +00:00
d1t2
1794ce42f4
test: Revert clean_dry_run for expected path not normalized 2024-06-26 17:40:58 +08:00
d1t2
b3a9decdac
test: migrate clean to snapbox 2024-06-26 17:28:23 +08:00
Urgau
ee23df9633 Allow unexpected_builtin_cfgs lint in user_specific_cfgs test 2024-06-26 08:08:36 +02:00
eth3lbert
d025f14904
test: migrate standard_lib to snapbox 2024-06-26 10:50:41 +08:00
bors
ec77aa9656 Auto merge of #14143 - heisen-li:dep_dia_dir, r=weihanglo
test: migrate `dep_info/diagnostics/direct_minimal_versions` to snapbox

### What does this PR try to resolve?

Complete the migration of the following files:

```
 tests/testsuite/dep_info.rs
 tests/testsuite/diagnostics.rs
 tests/testsuite/direct_minimal_versions.rs
```
part of #14039
2024-06-25 23:00:06 +00:00
eth3lbert
bfe790660e
test: migrate source_replacement to snapbox 2024-06-26 05:49:32 +08:00
eth3lbert
089dd68d87
test: migrate search to snapbox 2024-06-26 05:49:31 +08:00
bors
4ed7bee47f Auto merge of #14142 - weihanglo:fix-test, r=epage
test: omit target-dir name

This was found during submodule update in rust-lang/rust repo.

```
---- publish_lockfile::note_resolve_changes stdout ----
thread 'publish_lockfile::note_resolve_changes' panicked at tests/testsuite/publish_lockfile.rs:255:10:

error: Expected lines did not match (ignoring order):
0   6        Packaging foo v0.0.1 ([..])
1   0        Archiving Cargo.lock
2   0        Archiving Cargo.toml
3   1        Archiving Cargo.toml.orig
4   0        Archiving src/main.rs
5   0         Updating `dummy-registry` index
6   2     note: package `multi v0.1.0` added to the packaged Cargo.lock file, was originally sourced from `[..]`
7   2     note: package `patched v1.0.0` added to the packaged Cargo.lock file, was originally sourced from `[..]`
8   0         Packaged 4 files, 2.1KiB (1.1KiB compressed)
9        -warning: no (git) Cargo.toml found at `target/tmp/[..]/foo/Cargo.toml` in workdir `[..]`
    9    +warning: no (git) Cargo.toml found at `build/aarch64-apple-darwin/stage2-tools/aarch64-apple-darwin/tmp/cit/t0/foo/Cargo.toml` in workdir `[..]`
```
2024-06-25 16:28:22 +00:00
l00556901
113dcf6208 test: migrate direct_minimal_versions to snapbox 2024-06-26 00:22:01 +08:00
l00556901
11506bbd9a test: migrate diagnostics to snapbox 2024-06-26 00:21:20 +08:00
l00556901
f05a896ac3 test: migrate dep_info to snapbox 2024-06-26 00:20:31 +08:00
Weihang Lo
47ddb3a57d
test: omit target-dir name
This was found during submodule update in rust-lang/rust repo.

```
error: Expected lines did not match (ignoring order):
0   6        Packaging foo v0.0.1 ([..])
1   0        Archiving Cargo.lock
2   0        Archiving Cargo.toml
3   1        Archiving Cargo.toml.orig
4   0        Archiving src/main.rs
5   0         Updating `dummy-registry` index
6   2     note: package `multi v0.1.0` added to the packaged Cargo.lock file, was originally sourced from `[..]`
7   2     note: package `patched v1.0.0` added to the packaged Cargo.lock file, was originally sourced from `[..]`
8   0         Packaged 4 files, 2.1KiB (1.1KiB compressed)
9        -warning: no (git) Cargo.toml found at `target/tmp/[..]/foo/Cargo.toml` in workdir `[..]`
    9    +warning: no (git) Cargo.toml found at `build/aarch64-apple-darwin/stage2-tools/aarch64-apple-darwin/tmp/cit/t0/foo/Cargo.toml` in workdir `[..]`
```
2024-06-25 12:20:12 -04:00
eth3lbert
0290ea0996
test: migrate owner to snapbox 2024-06-25 18:46:54 +08:00
eth3lbert
145145a83f
test: migrate open_namespaces to snapbox 2024-06-25 18:46:52 +08:00
eth3lbert
a9fec1b37b
test: migrate offline to snapbox 2024-06-25 15:21:24 +08:00
Esteban Küber
af3f95d3a3 Change tests to support rustc wording changes
Between https://github.com/rust-lang/rust/pull/126810 and https://github.com/rust-lang/rust/pull/126810
the output of `rustc` for resolution errors is going to change in such a
way that some existing cargo tests will fail. Change them to support
both the current and future output, so that those PRs can land in
`rustc`.
2024-06-25 01:16:48 +00:00
l00556901
b1a157f47b test: migrate custom_target to snapbox 2024-06-24 23:15:30 +08:00
l00556901
7ba60768c9 test: migrate cross_publish to snapbox 2024-06-24 23:15:01 +08:00
l00556901
d53fd53d1f test: migrate cross_compile to snapbox 2024-06-24 23:14:29 +08:00
l00556901
c07bd2a7e1 test: migrate credential_process to snapbox 2024-06-24 23:13:55 +08:00