From 63618e751b9440da3b763365e8ddd24fab81e85d Mon Sep 17 00:00:00 2001
From: Michele Alberti <michele.alberti@cea.fr>
Date: Fri, 17 Dec 2021 12:08:21 +0100
Subject: [PATCH] [SAVer] Update detect configuration and tests.

---
 config/caisar-detection-data.conf | 6 +++---
 tests/autodetect.t                | 4 ++--
 tests/bin/saver                   | 2 +-
 tests/marabou.t                   | 4 ++--
 tests/simple.t                    | 6 +++---
 tests/simple_onnx.t               | 4 ++--
 6 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/config/caisar-detection-data.conf b/config/caisar-detection-data.conf
index 3e256ed4..115dfcf1 100644
--- a/config/caisar-detection-data.conf
+++ b/config/caisar-detection-data.conf
@@ -33,9 +33,9 @@ use_at_auto_level = 1
 [ATP saver]
 name = "SAVer"
 exec = "saver"
-version_switch = "2>&1 | grep Usage"
-version_regexp = "\\(\\)"
-version_ok = ""
+version_switch = "--version 2>&1 | cat"
+version_regexp = "\\(v[0-9.]+\\)"
+version_ok = "v1.0"
 command = "%e %{svm} %{data}"
 driver = "caisar_drivers/saver.drv"
 use_at_auto_level = 1
diff --git a/tests/autodetect.t b/tests/autodetect.t
index fb0fec24..00f7223d 100644
--- a/tests/autodetect.t
+++ b/tests/autodetect.t
@@ -16,7 +16,7 @@ Test autodetect
   1.0.+
 
   $ bin/saver --version
-  1.0
+  v1.0
 
   $ PATH=$(pwd)/bin:$PATH
 
@@ -24,4 +24,4 @@ Test autodetect
   [caisar] Alt-Ergo 2.4.0
            Marabou 1.0.+
            PyRAT 1.1
-           SAVER 1.0
+           SAVer v1.0
diff --git a/tests/bin/saver b/tests/bin/saver
index 0f7abafe..749276f4 100644
--- a/tests/bin/saver
+++ b/tests/bin/saver
@@ -3,7 +3,7 @@
 
 case $1 in
     --version)
-        echo "1.0"
+        echo "v1.0"
         ;;
     *)
         echo "NN: $1"
diff --git a/tests/marabou.t b/tests/marabou.t
index 60fc43d7..74fe4702 100644
--- a/tests/marabou.t
+++ b/tests/marabou.t
@@ -38,12 +38,12 @@ Test verify
   <autodetect>Generating strategies:
   <autodetect>Run: (Marabou --version) > $TMPFILE 2>&1
   <autodetect>Run: (alt-ergo --version) > $TMPFILE 2>&1
-  <autodetect>Run: (saver --version) > $TMPFILE 2>&1
   <autodetect>Run: (pyrat.py --version) > $TMPFILE 2>&1
+  <autodetect>Run: (saver --version 2>&1 | cat) > $TMPFILE 2>&1
   <autodetect>Found prover Alt-Ergo version 2.4.0, OK.
   <autodetect>Found prover Marabou version 1.0.+, OK.
   <autodetect>Found prover PyRAT version 1.1, OK.
-  <autodetect>Found prover SAVER version 1.0, OK.
+  <autodetect>Found prover SAVer version v1.0, OK.
   <autodetect>4 prover(s) added
   Goal G: Unknown
   ()
diff --git a/tests/simple.t b/tests/simple.t
index 55490627..734f4b39 100644
--- a/tests/simple.t
+++ b/tests/simple.t
@@ -16,7 +16,7 @@ Test verify
   1.0.+
 
   $ bin/saver --version
-  1.0
+  v1.0
 
   $ PATH=$(pwd)/bin:$PATH
 
@@ -41,12 +41,12 @@ Test verify
   <autodetect>Generating strategies:
   <autodetect>Run: (Marabou --version) > $TMPFILE 2>&1
   <autodetect>Run: (alt-ergo --version) > $TMPFILE 2>&1
-  <autodetect>Run: (saver --version) > $TMPFILE 2>&1
   <autodetect>Run: (pyrat.py --version) > $TMPFILE 2>&1
+  <autodetect>Run: (saver --version 2>&1 | cat) > $TMPFILE 2>&1
   <autodetect>Found prover Alt-Ergo version 2.4.0, OK.
   <autodetect>Found prover Marabou version 1.0.+, OK.
   <autodetect>Found prover PyRAT version 1.1, OK.
-  <autodetect>Found prover SAVER version 1.0, OK.
+  <autodetect>Found prover SAVer version v1.0, OK.
   <autodetect>4 prover(s) added
   Goal G: Unknown
   ()
diff --git a/tests/simple_onnx.t b/tests/simple_onnx.t
index 419eb106..4cc0e877 100644
--- a/tests/simple_onnx.t
+++ b/tests/simple_onnx.t
@@ -33,12 +33,12 @@ Test verify
   <autodetect>Generating strategies:
   <autodetect>Run: (Marabou --version) > $TMPFILE 2>&1
   <autodetect>Run: (alt-ergo --version) > $TMPFILE 2>&1
-  <autodetect>Run: (saver --version) > $TMPFILE 2>&1
   <autodetect>Run: (pyrat.py --version) > $TMPFILE 2>&1
+  <autodetect>Run: (saver --version 2>&1 | cat) > $TMPFILE 2>&1
   <autodetect>Found prover Alt-Ergo version 2.4.0, OK.
   <autodetect>Found prover Marabou version 1.0.+, OK.
   <autodetect>Found prover PyRAT version 1.1, OK.
-  <autodetect>Found prover SAVER version 1.0, OK.
+  <autodetect>Found prover SAVer version v1.0, OK.
   <autodetect>4 prover(s) added
   Goal G: Unknown
   ()
-- 
GitLab