From 7b12f33ea358734a02f9ec58daee44b4a7d0538e Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Tue, 9 Jul 2024 11:27:28 +1000 Subject: [PATCH] Fix proc-macro dynamic lib --- .gitignore | 1 + Makefile | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index fa8d85a..a706d3e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ Cargo.lock target +cobertura.xml diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c32cc4e --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +# These hacks are required for the test binaries depending on the dynamic library libstd-*.so +# See: https://github.com/rust-lang/cargo/issues/4651 +# +# We also need to exclude the derive macro from coverage because it will always show as 0% by +# virtue of executing at compile-time outside the view of Tarpaulin. +coverage: + env LD_LIBRARY_PATH="$(shell rustc --print sysroot)/lib" \ + cargo-tarpaulin --workspace --all-features --out xml --exclude tree_hash_derive + +.PHONY: coverage