Commit c69629d7 authored by Roland Levillain's avatar Roland Levillain
Browse files

Add sanity check to Olena.

	* configure.ac: Configure olena/tests/check/Makefile,
	olena/tests/check/defs, olena/tests/sanity/Makefile and
	olena/tests/sanity/check.


git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@613 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent e8f8e002
2006-10-09 Roland Levillain <roland@lrde.epita.fr>
Add sanity check to Olena.
* configure.ac: Configure olena/tests/check/Makefile,
olena/tests/check/defs, olena/tests/sanity/Makefile and
olena/tests/sanity/check.
2006-09-29 Roland Levillain <roland@lrde.epita.fr>
Create a configure variable for C++ compiler flags used for the
......
......@@ -74,6 +74,13 @@ AC_CONFIG_FILES([
olena/oln/Makefile
dynamic/Makefile
])
# FIXME: Should be performed through oln.m4 macros.
AC_CONFIG_FILES([
olena/tests/check/Makefile
olena/tests/check/defs
olena/tests/sanity/Makefile
])
AC_CONFIG_FILES([olena/tests/sanity/check],
[chmod +x olena/tests/sanity/check])
# Checks for library functions.
AC_OUTPUT
2006-10-09 Roland Levillain <roland@lrde.epita.fr>
Add sanity check to Olena.
* tests/sanity/check.in, tests/sanity/Makefile.am,
* tests/check/defs.in, tests/check/Makefile.flags,
* tests/check/Makefile.am: New.
* tests/Makefile.am (SUBDIRS): New.
2006-10-09 Thierry GERAUD <theo@tegucigalpa.lrde.epita.fr>
Change stc_virtual_typedef into oln_virtual_typedef.
......
## Process this file through Automake to create Makefile.in -*- Makefile -*-
SUBDIRS = check sanity
AM_CPPFLAGS = \
-I$(top_srcdir)/olena -I$(top_srcdir)/extended \
-I$(top_srcdir)/static -I$(top_srcdir)/metalic
......
## Process this file through Automake to create Makefile.in -*- Makefile -*-
# FIXME: To be enabled when the test suite mechanism is available.
# include Makefile.flags
# AM_CPPFLAGS += -DCXX=\""$(CXX)"\" \
# -DCPPFLAGS=\""$(CPPFLAGS)"\" \
# -DCXXFLAGS=\""$(CXXFLAGS)"\" \
# -DOLN_EXTRA_CPPFLAGS=\""$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS)"\" \
# -DCXXFLAGS_OPTIMIZE=\""$(CXXFLAGS_OPTIMIZE)"\" \
# -DCXXFLAGS_STRICT=\""$(CXXFLAGS_STRICT)"\" \
# -DCXXFLAGS_STRICT_ERRORS=\""$(CXXFLAGS_STRICT_ERRORS)"\" \
# -DOLN_IMG_DIR=\"$(top_srcdir)/olena/img\"
# check_LIBRARIES = libolncheck.a
# COMMON_CHECK_SOURCES = \
# $(top_srcdir)/metalic/tests/check/check.hh \
# $(top_srcdir)/metalic/tests/check/main.cc \
# $(top_srcdir)/metalic/tests/check/srcdir.cc \
# $(top_srcdir)/metalic/tests/check/srcdir.hh \
# $(top_srcdir)/metalic/tests/check/verbose.cc \
# $(top_srcdir)/metalic/tests/check/verbose.hh \
# $(top_srcdir)/metalic/tests/check/compile.cc \
# $(top_srcdir)/metalic/tests/check/compile.hh
# libolncheck_a_SOURCES = \
# data.hh \
# data.cc \
# $(COMMON_CHECK_SOURCES)
# EXTRA_DIST = Makefile.flags Makefile.check Makefile.runtests
## -*- Makefile -*-
AM_CXXFLAGS = \
$(CXXFLAGS_DEBUG) \
$(CXXFLAGS_STRICT_ERRORS) $(ZLIB_CXXFLAGS)
AM_CPPFLAGS = \
-I$(top_srcdir)/olena/tests/check \
-I$(top_srcdir)/metalic/tests/check
AM_LDFLAGS =
# -*- shell-script -*-
# User can set VERBOSE to see all output.
if test "x$VERBOSE" = x; then
exec > /dev/null 2>&1
fi
SHELL="@SHELL@"
EXEEXT="@EXEEXT@"
CXX="@CXX@"
# Turn on shell traces when VERBOSE=x.
if test "x$VERBOSE" = xx; then
set -x
else
:
fi
## Process this file through Automake to create Makefile.in -*- Makefile -*-
EXTRA_DIST = includes.test
# FIXME: These should be defined by oln.m4.
OLN_LOCAL_SRC = $(top_srcdir)/olena
OLN_LOCAL_BUILD = $(top_builddir)/olena
# FIXME: Likewise.
OLN_LOCAL_CPPFLAGS = -I$(top_srcdir)/olena -I$(top_builddir)/olena
XTD_LOCAL_CPPFLAGS = -I$(top_srcdir)/extended -I$(top_builddir)/extended
STC_LOCAL_CPPFLAGS = -I$(top_srcdir)/static -I$(top_builddir)/static
MLC_LOCAL_CPPFLAGS = -I$(top_srcdir)/metalic -I$(top_builddir)/metalic
CPPFLAGS = \
$(OLN_LOCAL_CPPFLAGS) $(XTD_LOCAL_CPPFLAGS) \
$(STC_LOCAL_CPPFLAGS) $(MLC_LOCAL_CPPFLAGS)
check:
TOP_SRCDIR=$(top_srcdir) SRCDIR=$(srcdir) \
TOP_BUILDDIR=$(top_builddir) \
PATH_TO_OLN_SRCDIR=$(OLN_LOCAL_SRC) \
PATH_TO_OLN_BUILDDIR=$(OLN_LOCAL_BUILD) \
CPPFLAGS="$(CPPFLAGS) $(DEFS) -I$(top_builddir)" \
$(SHELL) $(srcdir)/includes.test
CLEANFILES = failures incltest.*
#! /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/olena -I$top_builddir/olena \
-I$top_srcdir/extended -I$top_builddir/extended \
-I$top_srcdir/static -I$top_builddir/static \
-I$top_srcdir/metalic -I$top_builddir/metalic"
echo "#include <$file>" > incltest.cc
if $CXX $CPPFLAGS $CXXFLAGS -c incltest.cc; then
echo " PASS: $file"
else
echo " FAIL: $file"
fi
fi
#! /bin/sh
# Check that each header is self contained and generates no warning.
: ${VERBOSE=1}
. ../check/defs || exit 1
set -e
rm -f failures
if test $# = 0; then
find "$PATH_TO_OLN_SRCDIR/oln" -name "${1-*}.hh" \
-a ! -path '*/obsolete/*' -type f \
-a ! -path '*/internal/*' -type f -print |
sed "s,$PATH_TO_OLN_SRCDIR/,,g"
else
echo "$@"
fi |
while read file; do
echo "#include <$file>" > incltest.cc
if $CXX $CPPFLAGS $CXXFLAGS -c incltest.cc; then
echo " PASS: $file"
else
echo " FAIL: $file"
echo " $file" >> failures
fi
done
if test -f failures; then
echo "Failed files:"
cat failures
rm failures
exit 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