diff options
| author | frozolotl <44589151+frozolotl@users.noreply.github.com> | 2025-05-20 15:54:49 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-20 13:54:49 +0000 |
| commit | 300a782451082e5d7bdf894f0cc756261076008b (patch) | |
| tree | ac40ceb1e1ca51972b7c88827dcb92fd29512319 /tests/src | |
| parent | 91cadbf307f52effa8246192cc33d5695d87ae14 (diff) | |
Always run tests from workspace directory (#6307)
Diffstat (limited to 'tests/src')
| -rw-r--r-- | tests/src/tests.rs | 4 |
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"] { |
