ltlcross, autcross: add --quiet/-q option

* bin/autcross.cc, bin/ltlcross.cc: Implement it.
* doc/org/autcross.org, doc/org/ltlcross.org, NEWS: Document it.
* doc/org/spot.css: Add colors for Makefile snippets.
* tests/core/autcross4.test, tests/core/ltlcross3.test,
tests/core/ltlcrossce.test: Add test cases.
This commit is contained in:
Alexandre Duret-Lutz 2019-07-17 17:34:01 +02:00
parent 6a71438268
commit 6f37ff8ed0
9 changed files with 275 additions and 58 deletions

View file

@ -1,6 +1,6 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2018 Laboratoire de Recherche et Développement de
# Copyright (C) 2018, 2019 Laboratoire de Recherche et Développement de
# l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
@ -26,6 +26,10 @@ ltl2tgba -f FGa '"a = b"U!c' |
test 2 = `grep -c '"FGa"' out.csv`
test 2 = `grep -c '"""a = b"" U !c"' out.csv`
ltl2tgba -f FGa '"a = b"U!c' |
autcross -q 'autfilt' 'ltl2tgba -B %M >%O' 2>out
test 0 -eq `wc -l <out`
cat >in <<EOF
HOA: v1
@ -75,6 +79,15 @@ grep 'some error was detected ' err
grep '1 non-zero exit status was ignored' err
test 1 = `wc -l < out.csv`
# Same with -q
autcross -T3 -q --language-preserved --ignore-execution-failures \
--csv=out.csv --omit-missing --low --medium --high --stop-on-error \
--fail-on-timeout \
'sleep 10; autfilt %H>%O' 'false %H %O' 2>err -Fin && exit 1
cat err
test 4 = `wc -l <err`
test 1 = `wc -l < out.csv`
autcross - 2> err && exit 1
cat err
grep 'autcross: No tool to run' err

View file

@ -281,6 +281,20 @@ run 1 ltlcross 'echo HOA: --ABORT-- %f > %H' \
-f a --csv=out.csv 2>stderr
grep '"exit_status"' out.csv
grep '"exit_code"' out.csv
test `grep ': echo HOA' stderr | wc -l` -eq 2
grep -q -i 'performing' stderr
test `grep 'error:.*aborted' stderr | wc -l` -eq 2
test `grep '"aborted",-1' out.csv | wc -l` -eq 2
test 3 = `wc -l < out.csv`
check_csv out.csv
# Support for --ABORT-- in HOA.
run 1 ltlcross -q 'echo HOA: --ABORT-- %f > %H' \
-f a --csv=out.csv 2>stderr
grep '"exit_status"' out.csv
grep '"exit_code"' out.csv
test `grep ': echo HOA' stderr | wc -l` -eq 2
grep -q -i 'performing' stderr && exit 1
test `grep 'error:.*aborted' stderr | wc -l` -eq 2
test `grep '"aborted",-1' out.csv | wc -l` -eq 2
test 3 = `wc -l < out.csv`

View file

@ -101,3 +101,7 @@ grep 'error: P1\*N0 is nonempty' errors
grep 'error: P1\*N1 is nonempty' errors
test `grep cycle errors | wc -l` = 3
test `grep '^error:' errors | wc -l` = 4
ltlcross -q -f 'G(F(p0) & F(G(!p1))) | (F(G(!p0)) & G(F(p1)))' \
"ltl2tgba --lbtt %f >%T" "./fake %l >%T" 2> errors && exit 1
test 8 -eq `wc -l <errors`