From 86317c49226eb4473c861999de38147e19cace8d Mon Sep 17 00:00:00 2001
From: Andre Maroneze <andre.oliveiramaroneze@cea.fr>
Date: Tue, 12 Mar 2019 17:26:18 +0100
Subject: [PATCH] [tests] refactor tests to simplify future changes

---
 tests/constant_propagation/array_pointers.i            | 2 +-
 tests/constant_propagation/bts-1787-bis.i              | 6 +++---
 tests/constant_propagation/bts-1787.i                  | 4 ++--
 tests/constant_propagation/const_field_return_struct.i | 2 +-
 tests/constant_propagation/enum.i                      | 2 +-
 tests/constant_propagation/fct_ptr.i                   | 2 +-
 tests/constant_propagation/struct_field.i              | 2 +-
 tests/constant_propagation/test_config                 | 1 +
 8 files changed, 11 insertions(+), 10 deletions(-)
 create mode 100644 tests/constant_propagation/test_config

diff --git a/tests/constant_propagation/array_pointers.i b/tests/constant_propagation/array_pointers.i
index bd9fff2b420..5f2d17c28f1 100644
--- a/tests/constant_propagation/array_pointers.i
+++ b/tests/constant_propagation/array_pointers.i
@@ -1,5 +1,5 @@
 /* run.config
-   OPT: -eva -eva-show-progress -scf -eva-show-progress -journal-disable
+   STDOPT: +"-eva"
 */
 
 void *p;
diff --git a/tests/constant_propagation/bts-1787-bis.i b/tests/constant_propagation/bts-1787-bis.i
index 01be6cb5fcf..cd70cec18f7 100644
--- a/tests/constant_propagation/bts-1787-bis.i
+++ b/tests/constant_propagation/bts-1787-bis.i
@@ -1,7 +1,7 @@
 /* run.config
-OPT: -journal-disable -print
-OPT: -journal-disable -scf -eva-show-progress
-OPT: -journal-disable -scf -eva-show-progress -scf-allow-cast
+   OPT: -print -journal-disable
+   STDOPT:
+   STDOPT: +"-scf-allow-cast"
 */
 
 typedef struct {
diff --git a/tests/constant_propagation/bts-1787.i b/tests/constant_propagation/bts-1787.i
index a959b09e871..6b534ca4bbd 100644
--- a/tests/constant_propagation/bts-1787.i
+++ b/tests/constant_propagation/bts-1787.i
@@ -1,6 +1,6 @@
 /* run.config
-OPT: -journal-disable -scf -eva-show-progress -scf-allow-cast
-OPT: -journal-disable -scf -eva-show-progress
+   STDOPT: +"-scf-allow-cast"
+   STDOPT:
 */
 
 typedef struct {
diff --git a/tests/constant_propagation/const_field_return_struct.i b/tests/constant_propagation/const_field_return_struct.i
index 9bf7ea6975b..6b4473198a2 100644
--- a/tests/constant_propagation/const_field_return_struct.i
+++ b/tests/constant_propagation/const_field_return_struct.i
@@ -1,5 +1,5 @@
 /* run.config
-   OPT: -eva -eva-show-progress -scf -eva-show-progress -journal-disable
+   STDOPT: +"-eva"
 */
 
 struct S {
diff --git a/tests/constant_propagation/enum.i b/tests/constant_propagation/enum.i
index c36692b4ed8..374f0d5ffb6 100644
--- a/tests/constant_propagation/enum.i
+++ b/tests/constant_propagation/enum.i
@@ -1,5 +1,5 @@
 /* run.config
-OPT: -semantic-const-folding -eva-show-progress
+   STDOPT:
 */
 
 enum E { A, B, C, D };
diff --git a/tests/constant_propagation/fct_ptr.i b/tests/constant_propagation/fct_ptr.i
index 12a34d58d3c..9182142aa59 100644
--- a/tests/constant_propagation/fct_ptr.i
+++ b/tests/constant_propagation/fct_ptr.i
@@ -1,5 +1,5 @@
 /* run.config
-OPT: -scf -eva-show-progress -then-on propagated
+   STDOPT: +"-then-on propagated"
 */
 
 void (*pf)(void);
diff --git a/tests/constant_propagation/struct_field.i b/tests/constant_propagation/struct_field.i
index 9621fff8f01..97e18ced984 100644
--- a/tests/constant_propagation/struct_field.i
+++ b/tests/constant_propagation/struct_field.i
@@ -1,5 +1,5 @@
 /* run.config
-   OPT: -eva -semantic-const-folding -eva-show-progress -journal-disable
+   STDOPT: +"-eva"
 */
 
 struct st {
diff --git a/tests/constant_propagation/test_config b/tests/constant_propagation/test_config
new file mode 100644
index 00000000000..b174b4500a1
--- /dev/null
+++ b/tests/constant_propagation/test_config
@@ -0,0 +1 @@
+OPT: -journal-disable -scf -eva-show-progress
-- 
GitLab