tests: avoid seq

Partial fix for #501.

* tests/core/prodchain.test: Hardcode the seq output.
* tests/core/bricks.test: Use $AWK instead of seq.
* tests/core/defs.in: Define $AWK.
* NEWS: Mention the bug.
This commit is contained in:
Alexandre Duret-Lutz 2022-03-03 18:01:11 +01:00
parent 93fb11017b
commit 7b7e1b254b
4 changed files with 14 additions and 8 deletions

3
NEWS
View file

@ -74,6 +74,9 @@ New in spot 2.10.4.dev (net yet released)
- work around a portability issue in Flex 2.6.4 preventing
compilation on OpenBSD.
- Do not use the seq command in test cases, it is not available
everywhere.
New in spot 2.10.4 (2022-02-01)
Bug fixed:

View file

@ -1,7 +1,7 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2020 Laboratoire de Recherche et Développement de
# l'Epita (LRDE).
# Copyright (C) 2020, 2022 Laboratoire de Recherche et Développement
# de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
#
@ -21,12 +21,13 @@
. ./defs
set -e
seq 0 1999 > expected
# The seq command is not always available, but we assume awk is.
$AWK 'BEGIN{for(x=0;x<2000;++x) print x;}' >expected
../bricks > stdout
cat stdout | head -n 2000 | awk '{print $2}' | sed 's/{//g' | \
awk -F',' '{print $1}' | sort -n > map
cat stdout | head -n 2000 | $AWK '{print $2}' | sed 's/{//g' | \
$AWK -F',' '{print $1}' | sort -n > map
diff expected map

View file

@ -1,5 +1,5 @@
# -*- mode: shell-script; coding: utf-8 -*-
# Copyright (C) 2009, 2010, 2012, 2013, 2015 Laboratoire de Recherche
# Copyright (C) 2009, 2010, 2012, 2013, 2015, 2022 Laboratoire de Recherche
# et Développement de l'Epita (LRDE).
# Copyright (C) 2003, 2004, 2006 Laboratoire d'Informatique de Paris 6 (LIP6),
# département Systèmes Répartis Coopératifs (SRC), Université Pierre
@ -57,6 +57,7 @@ case $srcdir in
*) srcdir=../$srcdir
esac
AWK='@AWK@'
DOT='@DOT@'
LBTT="@LBTT@"
LBTT_TRANSLATE="@LBTT_TRANSLATE@"

View file

@ -1,6 +1,6 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2018 Laboratoire de Recherche et Développement
# Copyright (C) 2018, 2022 Laboratoire de Recherche et Développement
# de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
@ -23,7 +23,8 @@ set -e
set x
shift
for i in `seq 1 42`; do
for i in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 \
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42; do
ltl2tgba "{a[*$i]}[]->GFb" > $i.hoa
done
for i in *.hoa; do