Commit 92126279 authored by MARCHE Claude's avatar MARCHE Claude

'echo -n' is not portable and should be banned

parent d2c5356a
......@@ -12,7 +12,7 @@ suffix=$1
goods () {
pgm="bin/why3prove$suffix"
for f in $1/*.[wm][hl][yw] ; do
echo -n " $f... "
printf " $f... "
# running Why
if ! $pgm $2 $f > /dev/null 2>&1; then
echo "FAILED!"
......@@ -29,7 +29,7 @@ goods () {
bads () {
pgm="bin/why3prove$suffix"
for f in $1/*.[wm][hl][yw] ; do
echo -n " $f... "
printf " $f... "
if $pgm $2 $f > /dev/null 2>&1; then
echo "SHOULD FAIL!"
# echo "env: WHY3DATA='$WHY3DATA'"
......@@ -44,7 +44,7 @@ drivers () {
pgm="bin/why3prove$suffix"
for f in $1/*.drv; do
if [[ $f == drivers/ocaml*.drv ]]; then continue; fi
echo -n " $f... "
printf " $f... "
# running Why
if ! echo "theory Test goal G : 1=2 end" | $pgm -F why --driver $f - > /dev/null 2>&1; then
echo "why FAILED"
......@@ -58,7 +58,7 @@ drivers () {
valid_goals () {
pgm="bin/why3prove$suffix"
for f in $1/*.mlw; do
echo -n " "$f"... "
printf " "$f"... "
if $pgm -t 10 -P alt-ergo $f | grep -q -v Valid; then
echo "valid test $f failed!"
echo "$pgm -P alt-ergo $f"
......@@ -73,7 +73,7 @@ valid_goals () {
invalid_goals () {
pgm="bin/why3prove$suffix"
for f in $1/*.mlw; do
echo -n " "$f"... "
printf " "$f"... "
if $pgm -t 3 -P alt-ergo $f | grep -q Valid; then
echo "invalid test $f failed!"
echo "$pgm -P alt-ergo $f"
......@@ -87,7 +87,7 @@ invalid_goals () {
execute () {
pgm="bin/why3execute$suffix"
echo -n "$1 $2... "
printf "$1 $2... "
if $pgm $1 $2 > /dev/null 2>&1; then
echo "ok"
else
......@@ -103,17 +103,17 @@ extract_and_run () {
shift
prg=$1
shift
echo -n "$dir... "
printf "$dir... "
rm -f $dir/$prg
echo -n "clean... "
printf "clean... "
if BENCH=yes make -C $dir clean > /dev/null 2>&1; then
echo -n "extract... "
printf "extract... "
if BENCH=yes make -C $dir extract > /dev/null 2>&1; then
echo -n "compile... "
printf "compile... "
if BENCH=yes make -C $dir > /dev/null 2>&1; then
echo -n "execute... "
printf "execute... "
if $dir/main.opt "$@" > /dev/null 2>&1; then
echo -n "doc... "
printf "doc... "
if BENCH=yes make -C $dir doc > /dev/null 2>&1; then
echo "ok"
else
......@@ -150,7 +150,7 @@ extract_and_run () {
list_stuff () {
pgm="bin/why3$suffix"
echo -n "$1 "
printf "$1 "
if $pgm $1 > /dev/null 2>&1; then
echo "ok"
else
......
......@@ -15,7 +15,7 @@ esac
cd $dir
run_cvc4_15 () {
echo -n " $1... "
printf " $1... "
../bin/why3prove.opt -P "CVC4,1.5" --timelimit 1 --get-ce $1 | \
# This ad hoc sed removes any timing information from counterexamples output.
# Counterexamples in JSON format cannot match this regexp.
......
......@@ -25,7 +25,7 @@
# See the GNU Library General Public License version 2 for more details
# (enclosed in the file LGPL).
AC_INIT([Why3], m4_esyscmd([. ./Version; echo -n "$VERSION"]))
AC_INIT([Why3], m4_esyscmd([. ./Version; printf "$VERSION"]))
# verbosemake
......
......@@ -39,11 +39,11 @@ export shapes=""
run_dir () {
for f in `ls $1/*/why3session.xml`; do
d=`dirname $f`
echo -n "Replaying $d ... "
printf "Replaying $d ... "
../bin/why3replay.opt -q $REPLAYOPT $2 $d 2> $TMPERR > $TMP
ret=$?
if test "$ret" != "0" ; then
echo -n "FAILED (ret code=$ret):"
printf "FAILED (ret code=$ret):"
out=`head -1 $TMP`
if test -z "$out" ; then
echo "standard error: (standard output empty)"
......@@ -53,7 +53,7 @@ run_dir () {
fi
res=1
else
echo -n "OK"
printf "OK"
cat $TMP $TMPERR
success=`expr $success + 1`
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment