You don't need y.sh prepare to build, only to test

Also improve the error message when trying to test without having run
y.sh prepare first.
This commit is contained in:
bjorn3 2025-02-26 11:05:26 +00:00
parent 4698eb6276
commit e173b714aa
2 changed files with 8 additions and 1 deletions

View file

@ -49,13 +49,13 @@ If you want to build the backend manually, you can download it from GitHub and b
```bash
$ git clone https://github.com/rust-lang/rustc_codegen_cranelift
$ cd rustc_codegen_cranelift
$ ./y.sh prepare
$ ./y.sh build
```
To run the test suite replace the last command with:
```bash
$ ./y.sh prepare # only needs to be run the first time
$ ./test.sh
```

View file

@ -91,6 +91,13 @@ impl GitRepo {
fn verify_checksum(&self, dirs: &Dirs) {
let download_dir = self.download_dir(dirs);
if !download_dir.exists() {
eprintln!(
"Missing directory {download_dir}: Please run ./y.sh prepare to download.",
download_dir = download_dir.display(),
);
std::process::exit(1);
}
let actual_hash = format!("{:016x}", hash_dir(&download_dir));
if actual_hash != self.content_hash {
eprintln!(