`update_exact` test failed if `git depth` equals to 1
Open
Nobody has claimed this yet.
bug
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 22h 40m
- Merged PRs (30d)
- 46
Description
Problem
update_exact test failed if git depth equals to 1
Steps
Run these commands (Travis buildlog):
% git clone --depth 1 https://github.com/rust-lang/rustup.rs
% cargo test --test cli-self-upd --target x86_64-unknown-linux-gnu --features vendored-openssl -- update_exact
running 2 tests
test rustup_self_update_exact ... ok
test update_exact ... FAILED
failures:
---- update_exact stdout ----
running "/home/lzutao/rust-fork/rustup.rs/target/tests/rustup-exe.9r2QibNMrMCh/rustup" "set" "default-host" "x86_64-unknown-linux-gnu"
status: exit code: 0
----- stdout
----- stderr
running "/home/lzutao/rust-fork/rustup.rs/target/tests/rustup-exe.9r2QibNMrMCh/rustup-init" "-y"
status: exit code: 0
----- stdout
stable installed - 1.1.0 (hash-s-2)
Rust is installed now. Great!
To get started you need Cargo's bin directory
(/home/lzutao/rust-fork/rustup.rs/target/tests/rustup-cargo.ctxqsympdsec/ch/bin)
in your PATH environment variable. Next time you log in this will be done
automatically.
To configure your current shell run
source /home/lzutao/rust-fork/rustup.rs/target/tests/rustup-cargo.ctxqsympdsec/ch/env
----- stderr
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2015-01-02, rust version 1.1.0
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'cargo'
info: downloading component 'rust-docs'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'cargo'
info: installing component 'rust-docs'
info: default toolchain set to 'stable'
running "/home/lzutao/rust-fork/rustup.rs/target/tests/rustup-exe.9r2QibNMrMCh/rustup" "self" "update"
status: exit code: 0
----- stdout
----- stderr
info: checking for self-updates
info: downloading self-update
info: rustup updated successfully to 2019-04-19
> rustup self update
out.ok: true
out.stdout (0 lines):
out.stderr (3 lines):
info: checking for self-updates
info: downloading self-update
info: rustup updated successfully to 2019-04-19
expected.ok: true
expected.stdout (0 lines):
expected.stderr (3 lines):
info: checking for self-updates
info: downloading self-update
info: rustup updated successfully to 1.17.0
[tests/mock/clitools.rs:228] out.stdout == stdout = true
[tests/mock/clitools.rs:229] out.stderr == stderr = false
thread 'main' panicked at 'explicit panic', tests/mock/clitools.rs:230:9
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
failures:
update_exact
test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 55 filtered out
error: test failed, to rerun pass '--test cli-self-upd'
Possible Solution(s)
Not at this time. I'm planning to have a look at git-testament crate.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the cli-self-upd test target and its update_exact test, then inspect tests/mock/clitools.rs around the reported output comparison. Read the git-testament crate as suggested and reproduce the failure from a depth-1 clone with the command in the issue. Done means update_exact passes with the shallow checkout and its expected output remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, rust
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100