Skip to content

Commit f22b5af

Browse files
committed
rewrite error-writing-dependencies to rmake
1 parent 75ee1d7 commit f22b5af

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ run-make/emit-shared-files/Makefile
3434
run-make/emit-stack-sizes/Makefile
3535
run-make/emit-to-stdout/Makefile
3636
run-make/env-dep-info/Makefile
37-
run-make/error-writing-dependencies/Makefile
3837
run-make/export-executable-symbols/Makefile
3938
run-make/extern-diff-internal-name/Makefile
4039
run-make/extern-flag-disambiguates/Makefile

tests/run-make/error-writing-dependencies/Makefile

-8
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Invalid paths passed to rustc used to cause internal compilation errors
2+
// alongside an obscure error message. This was turned into a standard error,
3+
// and this test checks that the cleaner error message is printed instead.
4+
// See https://github.com/rust-lang/rust/issues/13517
5+
6+
use run_make_support::rustc;
7+
8+
// NOTE: This cannot be a UI test due to the --out-dir flag, which is
9+
// already present by default in UI testing.
10+
11+
fn main() {
12+
let out = rustc().input("foo.rs").emit("dep-info").out_dir("foo/bar/baz").run_fail();
13+
// The error message should be informative.
14+
out.assert_stderr_contains("error writing dependencies");
15+
// The filename should appear.
16+
out.assert_stderr_contains("baz");
17+
}

0 commit comments

Comments
 (0)