diff --git a/ptests/ptests.ml b/ptests/ptests.ml
index d7df845274c5f9e3b81c5bdf747f1d49f3776a81..9b953021d999526089a0765ef77b089f4241450c 100644
--- a/ptests/ptests.ml
+++ b/ptests/ptests.ml
@@ -1081,6 +1081,12 @@ let command_string ~result_fmt ~oracle_fmt command =
    *     in
    *     Some (exec_name ^ params)
    * in *)
+    let filter_stdout_begin,filter_stdout_end = match command.filter with
+    | None -> "",""
+    | Some filter ->
+      "(pipe-stdout ",
+      Format.sprintf "(system %S))" filter
+  in
   let command_string = basic_command_string command in
   (* let command_string = match filter with
    *   | None -> command_string
@@ -1114,7 +1120,7 @@ let command_string ~result_fmt ~oracle_fmt command =
     "(rule\n  \
      (targets %S %S %a)\n  \
      (deps   %a %S (package frama-c)%a (universe))\n  \
-     (action (with-stderr-to %S (with-stdout-to %S (with-accepted-exit-codes (or 0 1 125) (system %S)))))\n\
+     (action (with-stderr-to %S (with-stdout-to %S %s(with-accepted-exit-codes (or 0 1 125) (system %S))%s)))\n\
      )@."
     errlog
     res
@@ -1124,7 +1130,9 @@ let command_string ~result_fmt ~oracle_fmt command =
     Fmt.(list (package_as_deps (quote plugin_as_package))) command.plugins
     errlog
     res
+    filter_stdout_begin
     command_string
+    filter_stdout_end
   ;
     Format.fprintf result_fmt
     "(rule\n  \
diff --git a/tests/syntax/char_is_unsigned.i b/tests/syntax/char_is_unsigned.i
index ac18c46cdf49fb691dd86a2945cbb7d433df95d6..0eb4739fe4188dc696ddd1033907db926be30e0c 100644
--- a/tests/syntax/char_is_unsigned.i
+++ b/tests/syntax/char_is_unsigned.i
@@ -1,6 +1,6 @@
 /* run.config
    CMXS: machdep_char_unsigned
-   OPT:-print -load-module machdep_char_unsigned -machdep unsigned_char -then -constfold -rte
+   OPT:-print -load-module %{dep:machdep_char_unsigned.cmxs} -machdep unsigned_char -then -constfold -rte
 */
 char t[10];
 
diff --git a/tests/syntax/cpp-command.c b/tests/syntax/cpp-command.c
index e3f75a6e3fc85ab81beec8cbb436b8cf9564b2b5..a5302bd1287f8aba14df663b403b9f2cfb548c30 100644
--- a/tests/syntax/cpp-command.c
+++ b/tests/syntax/cpp-command.c
@@ -1,5 +1,5 @@
 /* run.config*
-   FILTER: sed 's:/\(tmp\|var\|build\)/[^ ]*\.i:/tmp/FILE.i:g'
+   FILTER: sed -e 's:/\(tmp\|var\|build\)/[^ ]*\.i:/tmp/FILE.i:g' -e 's:-I.*share/frama-c/share/libc:-I LIBC:g'
    OPT: -no-autoload-plugins -cpp-frama-c-compliant -cpp-command "echo [\$(basename '%1') \$(basename '%1') \$(basename '%i') \$(basename '%input')] ['%2' '%2' '%o' '%output'] ['%args']"
    OPT: -no-autoload-plugins -cpp-frama-c-compliant -cpp-command "echo %%1 = \$(basename '%1') %%2 = '%2' %%args = '%args'"
    OPT: -no-autoload-plugins -cpp-frama-c-compliant -cpp-command "printf \"%s\" \"using \\% has no effect : \$(basename \"\%input\")\""
diff --git a/tests/syntax/oracle/anon_enum_libc.res.oracle b/tests/syntax/oracle/anon_enum_libc.res.oracle
index 08fb3a9bdcb2890ef472135f26893636cc762a21..32aba9aeb34ea72fb29ff986cb3df21a0d11379a 100644
--- a/tests/syntax/oracle/anon_enum_libc.res.oracle
+++ b/tests/syntax/oracle/anon_enum_libc.res.oracle
@@ -1,6 +1,28 @@
 [kernel] Parsing anon_enum_libc.c (with preprocessing)
-[kernel] User Error: failed to run: gcc -E -C -I.  -I/home/bobot/Sources/frama-c/_build/install/default/share/frama-c/share/libc -D__FRAMAC__ -D__FC_MACHDEP_X86_32 -I tests/syntax -dD -nostdinc -m32 -o '/tmp/anon_enum_libc.c98bd8a.i' '/home/bobot/Sources/frama-c/_build/default/tests/syntax/result/anon_enum_libc.c'
-  See chapter "Preparing the Sources" in the Frama-C user manual for more details.
-[kernel] User Error: stopping on file "anon_enum_libc.c" that has errors. Add '-kernel-msg-key pp'
-  for preprocessing command.
-[kernel] Frama-C aborted: invalid user input.
+[kernel] Parsing anon_enum_libc.tmp.c (with preprocessing)
+/* Generated by Frama-C */
+#include "PTESTS_DIR/anon_enum_libc.h"
+struct __anonstruct_s1_1 {
+   int x ;
+   float y ;
+};
+enum __anonenum_2 {
+    BLA = 4,
+    BLI = 12
+};
+struct __anonstruct_s1_1 s1;
+int f(void)
+{
+  int __retres;
+  __retres = BLA + s1.x;
+  return __retres;
+}
+
+int g(void)
+{
+  int __retres;
+  __retres = (int)((unsigned long)FOO + s2.t);
+  return __retres;
+}
+
+
diff --git a/tests/syntax/oracle/cpp-command.0.res.oracle b/tests/syntax/oracle/cpp-command.0.res.oracle
index 55dc2642deb53e1bfecc8eeb70713abd0a5865d8..f9d70e8e442ecb6fbe0a3840675c965caaebccce 100644
--- a/tests/syntax/oracle/cpp-command.0.res.oracle
+++ b/tests/syntax/oracle/cpp-command.0.res.oracle
@@ -1,2 +1,2 @@
 [kernel] Parsing cpp-command.c (with preprocessing)
-[cpp-command.c cpp-command.c cpp-command.c cpp-command.c] [/tmp/cpp-command.cd485c4.i /tmp/cpp-command.cd485c4.i /tmp/cpp-command.cd485c4.i /tmp/cpp-command.cd485c4.i] [ -I/home/bobot/Sources/frama-c/_build/install/default/share/frama-c/share/libc -D__FRAMAC__ -D__FC_MACHDEP_X86_32 -dD -nostdinc -m32]
+[cpp-command.c cpp-command.c cpp-command.c cpp-command.c] [/tmp/FILE.i /tmp/FILE.i /tmp/FILE.i /tmp/FILE.i] [ -I LIBC -D__FRAMAC__ -D__FC_MACHDEP_X86_32 -dD -nostdinc -m32]
diff --git a/tests/syntax/oracle/cpp-command.1.res.oracle b/tests/syntax/oracle/cpp-command.1.res.oracle
index afdf8e4c586f7979aad2f4b6fce779126c0ffd9b..924d09472535cc4a5716a8c0cdb208b0ba89eeac 100644
--- a/tests/syntax/oracle/cpp-command.1.res.oracle
+++ b/tests/syntax/oracle/cpp-command.1.res.oracle
@@ -1,2 +1,2 @@
 [kernel] Parsing cpp-command.c (with preprocessing)
-%1 = cpp-command.c %2 = /tmp/cpp-command.c125b21.i %args =  -I/home/bobot/Sources/frama-c/_build/install/default/share/frama-c/share/libc -D__FRAMAC__ -D__FC_MACHDEP_X86_32 -dD -nostdinc -m32
+%1 = cpp-command.c %2 = /tmp/FILE.i %args =  -I LIBC -D__FRAMAC__ -D__FC_MACHDEP_X86_32 -dD -nostdinc -m32
diff --git a/tests/syntax/oracle/multiple_decls_contracts.0.res.oracle b/tests/syntax/oracle/multiple_decls_contracts.0.res.oracle
index 1f940c2ffdfddbbf54d4133446b130f89bc05550..b92cc616a72d44e34d58def745647a8262b8bed2 100644
--- a/tests/syntax/oracle/multiple_decls_contracts.0.res.oracle
+++ b/tests/syntax/oracle/multiple_decls_contracts.0.res.oracle
@@ -1,4 +1,4 @@
-[kernel] Parsing /home/bobot/Sources/frama-c/_build/default/share/libc/string.h (with preprocessing)
+[kernel] Parsing SHARE/libc/string.h (with preprocessing)
 [kernel] Parsing multiple_decls_contracts.c (with preprocessing)
 [kernel] Parsing multiple_decls_contracts.c (with preprocessing)
 [kernel] multiple_decls_contracts.c:11: Warning: 
diff --git a/tests/syntax/oracle/multiple_decls_contracts.1.res.oracle b/tests/syntax/oracle/multiple_decls_contracts.1.res.oracle
index 5be71f7640605995eff85a4897ecfab4e75545d6..a42ae24841efb503a4311f1a874ca869a40bb42f 100644
--- a/tests/syntax/oracle/multiple_decls_contracts.1.res.oracle
+++ b/tests/syntax/oracle/multiple_decls_contracts.1.res.oracle
@@ -1,5 +1,5 @@
 [kernel] Parsing multiple_decls_contracts.c (with preprocessing)
-[kernel] Parsing /home/bobot/Sources/frama-c/_build/default/share/libc/string.h (with preprocessing)
+[kernel] Parsing SHARE/libc/string.h (with preprocessing)
 [kernel] Parsing multiple_decls_contracts.c (with preprocessing)
 [kernel] multiple_decls_contracts.c:11: Warning: 
   dropping duplicate def'n of func strdup at multiple_decls_contracts.c:11 in favor of that at multiple_decls_contracts.c:11
diff --git a/tests/syntax/oracle/multiple_decls_contracts.2.res.oracle b/tests/syntax/oracle/multiple_decls_contracts.2.res.oracle
index 0eb3fb7b6a3060a3ba3640feacfb1c4ceef89022..eba6fd7fe81777f36afe9b8ee279a6702bdea3e0 100644
--- a/tests/syntax/oracle/multiple_decls_contracts.2.res.oracle
+++ b/tests/syntax/oracle/multiple_decls_contracts.2.res.oracle
@@ -1,6 +1,6 @@
 [kernel] Parsing multiple_decls_contracts.c (with preprocessing)
 [kernel] Parsing multiple_decls_contracts.c (with preprocessing)
-[kernel] Parsing /home/bobot/Sources/frama-c/_build/default/share/libc/string.h (with preprocessing)
+[kernel] Parsing SHARE/libc/string.h (with preprocessing)
 [kernel] multiple_decls_contracts.c:11: Warning: 
   dropping duplicate def'n of func strdup at multiple_decls_contracts.c:11 in favor of that at multiple_decls_contracts.c:11
 /* Generated by Frama-C */