Skip to content

Commit

Permalink
Auto merge of #14167 - weihanglo:fix-test-assertion, r=ehuss
Browse files Browse the repository at this point in the history
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/`
```
  • Loading branch information
bors committed Jun 29, 2024
2 parents 9f6247c + fb56fff commit 814f918
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/testsuite/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2855,7 +2855,7 @@ fn use_the_cli() {
[UPDATING] git repository `[ROOTURL]/dep1`
[RUNNING] `git fetch --verbose --force --update-head-ok [..][ROOTURL]/dep1[..] [..]+HEAD:refs/remotes/origin/HEAD[..]`
From [ROOTURL]/dep1
* [new ref] HEAD -> origin/HEAD
* [new ref] [..] -> origin/HEAD[..]
[LOCKING] 2 packages to latest compatible versions
[CHECKING] dep1 v0.5.0 ([ROOTURL]/dep1#[..])
[RUNNING] `rustc --crate-name dep1 [..]`
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/publish_lockfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ fn note_resolve_changes() {
[ARCHIVING] Cargo.toml.orig
[ARCHIVING] src/main.rs
[PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed)
[WARNING] no (git) Cargo.toml found at `target/tmp/[..]/foo/Cargo.toml` in workdir `[..]`
[WARNING] no (git) Cargo.toml found at `[..]/foo/Cargo.toml` in workdir `[..]`
"#]].unordered())
.run();
Expand Down

0 comments on commit 814f918

Please sign in to comment.