summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrozolotl <44589151+frozolotl@users.noreply.github.com>2025-05-20 15:54:49 +0200
committerGitHub <noreply@github.com>2025-05-20 13:54:49 +0000
commit300a782451082e5d7bdf894f0cc756261076008b (patch)
treeac40ceb1e1ca51972b7c88827dcb92fd29512319
parent91cadbf307f52effa8246192cc33d5695d87ae14 (diff)
Always run tests from workspace directory (#6307)
-rw-r--r--tests/src/tests.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/src/tests.rs b/tests/src/tests.rs
index 26eb63be..0ed2fa46 100644
--- a/tests/src/tests.rs
+++ b/tests/src/tests.rs
@@ -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"] {