From dcc4242543aa4966108d1c7a5f6446c0975049f6 Mon Sep 17 00:00:00 2001
From: Patrick Baudin <patrick.baudin@cea.fr>
Date: Wed, 27 Jul 2022 14:01:30 +0200
Subject: [PATCH] removing some @PTEST_RESULT@ & @PTEST_DIR@

---
 tests/fc_script/make-wrapper.c         | 2 +-
 tests/jcdb/jcdb.c                      | 2 +-
 tests/jcdb/logic-pp-include/no-stdio.c | 2 +-
 tests/misc/audit.c                     | 2 +-
 tests/spec/merge_logic_globals_1.c     | 2 +-
 tests/syntax/anon_enum_libc.c          | 2 +-
 tests/syntax/merge_union.c             | 4 ++--
 tests/syntax/merge_unused.c            | 2 +-
 tests/syntax/static_formals_1.c        | 2 +-
 9 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/tests/fc_script/make-wrapper.c b/tests/fc_script/make-wrapper.c
index db93580da83..a861aefe78f 100644
--- a/tests/fc_script/make-wrapper.c
+++ b/tests/fc_script/make-wrapper.c
@@ -3,7 +3,7 @@ MACRO: RM_TMP_DIR rm -rf make-for-make-wrapper.parse make-for-make-wrapper.eva
    NOFRAMAC: testing frama-c-script
    COMMENT: in case of errors, remove the 'grep' part to get the full output
    PLUGIN: eva,from,inout,metrics,nonterm,report,scope,variadic
-   EXECNOW: LOG make-wrapper.res LOG make-wrapper.err (cd @PTEST_DIR@ && touch %{dep:make-wrapper2.c} && touch %{dep:make-wrapper3.c} && @RM_TMP_DIR@ && FRAMAC='%{bin:frama-c} @PTEST_DEFAULT_OPTIONS@ @PTEST_LOAD_OPTIONS@' PTESTS_TESTING=1 %{bin:frama-c-script} make-wrapper --make-dir . -f %{dep:make-for-make-wrapper.mk} | grep -A999999 "make-wrapper recommendations" && @RM_TMP_DIR@) > ./make-wrapper.res 2> ./make-wrapper.err
+   EXECNOW: LOG make-wrapper.res LOG make-wrapper.err (cd ./ && touch %{dep:make-wrapper2.c} && touch %{dep:make-wrapper3.c} && @RM_TMP_DIR@ && FRAMAC='%{bin:frama-c} @PTEST_DEFAULT_OPTIONS@ @PTEST_LOAD_OPTIONS@' PTESTS_TESTING=1 %{bin:frama-c-script} make-wrapper --make-dir . -f %{dep:make-for-make-wrapper.mk} | grep -A999999 "make-wrapper recommendations" && @RM_TMP_DIR@) > ./make-wrapper.res 2> ./make-wrapper.err
 */
 
 
diff --git a/tests/jcdb/jcdb.c b/tests/jcdb/jcdb.c
index 0bff3129336..35173a2f0b1 100644
--- a/tests/jcdb/jcdb.c
+++ b/tests/jcdb/jcdb.c
@@ -1,7 +1,7 @@
 /* run.config
  DEPS: compile_commands.json
  COMMENT: parsing option are defined in the default json file "compile_commands.json"
-   OPT: -json-compilation-database @PTEST_DIR@ -print
+   OPT: -json-compilation-database ./ -print
  DEPS:
    OPT: %{dep:./jcdb2.c} -json-compilation-database %{dep:./with_arguments.json} -print
  MODULE: @PTEST_NAME@
diff --git a/tests/jcdb/logic-pp-include/no-stdio.c b/tests/jcdb/logic-pp-include/no-stdio.c
index 1168462ce77..84b330f87d5 100644
--- a/tests/jcdb/logic-pp-include/no-stdio.c
+++ b/tests/jcdb/logic-pp-include/no-stdio.c
@@ -1,5 +1,5 @@
 /* run.config
-   OPT: -json-compilation-database %{dep:@PTEST_DIR@/no-stdio.json} -print
+   OPT: -json-compilation-database %{dep:./no-stdio.json} -print
 */
 
 // no-stdio.json must have "-includestdio.h" and define ZERO
diff --git a/tests/misc/audit.c b/tests/misc/audit.c
index 943eb39536e..9b469f280e0 100644
--- a/tests/misc/audit.c
+++ b/tests/misc/audit.c
@@ -1,6 +1,6 @@
 /* run.config
  PLUGIN: @EVA_PLUGINS@
-   EXECNOW: BIN audit.json cat %{dep:./audit-in.json} | sed -e 's:PTEST_DIR:@PTEST_DIR@:' > ./audit.json 2> @DEV_NULL@
+   EXECNOW: BIN audit.json cat %{dep:./audit-in.json} | sed -e 's:PTEST_DIR:.:' > ./audit.json 2> @DEV_NULL@
  DEPS: audit_included.h, audit_included_but_not_listed.h
  LOG: audit-out.json
    STDOPT: #"-audit-check %{dep:./audit.json} -audit-prepare ./audit-out.json -kernel-warn-key audit=active"
diff --git a/tests/spec/merge_logic_globals_1.c b/tests/spec/merge_logic_globals_1.c
index 734b3d7a7dd..6d7796757e8 100644
--- a/tests/spec/merge_logic_globals_1.c
+++ b/tests/spec/merge_logic_globals_1.c
@@ -1,6 +1,6 @@
 /* run.config
  DEPS: merge_logic_globals.h
-  OPT: -print %{dep:./merge_logic_globals_2.c} -cpp-extra-args="-I@PTEST_DIR@"
+  OPT: -print %{dep:./merge_logic_globals_2.c} -cpp-extra-args="-I./"
 */
 
 #include "merge_logic_globals.h"
diff --git a/tests/syntax/anon_enum_libc.c b/tests/syntax/anon_enum_libc.c
index a07e6d8541f..53ac42b1b0a 100644
--- a/tests/syntax/anon_enum_libc.c
+++ b/tests/syntax/anon_enum_libc.c
@@ -1,6 +1,6 @@
 /* run.config
  DEPS: anon_enum_libc.h
-   OPT: -cpp-extra-args="-I @PTEST_DIR@" -ocode ./ocode_@PTEST_NUMBER@_@PTEST_NAME@.c -print -then -ocode="" ./ocode_@PTEST_NUMBER@_@PTEST_NAME@.c -print
+   OPT: -cpp-extra-args="-I ./" -ocode ./ocode_@PTEST_NUMBER@_@PTEST_NAME@.c -print -then -ocode="" ./ocode_@PTEST_NUMBER@_@PTEST_NAME@.c -print
 */
 struct { int x; float y; } s1;
 enum { BLA=4, BLI=12 };
diff --git a/tests/syntax/merge_union.c b/tests/syntax/merge_union.c
index 7e8250d6750..ca8d0230335 100644
--- a/tests/syntax/merge_union.c
+++ b/tests/syntax/merge_union.c
@@ -1,7 +1,7 @@
 /* run.config
  DEPS: merge_union.h
-   OPT: -cpp-extra-args="-I @PTEST_DIR@" %{dep:./@PTEST_NAME@_2.c} %{dep:./@PTEST_NAME@_3.c} -print
-   OPT: -cpp-extra-args="-I @PTEST_DIR@" %{dep:./@PTEST_NAME@_2.c} %{dep:./@PTEST_NAME@_3.c} -print -kernel-warn-key="linker:drop-conflicting-unused=inactive"
+   OPT: -cpp-extra-args="-I ./" %{dep:./@PTEST_NAME@_2.c} %{dep:./@PTEST_NAME@_3.c} -print
+   OPT: -cpp-extra-args="-I ./" %{dep:./@PTEST_NAME@_2.c} %{dep:./@PTEST_NAME@_3.c} -print -kernel-warn-key="linker:drop-conflicting-unused=inactive"
 */
 #include "merge_union.h"
 int f(un* u);
diff --git a/tests/syntax/merge_unused.c b/tests/syntax/merge_unused.c
index 747a84b39dc..c47f29295db 100644
--- a/tests/syntax/merge_unused.c
+++ b/tests/syntax/merge_unused.c
@@ -1,7 +1,7 @@
 /* run.config*
  EXIT: 1
  DEPS: merge_unused.h
-  OPT: -cpp-extra-args="-I@PTEST_DIR@" %{dep:./@PTEST_NAME@_2.c} -print
+  OPT: -cpp-extra-args="-I./" %{dep:./@PTEST_NAME@_2.c} -print
 */
 #pragma pack(1)
 
diff --git a/tests/syntax/static_formals_1.c b/tests/syntax/static_formals_1.c
index e1374727bea..887a80d4aea 100644
--- a/tests/syntax/static_formals_1.c
+++ b/tests/syntax/static_formals_1.c
@@ -1,6 +1,6 @@
 /* run.config
  DEPS: static_formals.h
-   STDOPT: +"%{dep:./static_formals_2.c}" +"-cpp-extra-args=\"-I @PTEST_DIR@\"" +"-kernel-msg-key printer:vid"
+   STDOPT: +"%{dep:./static_formals_2.c}" +"-cpp-extra-args=\"-I ./\"" +"-kernel-msg-key printer:vid"
 */
 #include "static_formals.h"
 int g() { return f(4); }
-- 
GitLab