From 19f87ce67a6e5d4221027fae48fe10edfbb2bc51 Mon Sep 17 00:00:00 2001
From: Basile Desloges <basile.desloges@cea.fr>
Date: Wed, 16 Dec 2020 11:09:24 +0100
Subject: [PATCH] [tests] Set tests machdep to x86_32

---
 tests/basic/aggregate.cpp           |  2 +-
 tests/basic/extern.cc               |  2 +-
 tests/basic/extern_static_const.cpp |  2 +-
 tests/basic/nullptr_builtin.cpp     |  2 +-
 tests/basic/static_1.cpp            |  2 +-
 tests/bts/fixed_from_1757.cpp       |  2 +-
 tests/bts/preprocessor_1786.cpp     |  4 ++--
 tests/bugs/test_config              |  2 +-
 tests/da/test_config                |  2 +-
 tests/exn/all_exn.cpp               |  2 +-
 tests/exn/integer_exn.cpp           |  6 +++---
 tests/exn/simple_exn.cpp            |  2 +-
 tests/exn/unsigned_exn.cpp          |  2 +-
 tests/old/recv.cc                   |  2 +-
 tests/ppwp/test_config              |  2 +-
 tests/slicing/basic_slice.cc        |  2 +-
 tests/specs/assigns.cc              |  2 +-
 tests/specs/extern.cpp              |  2 +-
 tests/specs/float.cpp               |  2 +-
 tests/specs/lex.cc                  |  2 +-
 tests/specs/wp_empty_struct.cpp     |  2 +-
 tests/stl/stl.cpp                   |  2 +-
 tests/test_config                   |  3 ++-
 tests/val_analysis/pretty_main.cpp  | 10 +++++-----
 tests/val_analysis/test_config      |  2 +-
 25 files changed, 33 insertions(+), 32 deletions(-)

diff --git a/tests/basic/aggregate.cpp b/tests/basic/aggregate.cpp
index f93dabcc..fd9493fa 100644
--- a/tests/basic/aggregate.cpp
+++ b/tests/basic/aggregate.cpp
@@ -1,5 +1,5 @@
 /* run.config
-OPT: @CXX@ @EVA@ -print
+OPT: @MACHDEP@ @CXX@ @EVA@ -print
 */
 
 struct A {
diff --git a/tests/basic/extern.cc b/tests/basic/extern.cc
index e787cd4f..68e9c100 100644
--- a/tests/basic/extern.cc
+++ b/tests/basic/extern.cc
@@ -1,5 +1,5 @@
 /* run.config
-   OPT: @CXX@ -check -print -cxx-demangling-full
+   OPT: @MACHDEP@ @CXX@ -check -print -cxx-demangling-full
 */
 
 extern "C" {
diff --git a/tests/basic/extern_static_const.cpp b/tests/basic/extern_static_const.cpp
index ebf5b7f3..486853c6 100644
--- a/tests/basic/extern_static_const.cpp
+++ b/tests/basic/extern_static_const.cpp
@@ -1,5 +1,5 @@
 /* run.config
-   OPT: @CXX@ -check -print -cxx-keep-mangling
+   OPT: @MACHDEP@ @CXX@ -check -print -cxx-keep-mangling
 */
 
 extern "C" {
diff --git a/tests/basic/nullptr_builtin.cpp b/tests/basic/nullptr_builtin.cpp
index 61084eb0..8c5c8da0 100644
--- a/tests/basic/nullptr_builtin.cpp
+++ b/tests/basic/nullptr_builtin.cpp
@@ -1,5 +1,5 @@
 /* run.config
-OPT: @CXX@ -print
+OPT: @MACHDEP@ @CXX@ -print
 COMMENT: test handling of built-in nullptr_t
 */
 
diff --git a/tests/basic/static_1.cpp b/tests/basic/static_1.cpp
index bdb4b888..ed0af90d 100644
--- a/tests/basic/static_1.cpp
+++ b/tests/basic/static_1.cpp
@@ -1,6 +1,6 @@
 /* run.config
    GCC:
-   OPT: tests/basic/static_1_aux.cpp -print -check -cxx-c++stdlib-path share/libc++ -cxx-clang-command="bin/framaCIRGen"
+   OPT: @MACHDEP@ tests/basic/static_1_aux.cpp -print -check -cxx-c++stdlib-path share/libc++ -cxx-clang-command="bin/framaCIRGen"
 */
 
 
diff --git a/tests/bts/fixed_from_1757.cpp b/tests/bts/fixed_from_1757.cpp
index ab3e7458..5a2c2e87 100644
--- a/tests/bts/fixed_from_1757.cpp
+++ b/tests/bts/fixed_from_1757.cpp
@@ -1,5 +1,5 @@
 /* run.config
-OPT: -deps -check -print
+OPT: @MACHDEP@ -deps -check -print
 */
 
 //@ assigns \nothing;
diff --git a/tests/bts/preprocessor_1786.cpp b/tests/bts/preprocessor_1786.cpp
index eee31ef8..f0d9c063 100644
--- a/tests/bts/preprocessor_1786.cpp
+++ b/tests/bts/preprocessor_1786.cpp
@@ -1,6 +1,6 @@
 /* run.config
-OPT: -cpp-extra-args="-DFOO" -print
-OPT: -cxx-clang-command="bin/framaCIRGen -DFOO" -print 
+OPT: @MACHDEP@ -cpp-extra-args="-DFOO" -print
+OPT: @MACHDEP@ -cxx-clang-command="bin/framaCIRGen -DFOO" -print 
 */
 
 #ifdef FOO
diff --git a/tests/bugs/test_config b/tests/bugs/test_config
index 0e6ce2b6..dc51e86e 100644
--- a/tests/bugs/test_config
+++ b/tests/bugs/test_config
@@ -1 +1 @@
-OPT:-print @CXX@ @WP@
+OPT:@MACHDEP@ -print @CXX@ @WP@
diff --git a/tests/da/test_config b/tests/da/test_config
index 0e6ce2b6..dc51e86e 100644
--- a/tests/da/test_config
+++ b/tests/da/test_config
@@ -1 +1 @@
-OPT:-print @CXX@ @WP@
+OPT:@MACHDEP@ -print @CXX@ @WP@
diff --git a/tests/exn/all_exn.cpp b/tests/exn/all_exn.cpp
index c71a8452..c01b63c8 100644
--- a/tests/exn/all_exn.cpp
+++ b/tests/exn/all_exn.cpp
@@ -1,5 +1,5 @@
 /* run.config
-   OPT: @CXX@ -check -print
+   OPT: @MACHDEP@ @CXX@ -check -print
 */
 
 
diff --git a/tests/exn/integer_exn.cpp b/tests/exn/integer_exn.cpp
index 6dde7e24..4ffba19c 100644
--- a/tests/exn/integer_exn.cpp
+++ b/tests/exn/integer_exn.cpp
@@ -1,7 +1,7 @@
 /* run.config
-   OPT: @CXX@ -no-remove-exn -print -check
-   OPT: @CXX@ -check -print
-   OPT: @CXX@ @EVA@
+   OPT: @MACHDEP@ @CXX@ -no-remove-exn -print -check
+   OPT: @MACHDEP@ @CXX@ -check -print
+   OPT: @MACHDEP@ @CXX@ @EVA@
  */
 enum foo { BAR = 2 };
 
diff --git a/tests/exn/simple_exn.cpp b/tests/exn/simple_exn.cpp
index 3968cc60..7b96faf7 100644
--- a/tests/exn/simple_exn.cpp
+++ b/tests/exn/simple_exn.cpp
@@ -1,5 +1,5 @@
 /* run.config
-   OPT: @CXX@ -check -print
+   OPT: @MACHDEP@ @CXX@ -check -print
 */
 
 int f(int x) { if (x < 0) throw(5); else if (x > 0) throw(5.0); return 2; }
diff --git a/tests/exn/unsigned_exn.cpp b/tests/exn/unsigned_exn.cpp
index 0874e2ff..2614d514 100644
--- a/tests/exn/unsigned_exn.cpp
+++ b/tests/exn/unsigned_exn.cpp
@@ -1,5 +1,5 @@
 /* run.config
-   OPT: @CXX@ -check -print
+   OPT: @MACHDEP@ @CXX@ -check -print
 */
 
 int f(int x) { if (x < 0) throw(5); else if (x > 0) throw(5U); return 2; }
diff --git a/tests/old/recv.cc b/tests/old/recv.cc
index 00f862cc..c704908d 100644
--- a/tests/old/recv.cc
+++ b/tests/old/recv.cc
@@ -1,5 +1,5 @@
 /* run.config
-   OPT: @CXX@ @ALLOC@ -eva-slevel 12 @EVA@ -out -journal-disable -no-annot
+   OPT: @MACHDEP@ @CXX@ @ALLOC@ -eva-slevel 12 @EVA@ -out -journal-disable -no-annot
 */
 class A {
   int val;
diff --git a/tests/ppwp/test_config b/tests/ppwp/test_config
index 0e6ce2b6..dc51e86e 100644
--- a/tests/ppwp/test_config
+++ b/tests/ppwp/test_config
@@ -1 +1 @@
-OPT:-print @CXX@ @WP@
+OPT:@MACHDEP@ -print @CXX@ @WP@
diff --git a/tests/slicing/basic_slice.cc b/tests/slicing/basic_slice.cc
index d67cbaf9..35dc8bf0 100644
--- a/tests/slicing/basic_slice.cc
+++ b/tests/slicing/basic_slice.cc
@@ -1,5 +1,5 @@
 /* run.config
-   OPT: @EVA@ -slice-assert ::f -slice-callers -slice-print -journal-disable
+   OPT: @MACHDEP@ @EVA@ -slice-assert ::f -slice-callers -slice-print -journal-disable
 */
 struct A {
   int x;
diff --git a/tests/specs/assigns.cc b/tests/specs/assigns.cc
index a61b6320..15843573 100644
--- a/tests/specs/assigns.cc
+++ b/tests/specs/assigns.cc
@@ -1,5 +1,5 @@
 /* run.config
-OPT: @CXX@ @EVA@ -out -journal-disable -print
+OPT: @MACHDEP@ @CXX@ @EVA@ -out -journal-disable -print
 */
 /*@ behavior default:
     assigns p \from q,p;
diff --git a/tests/specs/extern.cpp b/tests/specs/extern.cpp
index bbe1ba78..5240978d 100644
--- a/tests/specs/extern.cpp
+++ b/tests/specs/extern.cpp
@@ -1,5 +1,5 @@
 /* run.config
-OPT: @CXX@ -check -print -cxx-keep-mangling
+OPT: @MACHDEP@ @CXX@ -check -print -cxx-keep-mangling
 */
 
 namespace Foo {
diff --git a/tests/specs/float.cpp b/tests/specs/float.cpp
index 9514b12f..d19334e5 100644
--- a/tests/specs/float.cpp
+++ b/tests/specs/float.cpp
@@ -1,5 +1,5 @@
 /* run.config
-OPT: -check -print -float-hex @CXX@
+OPT: @MACHDEP@ -check -print -float-hex @CXX@
 */
 
 //@ ensures \result == 0.4;
diff --git a/tests/specs/lex.cc b/tests/specs/lex.cc
index 5bf51aab..92e3983c 100644
--- a/tests/specs/lex.cc
+++ b/tests/specs/lex.cc
@@ -1,5 +1,5 @@
 /* run.config
- OPT: @CXX@ -pp-annot -journal-disable -print
+ OPT: @MACHDEP@ @CXX@ -pp-annot -journal-disable -print
 */
 /*@ axiom foo: \true;
 // just a test for the lexer of annotations
diff --git a/tests/specs/wp_empty_struct.cpp b/tests/specs/wp_empty_struct.cpp
index 2a9f5a5f..f94baf23 100644
--- a/tests/specs/wp_empty_struct.cpp
+++ b/tests/specs/wp_empty_struct.cpp
@@ -1,5 +1,5 @@
 /* run.config
-OPT: @CXX@ @WP@
+OPT: @MACHDEP@ @CXX@ @WP@
 */
 class Point2
 {
diff --git a/tests/stl/stl.cpp b/tests/stl/stl.cpp
index 71ded002..825c5ecf 100644
--- a/tests/stl/stl.cpp
+++ b/tests/stl/stl.cpp
@@ -1,5 +1,5 @@
 /* run.config
- OPT: @CXX@ -print
+ OPT: @MACHDEP@ @CXX@ -print
  DONTRUN: Not yet fully working
  */
 #include <bitset>
diff --git a/tests/test_config b/tests/test_config
index 66a5b154..4a53e83f 100644
--- a/tests/test_config
+++ b/tests/test_config
@@ -1,6 +1,7 @@
 FILEREG:.*\.\(cc\|cpp\|ii\)$
+MACRO: MACHDEP -machdep x86_32
 MACRO: CXX -cxx-c++stdlib-path share/libc++ -cxx-clang-command="bin/framaCIRGen"
 MACRO: EVA -eva -eva-msg-key=-summary
 MACRO: WP -wp -wp-par 1 -wp-session tests/wp-cache -wp-cache update -wp-msg-key shell
-OPT:-print -check @CXX@
+OPT: @MACHDEP@ -print -check @CXX@
 FILTER:sed  -e "s|${FRAMAC_SHARE}|FRAMAC_SHARE|g" -e "s|$(pwd)/||g"
diff --git a/tests/val_analysis/pretty_main.cpp b/tests/val_analysis/pretty_main.cpp
index 7f9d4dc2..709674e2 100644
--- a/tests/val_analysis/pretty_main.cpp
+++ b/tests/val_analysis/pretty_main.cpp
@@ -1,9 +1,9 @@
 /* run.config
-OPT: @CXX@ -main A::f @EVA@
-OPT: @CXX@ -main="A::g(int x)" @EVA@
-OPT: @CXX@ -main="::real_main" @EVA@
-OPT: @CXX@ -main="real_main" @EVA@
-OPT: @CXX@ @EVA@ -main A::h -eva-slevel-function="A::h:3,A::g(int):3" -eva-split-return-function="A::g:-1:1"
+OPT: @MACHDEP@ @CXX@ -main A::f @EVA@
+OPT: @MACHDEP@ @CXX@ -main="A::g(int x)" @EVA@
+OPT: @MACHDEP@ @CXX@ -main="::real_main" @EVA@
+OPT: @MACHDEP@ @CXX@ -main="real_main" @EVA@
+OPT: @MACHDEP@ @CXX@ @EVA@ -main A::h -eva-slevel-function="A::h:3,A::g(int):3" -eva-split-return-function="A::g:-1:1"
 */
 
 namespace A {
diff --git a/tests/val_analysis/test_config b/tests/val_analysis/test_config
index df587a81..4bbced53 100644
--- a/tests/val_analysis/test_config
+++ b/tests/val_analysis/test_config
@@ -1,2 +1,2 @@
-OPT: @CXX@ @EVA@ -journal-disable
+OPT: @MACHDEP@ @CXX@ @EVA@ -journal-disable
 MACRO: ALLOC -eva-builtin malloc:Frama_C_alloc_size -eva-builtin free:Frama_C_free
-- 
GitLab