From 087329e0e409e3b4e8a41ad5946ff217d8f698b2 Mon Sep 17 00:00:00 2001 From: Michele Alberti <michele.alberti@cea.fr> Date: Tue, 23 Nov 2021 15:39:57 +0100 Subject: [PATCH] [Marabou] Add test stub. --- tests/autodetect.t | 7 +------ tests/bin/Marabou | 13 +++++++++++++ tests/dune | 1 + tests/marabout.t | 18 ++++++++++-------- tests/simple.t | 7 +------ 5 files changed, 26 insertions(+), 20 deletions(-) create mode 100644 tests/bin/Marabou diff --git a/tests/autodetect.t b/tests/autodetect.t index b9cc4b2c..5bc8e94f 100644 --- a/tests/autodetect.t +++ b/tests/autodetect.t @@ -4,11 +4,6 @@ Test autodetect > echo "2.4.0" > EOF - $ cat - > bin/Marabou << EOF - > #!/bin/sh - > echo "1.0.+" - > EOF - $ chmod u+x bin/alt-ergo bin/pyrat.py bin/Marabou $ bin/alt-ergo @@ -17,7 +12,7 @@ Test autodetect $ bin/pyrat.py --version PyRAT 1.1 - $ bin/Marabou + $ bin/Marabou --version 1.0.+ $ PATH=$(pwd)/bin:$PATH diff --git a/tests/bin/Marabou b/tests/bin/Marabou new file mode 100644 index 00000000..47211a62 --- /dev/null +++ b/tests/bin/Marabou @@ -0,0 +1,13 @@ +#!/bin/sh + + +case $1 in + --version) + echo "1.0.+" + ;; + *) + echo "NN: $1" + echo "Goal:" + cat $2 + echo "Unknown" +esac diff --git a/tests/dune b/tests/dune index d7f5674d..eac4b0ca 100644 --- a/tests/dune +++ b/tests/dune @@ -3,4 +3,5 @@ (package caisar) TestNetwork.nnet bin/pyrat.py + bin/Marabou )) diff --git a/tests/marabout.t b/tests/marabout.t index b05012d8..db5c02bc 100644 --- a/tests/marabout.t +++ b/tests/marabout.t @@ -4,11 +4,6 @@ Test verify > echo "2.4.0" > EOF - $ cat - > bin/Marabou << EOF - > #!/bin/sh - > echo "1.0.+" - > EOF - $ chmod u+x bin/alt-ergo bin/pyrat.py bin/Marabou $ bin/alt-ergo @@ -17,7 +12,7 @@ Test verify $ bin/pyrat.py --version PyRAT 1.1 - $ bin/Marabou + $ bin/Marabou --version 1.0.+ $ PATH=$(pwd)/bin:$PATH @@ -43,7 +38,14 @@ Test verify <autodetect>Found prover Marabou version 1.0.+, OK. <autodetect>Found prover PyRAT version 1.1, OK. <autodetect>3 prover(s) added - Goal G: High failure + Goal G: Unknown + () Output: - 1.0.+ + NN: ./TestNetwork.nnet + Goal: + x0 > 0.0 + x0 < 0.5 + y0 > 0.0 + y0 < 0.5 + Unknown diff --git a/tests/simple.t b/tests/simple.t index a6765630..7b41c27d 100644 --- a/tests/simple.t +++ b/tests/simple.t @@ -4,11 +4,6 @@ Test verify > echo "2.4.0" > EOF - $ cat - > bin/Marabou << EOF - > #!/bin/sh - > echo "1.0.+" - > EOF - $ chmod u+x bin/alt-ergo bin/pyrat.py bin/Marabou $ bin/alt-ergo @@ -17,7 +12,7 @@ Test verify $ bin/pyrat.py --version PyRAT 1.1 - $ bin/Marabou + $ bin/Marabou --version 1.0.+ $ PATH=$(pwd)/bin:$PATH -- GitLab