Skip to content

Commit 0ac2fd1

Browse files
committed
Update docs and diagnostics
1 parent 74bfd94 commit 0ac2fd1

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

src/test/COMPILER_TESTS.md

+3-7
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,9 @@ check that the test compiles successfully.
140140
### Editing and updating the reference files
141141

142142
If you have changed the compiler's output intentionally, or you are
143-
making a new test, you can use the script `ui/update-references.sh` to
144-
update the references. When you run the test framework, it will report
145-
various errors: in those errors is a command you can use to run the
146-
`ui/update-references.sh` script, which will then copy over the files
147-
from the build directory and use them as the new reference. You can
148-
also just run `ui/update-all-references.sh`. In both cases, you can run
149-
the script with `--help` to get a help message.
143+
making a new test, you can pass `--bless` to the command you used to
144+
run the tests. This will then copy over the files
145+
from the build directory and use them as the new reference.
150146

151147
### Normalization
152148

src/tools/compiletest/src/runtest.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -2596,15 +2596,13 @@ impl<'test> TestCx<'test> {
25962596
}
25972597

25982598
if errors > 0 {
2599-
println!("To update references, run this command from build directory:");
2599+
println!("To update references, rerun the tests and pass the `--bless` flag");
26002600
let relative_path_to_file = self.testpaths
26012601
.relative_dir
26022602
.join(self.testpaths.file.file_name().unwrap());
26032603
println!(
2604-
"{}/update-references.sh '{}' '{}'",
2605-
self.config.src_base.display(),
2606-
self.config.build_base.display(),
2607-
relative_path_to_file.display()
2604+
"To only update this specific test, also pass `--test-args {}`",
2605+
relative_path_to_file.display(),
26082606
);
26092607
self.fatal_proc_rec(
26102608
&format!("{} errors occurred comparing output.", errors),

0 commit comments

Comments
 (0)