rustdoc-gui-test: pass a camino::Utf8PathBuf to compiletest

This commit is contained in:
Jieyou Xu 2025-04-12 12:32:27 +08:00
parent e24b0c8e0a
commit 957324b0a0
No known key found for this signature in database
GPG Key ID: 045B995028EA6AFC
3 changed files with 7 additions and 1 deletions

View File

@ -4672,6 +4672,7 @@ name = "rustdoc-gui-test"
version = "0.1.0"
dependencies = [
"build_helper",
"camino",
"compiletest",
"getopts",
"walkdir",

View File

@ -5,6 +5,7 @@ edition = "2021"
[dependencies]
build_helper = { path = "../../build_helper" }
camino = "1"
compiletest = { path = "../compiletest" }
getopts = "0.2"
walkdir = "2"

View File

@ -118,7 +118,11 @@ If you want to install the `browser-ui-test` dependency, run `npm install browse
..Default::default()
};
let test_props = TestProps::from_file(&librs, None, &compiletest_c);
let test_props = TestProps::from_file(
&camino::Utf8PathBuf::try_from(librs).unwrap(),
None,
&compiletest_c,
);
if !test_props.compile_flags.is_empty() {
cargo.env("RUSTDOCFLAGS", test_props.compile_flags.join(" "));