Merge the core and python tests in the tests/ directory

* tests/: Rename as...
* tests/core/: ... this.
* python/tests/: Rename as...
* tests/python/: ... this.
* python/tests/run.in: Move as...
* tests/run.in: This, and adjust.
* tests/Makefile.am: Adjust to run both core and python tests.
* configure.ac, README, debian/python3-spot.examples, debian/rules,
doc/org/tut.org, python/Makefile.am, spot/ltsmin/Makefile.am,
spot/ltsmin/kripke.test, spot/sanity/ipynb.test: Adjust.
This commit is contained in:
Alexandre Duret-Lutz 2015-12-30 09:50:52 +01:00
parent 18572db39f
commit 5cb94a1a3f
197 changed files with 734 additions and 715 deletions

View file

@ -1,136 +0,0 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2015 Laboratoire de Recherche et
# Développement de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
#
# Spot is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# Spot is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. ./defs
set -e
ltldo=../../bin/ltldo
ltl2tgba=../../bin/ltl2tgba
genltl=../../bin/genltl
run 0 $ltldo -f a -f 'a&b' -t 'echo %f,%s' >output
cat >expected <<EOF
a,a
(a) & (b),(a) && (b)
EOF
diff output expected
# Renaming
run 0 $ltldo -f a -f 'a&_b' -t 'echo %f,%s' >output
cat >expected <<EOF
a,a
(p0) & (p1),(p0) && (p1)
EOF
diff output expected
# Test timeouts. This test should take 2*2 seconds.
$genltl --or-g=1..2 |
run 0 $ltldo -F- -t 'sleep 10; echo %f' -T1 -t 'sleep 10; echo %f' \
>output 2>stderr
test -z "`cat output`"
test 4 = `grep -c warning: stderr`
$genltl --and-gf=1..3 |
run 0 $ltldo "{tgba}$ltl2tgba %f -H >%H" "{ba}$ltl2tgba >%N %f -s" \
--stats="%T,%R,%f,%s,%t,%e" >output
cat output
cat >expected <<EOF
tgba,1,GFp1,1,2,2
ba,1,GFp1,2,4,4
tgba,2,GFp1 & GFp2,1,4,4
ba,2,GFp1 & GFp2,3,12,8
tgba,3,GFp1 & GFp2 & GFp3,1,8,8
ba,3,GFp1 & GFp2 & GFp3,4,32,13
EOF
diff output expected
# Renaming
run 0 $ltldo "$ltl2tgba -H %s>%H" -f GF_foo_ -H >output
cat output
# The HOA output uses _foo_ as atomic proposition, but the name shows
# that GFp0 was actually given to ltl2tgba.
cat >expected <<EOF
HOA: v1
name: "GFp0"
States: 1
Start: 0
AP: 1 "_foo_"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: trans-labels explicit-labels trans-acc complete
properties: deterministic stutter-invariant
--BODY--
State: 0
[0] 0 {0}
[!0] 0
--END--
EOF
diff output expected
# But we can force the name in the output:
run 0 $ltldo "$ltl2tgba -H %s>%H" -f GF_foo_ -H --name=%f >output
cat output
cat >expected <<EOF
HOA: v1
name: "GF_foo_"
States: 1
Start: 0
AP: 1 "_foo_"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: trans-labels explicit-labels trans-acc complete
properties: deterministic stutter-invariant
--BODY--
State: 0
[0] 0 {0}
[!0] 0
--END--
EOF
diff output expected
# Not trusting properties
run 0 $ltldo "$ltl2tgba -H %s>%H" -f GF_foo_ -H --trust-hoa=no >output
cat output
cat >expected <<EOF
HOA: v1
name: "GFp0"
States: 1
Start: 0
AP: 1 "_foo_"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: trans-labels explicit-labels trans-acc complete
properties: deterministic
--BODY--
State: 0
[0] 0 {0}
[!0] 0
--END--
EOF
diff output expected
$ltldo ': %s; true>%O' -f GFa 2>stderr && exit 1
test $? = 2
grep ':.*empty input' stderr
grep 'ltldo: aborting' stderr
$ltldo '{name} foo/bar/ltl2baextended' -f GFa 2>stderr && exit 1
grep 'error:.*foo/bar/ltl2baextended -f .*>.*' stderr