summaryrefslogtreecommitdiffstats
path: root/debian/patches/fix-tests-permission-denied.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/fix-tests-permission-denied.patch')
-rw-r--r--debian/patches/fix-tests-permission-denied.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/debian/patches/fix-tests-permission-denied.patch b/debian/patches/fix-tests-permission-denied.patch
new file mode 100644
index 0000000..4eb44d4
--- /dev/null
+++ b/debian/patches/fix-tests-permission-denied.patch
@@ -0,0 +1,12 @@
+--- rust-cbindgen-0.26.0.orig/tests/tests.rs
++++ rust-cbindgen-0.26.0/tests/tests.rs
+@@ -204,6 +204,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