
Ce patch ajoute un petit script olena/tests/sanity/check dans le builddir qui permet de lancer un sanity check sur un fichier donné. (Il est généré par configure, n'oubliez pas de relancer ce dernier pour voir apparaître ce script). Il suffit ensuite de le lancer en lui passant en argument un nom de fichier, avec le chemin relatif au répertoire source d'Olena : brasilia ~/src/oln % olena/tests/sanity/check oln/core/2d/point2d.hh PASS: oln/core/2d/point2d.hh C'est vraiment quick n' dirty , mais ça permet de gagner du temps lorsque l'on veut relancer un test sur un fichier donné. (Le script initial, olena/tests/sanity/includes.test avait plus ou moins cette fonctionnalité, mais il fallait lui passer beaucoup de choses pour qu'il fonctionne). https://svn.lrde.epita.fr/svn/oln/prototypes/proto-1.0/olena ChangeLog | 5 +++++ tests/sanity/Makefile.am | 2 +- tests/sanity/check.in | 30 ++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) Index: ChangeLog from Roland Levillain <roland@lrde.epita.fr> * tests/sanity/check.in: New file. * tests/sanity/Makefile.am (EXTRA_DIST): Add check.in. 2005-04-11 Roland Levillain <roland@lrde.epita.fr> Index: tests/sanity/check.in --- tests/sanity/check.in (revision 0) +++ tests/sanity/check.in (revision 0) @@ -0,0 +1,30 @@ +#! /bin/sh + +# Check that a header is self-contained and generates no warning. +# This script is meant to be used ``by-hand'' to check a single file. + +: ${VERBOSE=1} + +. "@abs_builddir@/../check/defs" || exit 1 + +set -e + +if test $# = 0; then + echo "usage: $0 oln/path/to/file.hh" + echo "(File path is relative to the Olena source directory.)" + exit 1 +else + top_srcdir=@abs_top_srcdir@ + top_builddir=@abs_top_builddir@ + file=$1 + CPPFLAGS="$CPPFLAGS \ + -I$top_srcdir/metalic -I$top_builddir/metalic \ + -I$top_srcdir/integre -I$top_builddir/integre \ + -I$top_srcdir/olena -I$top_builddir/olena" + echo "#include <$file>" > incltest.cc + if $CXX $CPPFLAGS $CXXFLAGS -c incltest.cc; then + echo " PASS: $file" + else + echo " FAIL: $file" + fi +fi Property changes on: tests/sanity/check.in ___________________________________________________________________ Name: svn:executable + * Index: tests/sanity/Makefile.am --- tests/sanity/Makefile.am (revision 135) +++ tests/sanity/Makefile.am (working copy) @@ -1,4 +1,4 @@ -EXTRA_DIST = includes.test +EXTRA_DIST = check.in includes.test check: TOP_SRCDIR=$(top_srcdir) SRCDIR=$(srcdir) \