diff --git a/share/Makefile.testing b/share/Makefile.testing
index 3569f03d45e3eb5819b961344a60ee4dff7efeac..88224c388bcc15d7739c86f831dc605f986baf46 100644
--- a/share/Makefile.testing
+++ b/share/Makefile.testing
@@ -47,6 +47,11 @@ else
 FRAMAC_WP_CACHEDIR?=
 endif
 
+ifeq ($(PTEST_USE_WP_CACHE),yes)
+# we need these variable to be present in the shell environment of the commands
+export FRAMAC_WP_CACHEDIR FRAMAC_WP_CACHE
+endif
+
 ############
 # Default values necessary for make -f <this-makefile>