Skip to content

Fatal error when running ./x.py test without .git directory #70182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alexreg opened this issue Mar 20, 2020 · 1 comment · Fixed by #70235
Closed

Fatal error when running ./x.py test without .git directory #70182

alexreg opened this issue Mar 20, 2020 · 1 comment · Fixed by #70235
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@alexreg
Copy link
Contributor

alexreg commented Mar 20, 2020

When running ./x.py test without a Git repo (i.e., no .git directory), I get the following:

fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
thread 'main' panicked at 'command did not execute successfully: "git" "status" "--porcelain" "--untracked-files=normal"
expected success, got: exit code: 128', src/build_helper/lib.rs:131:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failed to run: /home/alexreg/src/rust-devel/fix-trait-aliases-in-objects/build/bootstrap/debug/bootstrap -i --keep-stage 0 test
Build completed unsuccessfully in 0:00:01

Apparently this is due to tidy/rustfmt. (Thanks to @Mark-Simulacrum for this suggestion.) So, if I add --exclude src/tools/tidy to the command line, it all works. However, it would be nice if it could handle no .git directory automatically.

CC @pnkfelix

@alexreg alexreg added the C-bug Category: This is a bug. label Mar 20, 2020
@jonas-schievink jonas-schievink added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Mar 20, 2020
@Mark-Simulacrum
Copy link
Member

This is coming from the recently added untracked files check; my guess is we should simply skip it if we're not in a git repository rather than panicking.

@Centril Centril added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 20, 2020
@bors bors closed this as completed in a0d6eed Mar 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants