File: fix-tests-permission-denied.patch

package info (click to toggle)
rust-cbindgen 0.27.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,616 kB
  • sloc: ansic: 15; makefile: 11
file content (14 lines) | stat: -rw-r--r-- 628 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Index: cbindgen/tests/tests.rs
===================================================================
--- cbindgen.orig/tests/tests.rs
+++ cbindgen/tests/tests.rs
@@ -212,6 +212,9 @@ fn run_compile_test(
     let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
     let tests_path = Path::new(&crate_dir).join("tests");
     let mut generated_file = tests_path.join("expectations");
+    if let Some(cargo_target_tmpdir) = option_env!("CARGO_TARGET_TMPDIR") {
+        generated_file = Path::new(cargo_target_tmpdir).join("expectations");
+    }
     fs::create_dir_all(&generated_file).unwrap();
 
     let style_ext = style