Skip to content

Commit

Permalink
rewrite error-writing-dependencies to rmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed Jun 19, 2024
1 parent 75ee1d7 commit f22b5af
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ run-make/emit-shared-files/Makefile
run-make/emit-stack-sizes/Makefile
run-make/emit-to-stdout/Makefile
run-make/env-dep-info/Makefile
run-make/error-writing-dependencies/Makefile
run-make/export-executable-symbols/Makefile
run-make/extern-diff-internal-name/Makefile
run-make/extern-flag-disambiguates/Makefile
Expand Down
8 changes: 0 additions & 8 deletions tests/run-make/error-writing-dependencies/Makefile

This file was deleted.

17 changes: 17 additions & 0 deletions tests/run-make/error-writing-dependencies/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Invalid paths passed to rustc used to cause internal compilation errors
// alongside an obscure error message. This was turned into a standard error,
// and this test checks that the cleaner error message is printed instead.
// See https://github.com/rust-lang/rust/issues/13517

use run_make_support::rustc;

// NOTE: This cannot be a UI test due to the --out-dir flag, which is
// already present by default in UI testing.

fn main() {
let out = rustc().input("foo.rs").emit("dep-info").out_dir("foo/bar/baz").run_fail();
// The error message should be informative.
out.assert_stderr_contains("error writing dependencies");
// The filename should appear.
out.assert_stderr_contains("baz");
}

0 comments on commit f22b5af

Please sign in to comment.