From 06b31fab6b9968ea1d6a58435cf210af5e6f540a Mon Sep 17 00:00:00 2001 From: Andres Noetzli Date: Thu, 15 Jun 2017 14:11:29 -0700 Subject: [PATCH] Make comp script more robust In certain cases, the trace executor inserts empty lines, which threw off our competition script. This commit adds code to ignores empty lines. --- contrib/run-script-smtcomp2017-application | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) mode change 100644 => 100755 contrib/run-script-smtcomp2017-application diff --git a/contrib/run-script-smtcomp2017-application b/contrib/run-script-smtcomp2017-application old mode 100644 new mode 100755 index 528a5deab..ddcc1f0c6 --- a/contrib/run-script-smtcomp2017-application +++ b/contrib/run-script-smtcomp2017-application @@ -2,13 +2,19 @@ cvc4=./cvc4-application -read line +line="" +while [[ -z "$line" ]]; do + read line +done if [ "$line" != '(set-option :print-success true)' ]; then echo 'ERROR: first line supposed to be set-option :print-success, but got: "'"$line"'"' >&2 exit 1 fi echo success -read line +line="" +while [[ -z "$line" ]]; do + read line +done logic=$(expr "$line" : ' *(set-logic *\([A-Z_]*\) *) *$') if [ -z "$logic" ]; then echo 'ERROR: second line supposed to be set-logic, but got: "'"$line"'"' >&2 -- 2.30.2