Commit 5cb94a1a authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz

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.
parent 18572db3
......@@ -151,7 +151,9 @@ spot/ Sources for libspot.
sanity/ Sanity tests for the whole project.
bin/ Command-line tools built on top of libspot.
man/ Man pages for the above tools.
tests/ Tests for libspot and the binaries.
tests/ Test suite
core/ Tests for libspot and the binaries.
python/ Tests for Python bindings.
doc/ Documentation for Spot.
org/ Source of userdoc/ as org-mode files.
tl/ Documentation of the Temporal Logic operators.
......@@ -167,7 +169,6 @@ bench/ Benchmarks for ...
stutter/ ... stutter-invariance checking algorithms,
wdba/ ... WDBA minimization (for obligation properties).
python/ Python bindings for Spot and BuDDy
tests/ Tests for these bindings
ajax/ LTL-to-TGBA translator with web interface, using Javascript.
Third party software
......
......@@ -219,14 +219,13 @@ AC_CONFIG_FILES([
spot/twa/Makefile
python/ajax/Makefile
python/Makefile
python/tests/Makefile
tests/defs
tests/core/defs
tests/Makefile
tools/x-to-1
])
AC_CONFIG_FILES([doc/org/g++wrap], [chmod +x doc/org/g++wrap])
AC_CONFIG_FILES([doc/dot], [chmod +x doc/dot])
AC_CONFIG_FILES([python/tests/run], [chmod +x python/tests/run])
AC_CONFIG_FILES([tests/run], [chmod +x tests/run])
AC_OUTPUT
case $VERSION:$enable_devel in
......
python/tests/*.ipynb
python/tests/*.html
tests/python/*.ipynb
tests/python/*.html
......@@ -84,8 +84,8 @@ override_dh_python3:
dh_python3 -p python3-spot
override_dh_auto_build:
dh_auto_build
$(MAKE) -C python/tests nb-html
$(MAKE) -C tests/python nb-html
fix-mathjax:
perl -pi -e 's|http://orgmode.org/mathjax/MathJax.js|file:///usr/share/javascript/mathjax/MathJax.js|' doc/userdoc/*.html
perl -pi -e 's|https://cdn.mathjax.org/mathjax/latest/MathJax.js|file:///usr/share/javascript/mathjax/MathJax.js|' python/tests/*.html
perl -pi -e 's|https://cdn.mathjax.org/mathjax/latest/MathJax.js|file:///usr/share/javascript/mathjax/MathJax.js|' tests/python/*.html
......@@ -30,7 +30,7 @@ three interfaces supported by Spot: shell commands, Python, or C++.
* Examples in Python only
In directory =python/tests=, the [[file:install.org][Spot tarball]] contains a small
In directory the, =python/tests= [[file:install.org][Spot tarball]] contains a small
collection of IPython notebooks. As the name of the directory implies,
these are part of the test suite for the Python bindings, however they
can be interesting to look at if you want to see more code examples.
......
......@@ -20,7 +20,7 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
SUBDIRS = . ajax tests
SUBDIRS = . ajax
AM_CPPFLAGS = -I$(PYTHONINC) -I$(top_builddir) -I$(top_srcdir) \
$(BUDDY_CPPFLAGS) -DSWIG_TYPE_TABLE=spot
......
## -*- coding: utf-8 -*-
## Copyright (C) 2010, 2012, 2013, 2014, 2015 Labortatoire de
## Recherche et Développement de l'EPITA.
## Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
## département Systèmes Répartis Coopératifs (SRC), Université Pierre
## et Marie Curie.
##
## 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/>.
EXTRA_DIST = \
$(TESTS) \
ltl2tgba.py \
ipnbdoctest.py
LOG_COMPILER = ./run
LOG_DRIVER = $(TEST_LOG_DRIVER)
# ensure run is rebuilt before the tests are run.
check_SCRIPTS = run
TESTS = \
acc_cond.ipynb \
accparse.ipynb \
accparse2.py \
alarm.py \
automata.ipynb \
automata-io.ipynb \
bddnqueen.py \
decompose.ipynb \
formulas.ipynb \
implies.py \
interdep.py \
ltl2tgba.test \
ltlparse.py \
ltlsimple.py \
minato.py \
optionmap.py \
parsetgba.py \
piperead.ipynb \
product.ipynb \
randaut.ipynb \
randgen.py \
randltl.ipynb \
relabel.py \
remfin.py \
satmin.py \
setxor.py \
testingaut.ipynb
SUFFIXES = .ipynb .html
.ipynb.html:
$(IPYTHON) nbconvert $< --to html
.PHONY: nb-html
nb-html: $(TESTS:.ipynb=.html)
......@@ -42,11 +42,11 @@ check_SCRIPTS = defs
TESTS = check.test finite.test finite2.test kripke.test
EXTRA_DIST = $(TESTS) beem-peterson.4.dve finite.dve finite.pm
kripke.test: $(top_builddir)/tests/parse_print$(EXEEXT)
kripke.test: $(top_builddir)/tests/core/parse_print$(EXEEXT)
$(top_builddir)/tests/parse_print$(EXEEXT):
$(top_builddir)/tests/core/parse_print$(EXEEXT):
cd $(top_builddir)/tests && \
$(MAKE) $(AM_MAKEFLAGS) parse_print$(EXEEXT)
$(MAKE) $(AM_MAKEFLAGS) core/parse_print$(EXEEXT)
distclean-local:
rm -rf $(TESTS:.test=.dir)
......@@ -34,9 +34,9 @@ fi
set -e
run 0 ../modelcheck -gK $srcdir/finite.dve 'F("P.a > 5")' > output
run 0 $top_builddir/tests/parse_print output | tr -d '"' > output2
run 0 $top_builddir/tests/core/parse_print output | tr -d '"' > output2
tr -d '"' < output >outputF
cmp outputF output2
../modelcheck -gK $srcdir/beem-peterson.4.dve '!G("pos[1] < 3")' > outputP
$top_builddir/tests/ikwiad -e -KPoutputP '!G("pos[1] < 3")'
$top_builddir/tests/core/ikwiad -e -KPoutputP '!G("pos[1] < 3")'
......@@ -33,7 +33,7 @@ my $top_srcdir = $ENV{top_srcdir} || "../../";
my $top_srcdir_len = length($top_srcdir) + 1;
my $tut = "$top_srcdir/doc/org/tut.org";
my $dir = "$top_srcdir/python/tests";
my $dir = "$top_srcdir/tests/python";
unless (-f $tut)
{
print STDERR "$tut not found";
......@@ -58,10 +58,10 @@ while (<FD>)
}
close(FD);
open(FD, "$dir/Makefile.am") or die $!;
open(FD, "$dir/../Makefile.am") or die "$!";
while (<FD>)
{
if (m:\s([\w-]+\.ipynb):)
if (m:python/([\w-]+\.ipynb):)
{
# print "$1 exist";
unless (exists $seen{$1})
......
acc
apcollect
bddprod
bitvect
blue_counter
checkpsl
checkta
complement
consterm
defs
.deps
*.dot
eltl2tgba
emptchk
defs
equals
expect
expldot
explicit
explicit2
explicit3
explprod
graph
genltl
input
intvcomp
intvcmp2
kind
length
.libs
ikwiad
ltl2dot
ltl2text
ltlmagic
ltlprod
ltlrel
lunabbrev
Makefile
Makefile.in
maskacc
mixprod
nequals
nenoform
ngraph
output1
output2
parse_print
powerset
*.ps
randltl
randtgba
readsat
readsave
reduc
reduceu
reductau
reductaustr
reduccmp
reductgba
stdout
spotlbtt
syntimpl
taatgba
tgbagraph
tgbaread
tostring
tripprod
tunabbrev
tunenoform
unabbrevwm
*.dir
......@@ -20,234 +20,282 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
AUTOMAKE_OPTIONS = subdir-objects
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) $(BUDDY_CPPFLAGS)
AM_CXXFLAGS = $(WARNING_CXXFLAGS)
LDADD = $(top_builddir)/spot/libspot.la
# These are the most used test programs, and they are also useful
# to run manually outside the test suite. Always build them.
noinst_PROGRAMS = ikwiad randtgba
noinst_PROGRAMS = core/ikwiad core/randtgba
TEST_EXTENTIONS = .test .py .ipynb
LOG_COMPILER = ./run
TEST_LOG_COMPILER = ./run
LOG_DRIVER = $(TEST_LOG_DRIVER)
# ensure run is rebuilt before the tests are run.
check_SCRIPTS = run core/defs
check_SCRIPTS = defs
# Keep this sorted alphabetically.
check_PROGRAMS = \
acc \
bitvect \
complement \
checkpsl \
checkta \
consterm \
emptchk \
equals \
graph \
kind \
length \
intvcomp \
intvcmp2 \
ltlprod \
ltl2dot \
ltl2text \
ltlrel \
lunabbrev \
nequals \
nenoform \
ngraph \
parse_print \
readsat \
reduc \
reduccmp \
reduceu \
reductaustr \
syntimpl \
taatgba \
tgbagraph \
tostring \
tunabbrev \
tunenoform
core/acc \
core/bitvect \
core/complement \
core/checkpsl \
core/checkta \
core/consterm \
core/emptchk \
core/equals \
core/graph \
core/kind \
core/length \
core/intvcomp \
core/intvcmp2 \
core/ltlprod \
core/ltl2dot \
core/ltl2text \
core/ltlrel \
core/lunabbrev \
core/nequals \
core/nenoform \
core/ngraph \
core/parse_print \
core/readsat \
core/reduc \
core/reduccmp \
core/reduceu \
core/reductaustr \
core/syntimpl \
core/taatgba \
core/tgbagraph \
core/tostring \
core/tunabbrev \
core/tunenoform
# Keep this sorted alphabetically.
acc_SOURCES = acc.cc
bitvect_SOURCES = bitvect.cc
checkpsl_SOURCES = checkpsl.cc
checkta_SOURCES = checkta.cc
complement_SOURCES = complementation.cc
emptchk_SOURCES = emptchk.cc
graph_SOURCES = graph.cc
ikwiad_SOURCES = ikwiad.cc
intvcomp_SOURCES = intvcomp.cc
intvcmp2_SOURCES = intvcmp2.cc
ltlprod_SOURCES = ltlprod.cc
ngraph_SOURCES = ngraph.cc
parse_print_SOURCES = parse_print_test.cc
randtgba_SOURCES = randtgba.cc
readsat_SOURCES = readsat.cc
taatgba_SOURCES = taatgba.cc
tgbagraph_SOURCES = twagraph.cc
consterm_SOURCES = consterm.cc
equals_SOURCES = equalsf.cc
kind_SOURCES = kind.cc
length_SOURCES = length.cc
ltl2dot_SOURCES = readltl.cc
ltl2dot_CPPFLAGS = $(AM_CPPFLAGS) -DDOTTY
ltl2text_SOURCES = readltl.cc
ltlrel_SOURCES = ltlrel.cc
lunabbrev_SOURCES = equalsf.cc
lunabbrev_CPPFLAGS = $(AM_CPPFLAGS) -DUNABBREV='"^ie"'
nenoform_SOURCES = equalsf.cc
nenoform_CPPFLAGS = $(AM_CPPFLAGS) -DNENOFORM
nequals_SOURCES = equalsf.cc
nequals_CPPFLAGS = $(AM_CPPFLAGS) -DNEGATE
reduc_SOURCES = reduc.cc
reduccmp_SOURCES = equalsf.cc
reduccmp_CPPFLAGS = $(AM_CPPFLAGS) -DREDUC
reduceu_SOURCES = equalsf.cc
reduceu_CPPFLAGS = $(AM_CPPFLAGS) -DREDUC -DEVENT_UNIV
reductaustr_SOURCES = equalsf.cc
reductaustr_CPPFLAGS = $(AM_CPPFLAGS) -DREDUC_TAUSTR
syntimpl_SOURCES = syntimpl.cc
tostring_SOURCES = tostring.cc
tunabbrev_SOURCES = equalsf.cc
tunabbrev_CPPFLAGS = $(AM_CPPFLAGS) -DUNABBREV='"^ieFG"'
tunenoform_SOURCES = equalsf.cc
tunenoform_CPPFLAGS = $(AM_CPPFLAGS) -DNENOFORM -DUNABBREV='"^ieFG"'
core_acc_SOURCES = core/acc.cc
core_bitvect_SOURCES = core/bitvect.cc
core_checkpsl_SOURCES = core/checkpsl.cc
core_checkta_SOURCES = core/checkta.cc
core_complement_SOURCES = core/complementation.cc
core_emptchk_SOURCES = core/emptchk.cc
core_graph_SOURCES = core/graph.cc
core_ikwiad_SOURCES = core/ikwiad.cc
core_intvcomp_SOURCES = core/intvcomp.cc
core_intvcmp2_SOURCES = core/intvcmp2.cc
core_ltlprod_SOURCES = core/ltlprod.cc
core_ngraph_SOURCES = core/ngraph.cc
core_parse_print_SOURCES = core/parse_print_test.cc
core_randtgba_SOURCES = core/randtgba.cc
core_readsat_SOURCES = core/readsat.cc
core_taatgba_SOURCES = core/taatgba.cc
core_tgbagraph_SOURCES = core/twagraph.cc
core_consterm_SOURCES = core/consterm.cc
core_equals_SOURCES = core/equalsf.cc
core_kind_SOURCES = core/kind.cc
core_length_SOURCES = core/length.cc
core_ltl2dot_SOURCES = core/readltl.cc
core_ltl2dot_CPPFLAGS = $(AM_CPPFLAGS) -DDOTTY
core_ltl2text_SOURCES = core/readltl.cc
core_ltlrel_SOURCES = core/ltlrel.cc
core_lunabbrev_SOURCES = core/equalsf.cc
core_lunabbrev_CPPFLAGS = $(AM_CPPFLAGS) -DUNABBREV='"^ie"'
core_nenoform_SOURCES = core/equalsf.cc
core_nenoform_CPPFLAGS = $(AM_CPPFLAGS) -DNENOFORM
core_nequals_SOURCES = core/equalsf.cc
core_nequals_CPPFLAGS = $(AM_CPPFLAGS) -DNEGATE
core_reduc_SOURCES = core/reduc.cc
core_reduccmp_SOURCES = core/equalsf.cc
core_reduccmp_CPPFLAGS = $(AM_CPPFLAGS) -DREDUC
core_reduceu_SOURCES = core/equalsf.cc
core_reduceu_CPPFLAGS = $(AM_CPPFLAGS) -DREDUC -DEVENT_UNIV
core_reductaustr_SOURCES = core/equalsf.cc
core_reductaustr_CPPFLAGS = $(AM_CPPFLAGS) -DREDUC_TAUSTR
core_syntimpl_SOURCES = core/syntimpl.cc
core_tostring_SOURCES = core/tostring.cc
core_tunabbrev_SOURCES = core/equalsf.cc
core_tunabbrev_CPPFLAGS = $(AM_CPPFLAGS) -DUNABBREV='"^ieFG"'
core_tunenoform_SOURCES = core/equalsf.cc
core_tunenoform_CPPFLAGS = $(AM_CPPFLAGS) -DNENOFORM -DUNABBREV='"^ieFG"'
# Keep this sorted by STRENGTH. Test basic things first,
# because such failures will be easier to diagnose and fix.
TESTS = $(TESTS_ltl) $(TESTS_graph) $(TESTS_kripke) $(TESTS_twa)
TESTS_ltl = \
bare.test \
parse.test \
parseerr.test \
utf8.test \
length.test \
equals.test \
tostring.test \
lunabbrev.test \
tunabbrev.test \
nenoform.test \
tunenoform.test \
unabbrevwm.test \
consterm.test \
kind.test \
remove_x.test \
ltlrel.test \
ltlgrind.test \
ltlcrossgrind.test \
ltlfilt.test \
exclusive-ltl.test \
latex.test \
lbt.test \
lenient.test \
rand.test \
isop.test \
syntimpl.test \
reduc.test \
reduc0.test \
reducpsl.test \
reduccmp.test \
uwrm.test \
eventuniv.test \
stutter-ltl.test
TESTS = $(TESTS_tl) $(TESTS_graph) $(TESTS_kripke) $(TESTS_twa) $(TESTS_python)
TESTS_tl = \
core/bare.test \
core/parse.test \
core/parseerr.test \
core/utf8.test \
core/length.test \
core/equals.test \
core/tostring.test \
core/lunabbrev.test \
core/tunabbrev.test \
core/nenoform.test \
core/tunenoform.test \
core/unabbrevwm.test \
core/consterm.test \
core/kind.test \
core/remove_x.test \
core/ltlrel.test \
core/ltlgrind.test \
core/ltlcrossgrind.test \
core/ltlfilt.test \
core/exclusive-ltl.test \
core/latex.test \
core/lbt.test \
core/lenient.test \
core/rand.test \
core/isop.test \
core/syntimpl.test \
core/reduc.test \
core/reduc0.test \
core/reducpsl.test \
core/reduccmp.test \
core/uwrm.test \
core/eventuniv.test \
core/stutter-ltl.test
TESTS_graph = \
graph.test \
ngraph.test \
tgbagraph.test
core/graph.test \
core/ngraph.test \
core/tgbagraph.test
TESTS_kripke = \
kripke.test
core/kripke.test
TESTS_twa = \
acc.test \
acc2.test \
intvcomp.test \
bitvect.test \
ltlcross3.test \
taatgba.test \
renault.test \
nondet.test \
det.test \
neverclaimread.test \
parseaut.test \
optba.test \
complete.test \
complement.test \
remfin.test \
dstar.test \
readsave.test \
ltldo.test \
ltldo2.test \
maskacc.test \
maskkeep.test \
prodor.test \
simdet.test \
sim2.test \
sim3.test \
ltl2tgba.test \
ltl2neverclaim.test \
ltl2neverclaim-lbtt.test \
ltlprod.test \
explprod.test \
explpro2.test \
explpro3.test \
explpro4.test \
tripprod.test \
dupexp.test \
exclusive-tgba.test \
remprop.test \
degendet.test \
degenid.test \
degenlskip.test \
randomize.test \
lbttparse.test \
scc.test \
sccdot.test \
sccsimpl.test \
sepsets.test \
dbacomp.test \
obligation.test \
wdba.test \
wdba2.test \
babiak.test \