sanity: fix race conditions in the test suite
* tests/sanity/80columns.test, tests/sanity/includes.test, tests/sanity/private.test, tests/sanity/style.test: Have each test record failure in a separate file.
This commit is contained in:
parent
3a3913cf50
commit
9b5a763538
4 changed files with 22 additions and 22 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (C) 2012 Laboratoire de Recherche et Développement de
|
# Copyright (C) 2012, 2016 Laboratoire de Recherche et Développement de
|
||||||
# l'Epita (LRDE).
|
# l'Epita (LRDE).
|
||||||
# Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6
|
# Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6
|
||||||
# (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
|
# (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
rm -f failures
|
rm -f failures.80
|
||||||
|
|
||||||
LANG=en_US.UTF-8
|
LANG=en_US.UTF-8
|
||||||
export LANG
|
export LANG
|
||||||
|
|
@ -55,15 +55,15 @@ for dir in "${srcdir-.}/../../spot" "${srcdir-.}/.."; do
|
||||||
grep 'generated by flex' "$file" >/dev/null ; then
|
grep 'generated by flex' "$file" >/dev/null ; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
echo "$file" >>failures
|
echo "$file" >>failures.80
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
if test -f failures; then
|
if test -f failures.80; then
|
||||||
echo "The following files contain lines with more than 80 characters:"
|
echo "The following files contain lines with more than 80 characters:"
|
||||||
cat failures
|
cat failures.80
|
||||||
rm failures
|
rm failures.80
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
rm -f failures
|
rm -f failures.inc
|
||||||
|
|
||||||
|
|
||||||
INCDIR=${srcdir-.}/../../spot
|
INCDIR=${srcdir-.}/../../spot
|
||||||
|
|
@ -45,15 +45,15 @@ for file in `find "$INCDIR" \( -name "${1-*}.hh" \
|
||||||
else
|
else
|
||||||
echo "Missing, or incorrect include guard." >&2
|
echo "Missing, or incorrect include guard." >&2
|
||||||
echo "FAIL: $file"
|
echo "FAIL: $file"
|
||||||
echo " $file" >> failures
|
echo " $file" >> failures.inc
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
echo "PASS: $file"
|
echo "PASS: $file"
|
||||||
done
|
done
|
||||||
|
|
||||||
if test -f failures; then
|
if test -f failures.inc; then
|
||||||
echo "Failed files:"
|
echo "Failed files:"
|
||||||
cat failures
|
cat failures.inc
|
||||||
rm failures
|
rm failures.inc
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
rm -f failures
|
rm -f failures.private
|
||||||
|
|
||||||
|
|
||||||
INCDIR=${srcdir-.}/../../spot
|
INCDIR=${srcdir-.}/../../spot
|
||||||
|
|
@ -41,15 +41,15 @@ for file in `find "$INCDIR" \( -name "${1-*}.hh" \
|
||||||
:
|
:
|
||||||
elif test -f "$INCDIR/${file%.*}.cc"; then
|
elif test -f "$INCDIR/${file%.*}.cc"; then
|
||||||
echo "FAIL: $file -- no exported symbol, should this file be private?"
|
echo "FAIL: $file -- no exported symbol, should this file be private?"
|
||||||
echo " $file" >> failures
|
echo " $file" >> failures.private
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if test -f failures; then
|
if test -f failures.private; then
|
||||||
echo "Failed files:"
|
echo "Failed files:"
|
||||||
cat failures
|
cat failures.private
|
||||||
rm failures
|
rm failures.private
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ diag()
|
||||||
echo ============================================================
|
echo ============================================================
|
||||||
}
|
}
|
||||||
|
|
||||||
rm -f failures
|
rm -f failures.style
|
||||||
|
|
||||||
GREP=grep
|
GREP=grep
|
||||||
|
|
||||||
|
|
@ -324,7 +324,7 @@ for dir in "$TOP/spot" "$TOP/bin" "$TOP/tests"; do
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
$fail && echo "$file" >>failures
|
$fail && echo "$file" >>failures.style
|
||||||
|
|
||||||
done || : # Make sure sh does not abort when read exits with false.
|
done || : # Make sure sh does not abort when read exits with false.
|
||||||
done
|
done
|
||||||
|
|
@ -346,14 +346,14 @@ for dir in "${INCDIR-..}" "${INCDIR-..}/../bin" "${INCDIR-..}/../tests"; do
|
||||||
$GREP '\.libs/' $tmp &&
|
$GREP '\.libs/' $tmp &&
|
||||||
diag "Don't reference files in .libs/, use Libtool instead."
|
diag "Don't reference files in .libs/, use Libtool instead."
|
||||||
|
|
||||||
$fail && echo "$file" >>failures
|
$fail && echo "$file" >>failures.style
|
||||||
done || : # Make sure sh does not abort when read exits with false.
|
done || : # Make sure sh does not abort when read exits with false.
|
||||||
done
|
done
|
||||||
|
|
||||||
if test -f failures; then
|
if test -f failures.style; then
|
||||||
echo "The following files contain style errors:"
|
echo "The following files contain style errors:"
|
||||||
cat failures
|
cat failures.style
|
||||||
rm failures
|
rm failures.style
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue