Always run tests from workspace directory (#6307)

This commit is contained in:
frozolotl 2025-05-20 15:54:49 +02:00 committed by GitHub
parent 91cadbf307
commit 300a782451
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59,7 +59,9 @@ fn main() {
fn setup() {
// Make all paths relative to the workspace. That's nicer for IDEs when
// clicking on paths printed to the terminal.
std::env::set_current_dir("..").unwrap();
let workspace_dir =
Path::new(env!("CARGO_MANIFEST_DIR")).join(std::path::Component::ParentDir);
std::env::set_current_dir(workspace_dir).unwrap();
// Create the storage.
for ext in ["render", "html", "pdf", "svg"] {