From fc4106264f65d2a608ca158726bc1ca576ec8b15 Mon Sep 17 00:00:00 2001
From: Virgile Prevosto <virgile.prevosto@m4x.org>
Date: Wed, 11 Mar 2020 19:21:19 +0100
Subject: [PATCH] [tests] filter out pwd path prefix in clang error messages

Now that we use more systematically the Filepath.Normalized version of
filenames, this shows in clang messages as absolute filenames in location.
To have reproducible oracles, the pwd component must be filtered out.
---
 tests/bugs/test_config | 2 +-
 tests/test_config      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/bugs/test_config b/tests/bugs/test_config
index 28633d29..c982a313 100644
--- a/tests/bugs/test_config
+++ b/tests/bugs/test_config
@@ -1,4 +1,4 @@
 FILEREG:.*\.\(cc\|cpp\|ii\)$
 MACRO: CXX -machdep=x86_64 -cxx-c++stdlib-path share/libc++ -cxx-clang-command="bin/framaCIRGen -target x86_64-linux-gnu -D__FC_MACHDEP_X86_64"
 OPT:-print -wp -wp-msg-key="no-time-info,no-step-info" -wp-cache none  @CXX@
-FILTER:/bin/sed -e '/^#[^\n]*/d' -e "s|${FRAMAC_SHARE}|FRAMAC_SHARE|g" -e 's/Alt-Ergo [0-9.]\+/Alt-Ergo/'
+FILTER:/bin/sed -e '/^#[^\n]*/d' -e "s|${FRAMAC_SHARE}|FRAMAC_SHARE|g" -e 's/Alt-Ergo [0-9.]\+/Alt-Ergo/' -e "s|$(pwd)/||g"
diff --git a/tests/test_config b/tests/test_config
index f44899cf..3cdd2697 100644
--- a/tests/test_config
+++ b/tests/test_config
@@ -2,5 +2,5 @@ FILEREG:.*\.\(cc\|cpp\|ii\)$
 MACRO: CXX -cxx-c++stdlib-path share/libc++ -cxx-clang-command="bin/framaCIRGen"
 MACRO: EVA -eva -eva-msg-key=-summary
 OPT:-print -check @CXX@
-FILTER:/bin/sed  -e "s|${FRAMAC_SHARE}|FRAMAC_SHARE|g"
+FILTER:/bin/sed  -e "s|${FRAMAC_SHARE}|FRAMAC_SHARE|g" -e "s|$(pwd)/||g"
 ##FILTER:/bin/sed -e '/^#[^\n]*/d' -e "s|${FRAMAC_SHARE}|FRAMAC_SHARE|g"
-- 
GitLab