merge after finishing DefaultsManager; build split in several static libs
This commit is contained in:
commit
e04c7d54cb
14 changed files with 338 additions and 85 deletions
58
AUTHORS
Normal file
58
AUTHORS
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
|
||||
Cinelerra(2) Authors
|
||||
====================
|
||||
|
||||
hv=Jack Crossfire <broadcast@earthling.net>
|
||||
j6t=Johannes Sixt <johannes.sixt@telecom.at>
|
||||
minmax=Andraz Tori <Andraz.tori1@guest.arnes.si>
|
||||
herman=Herman Robak <herman@skolelinux.no>
|
||||
baver=Richard Baverstock <baver@thebeever.com>
|
||||
pere=Petter Reinholdtsen <pere@hungry.com>
|
||||
tfheen=Tollef Fog Heen <tollef@add.no>
|
||||
andreask=Andreas Kielb <andreaskielb@web.de>
|
||||
theraz=Tyler Geddes <tgeddes@wgeddes.com>
|
||||
dyce=Gergely Erdelyi <dyce@rovidzar.hu>
|
||||
dreamlx=David Arendt <admin@prnet.org>
|
||||
ga=Gustavo Iniguez <ga@kutxa.homeunix.org>
|
||||
memenk=Michael Eric Menk <meklev@osys.grm.hia.no>
|
||||
benjif=Benjamin Flaming <cinelerra@solobanjo.com>
|
||||
cobra=Kevin Brosius <cobra@compuserve.com>
|
||||
taraba=Mark Taraba <m_taraba@yahoo.com>
|
||||
nate=Nathan Kurz <nate@verse.com>
|
||||
mammique=Camille Harang <mammique@garbure.org>
|
||||
kbielefe=Karl Bielefeldt <uhauufo02@sneakemail.com>
|
||||
alexf=Alex Ferrer <alex@ftconsult.com>
|
||||
pmdumuid=Pierre Dumuid <pierre.dumuid@adelaide.edu.au>
|
||||
giskard=Riccardo Setti <giskard@autistici.org>
|
||||
jstewart=Joe Stewart <jstewart@lurhq.com>
|
||||
doudou=Sylvain Joyeux <doudou@melix.net>
|
||||
rafael2k=Rafael Diniz <rafael@riseup.net>
|
||||
nicolasm=Nicolas Maufrais <e.conti@gmx.net>
|
||||
|
||||
Involved in Lumiera development
|
||||
===============================
|
||||
cehteh=Christian Thaeter <ct@pipapo.org>
|
||||
ichthyo=Hermann Vosseler <Ichthyostega@web.de>
|
||||
plouj=Michael Ploujnikov <ploujj@gmail.com>
|
||||
|
||||
_______________________________________________________________
|
||||
Further Credits
|
||||
|
||||
Parts of the Proc-Layer Implementation are heavily inspired by
|
||||
The Loki Library
|
||||
Copyright (c) 2001 by Andrei Alexandrescu
|
||||
Loki is governed by a MIT-License.
|
||||
See: http://loki-lib.sourceforge.net
|
||||
and the book:
|
||||
Alexandrescu, Andrei.
|
||||
"Modern C++ Design: Generic Programming and Design
|
||||
Patterns Applied". Copyright (c) 2001. Addison-Wesley.
|
||||
ISBN 0201704315
|
||||
|
||||
Loki Copyright Notice:
|
||||
Permission to use, copy, modify, distribute and sell this software for any
|
||||
purpose is hereby granted without fee, provided that the above copyright
|
||||
notice appear in all copies and that both that copyright notice and this
|
||||
permission notice appear in supporting documentation.
|
||||
The author makes no representations about the suitability of this software
|
||||
for any purpose. It is provided "as is" without express or implied warranty.
|
||||
29
SConstruct
29
SConstruct
|
|
@ -179,7 +179,7 @@ def configurePlatform(env):
|
|||
if not conf.CheckLibWithHeader('pthread', 'pthread.h', 'C'):
|
||||
print 'Did not find the pthread lib or pthread.h, exiting.'
|
||||
else:
|
||||
conf.env.Append(CPPFLAGS = ' -DHAVE_PTHREAD_H')
|
||||
conf.env.Append(CPPFLAGS = ' -DHAVE_PTHREAD')
|
||||
conf.env.Append(CCFLAGS = ' -pthread')
|
||||
|
||||
if conf.CheckCHeader('execinfo.h'):
|
||||
|
|
@ -234,24 +234,29 @@ def defineBuildTargets(env, artifacts):
|
|||
We use a custom function to declare a whole tree of srcfiles.
|
||||
"""
|
||||
|
||||
lumobj = ( srcSubtree(env,'$SRCDIR/backend')
|
||||
+ srcSubtree(env,'$SRCDIR/proc')
|
||||
+ srcSubtree(env,'$SRCDIR/common')
|
||||
+ srcSubtree(env,'$SRCDIR/lib')
|
||||
)
|
||||
objback = srcSubtree(env,'$SRCDIR/backend')
|
||||
objproc = srcSubtree(env,'$SRCDIR/proc')
|
||||
objlib = ( srcSubtree(env,'$SRCDIR/common')
|
||||
+ srcSubtree(env,'$SRCDIR/lib')
|
||||
)
|
||||
plugobj = srcSubtree(env,'$SRCDIR/plugin', isShared=True)
|
||||
core = env.StaticLibrary('$BINDIR/core.la', lumobj)
|
||||
#core = lumobj # use this for linking directly
|
||||
core = ( env.StaticLibrary('$BINDIR/lumiback.la', objback)
|
||||
+ env.StaticLibrary('$BINDIR/lumiproc.la', objproc)
|
||||
+ env.StaticLibrary('$BINDIR/lumi.la', objlib)
|
||||
)
|
||||
|
||||
# use PCH to speed up building
|
||||
precomp = env.PrecompiledHeader('$SRCDIR/pre')
|
||||
env.Depends(lumobj, precomp)
|
||||
precomp = ( env.PrecompiledHeader('$SRCDIR/pre')
|
||||
+ env.PrecompiledHeader('$SRCDIR/pre_a')
|
||||
)
|
||||
env.Depends(objproc, precomp)
|
||||
env.Depends(objlib, precomp)
|
||||
|
||||
artifacts['lumiera'] = env.Program('$BINDIR/lumiera', ['$SRCDIR/main.cpp']+ core )
|
||||
artifacts['plugins'] = env.SharedLibrary('$BINDIR/lumiera-plugin', plugobj)
|
||||
|
||||
# call subdir SConscript(s) for independent components
|
||||
SConscript(dirs=[SRCDIR+'/tool'], exports='env artifacts')
|
||||
SConscript(dirs=[SRCDIR+'/tool'], exports='env artifacts core')
|
||||
SConscript(dirs=[TESTDIR], exports='env artifacts core')
|
||||
|
||||
|
||||
|
|
@ -264,7 +269,7 @@ def definePostBuildTargets(env, artifacts):
|
|||
il = env.Alias('install-lib', '$DESTDIR/lib')
|
||||
env.Alias('install', [ib, il])
|
||||
|
||||
build = env.Alias('build', artifacts['lumiera']+artifacts['plugins'])
|
||||
build = env.Alias('build', artifacts['lumiera']+artifacts['plugins']+artifacts['tools'])
|
||||
allbu = env.Alias('allbuild', build+artifacts['testsuite'])
|
||||
env.Default('build')
|
||||
# additional files to be cleaned when cleaning 'build'
|
||||
|
|
|
|||
38
admin/vgsuppression.c
Normal file
38
admin/vgsuppression.c
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
vgsuppression.c - Helper program to generate valgrind suppression files
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Christian Thaeter <ct@pipapo.org>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
#define _GNU_SOURCE
|
||||
|
||||
/*
|
||||
just place any problematic calls where valgrind whines about in main (with comments please)
|
||||
*/
|
||||
|
||||
#include "lib/safeclib.h"
|
||||
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
/* debian etch glibc is lazy about cleaning up TLS */
|
||||
lumiera_tmpbuf_provide (100);
|
||||
lumiera_tmpbuf_freeall ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
3
admin/vgsuppression_gen.sh
Executable file
3
admin/vgsuppression_gen.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
valgrind --leak-check=yes --show-reachable=yes --gen-suppressions=all ./vgsuppression 2>&1 | sed '/==[0-9]*==/d;'
|
||||
12
src/main.cpp
12
src/main.cpp
|
|
@ -23,16 +23,24 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
#include "lumiera.h"
|
||||
#include "proc/lumiera.hpp"
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
using lumiera::Appconfig;
|
||||
using lumiera::ON_GLOBAL_INIT;
|
||||
using lumiera::ON_GLOBAL_SHUTDOWN;
|
||||
|
||||
|
||||
int main (int argc, char* argv[])
|
||||
{
|
||||
cout << "*** Lumiera NLE for Linux ***" << endl
|
||||
<< " Version: " << Appconfig::get("version") << endl;
|
||||
<< " Version: " << Appconfig::get("version") << "\n";
|
||||
|
||||
Appconfig::lifecycle (ON_GLOBAL_INIT);
|
||||
|
||||
// great things are happening here....
|
||||
|
||||
Appconfig::lifecycle (ON_GLOBAL_SHUTDOWN);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
52
src/pre.hpp
Normal file
52
src/pre.hpp
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
PRE.hpp - precompiled header collection
|
||||
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Christian Thaeter <ct@pipapo.org>
|
||||
Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
/** @file pre.hpp
|
||||
** Precompiled Header Collection.
|
||||
** Assortment of standard util, error handling and basic lib-boost components,
|
||||
** frequently used in conjunction. Precompiling these can speedup building
|
||||
** significantly. When used, this header should be included prior to any other
|
||||
** headers (and it needs to be compiled by gcc into a "pre.gch" file prior to
|
||||
** building the object files including this header).
|
||||
**
|
||||
** @see mobject.hpp usage example
|
||||
** @see pre_a.hpp precompiled header including Asset subsystem
|
||||
*/
|
||||
|
||||
#ifndef LUMIERA_PRE_HPP
|
||||
#define LUMIERA_PRE_HPP
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <tr1/memory>
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/format.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include "proc/lumiera.hpp"
|
||||
|
||||
|
||||
|
||||
#endif /*LUMIERA_PRE_HPP*/
|
||||
1
src/proc/DIR_INFO
Normal file
1
src/proc/DIR_INFO
Normal file
|
|
@ -0,0 +1 @@
|
|||
Lumiera processing core
|
||||
46
src/proc/lumiera.hpp
Normal file
46
src/proc/lumiera.hpp
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
LUMIERA.hpp - global definitions and common types for the Proc-Layer
|
||||
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Christian Thaeter <ct@pipapo.org>
|
||||
Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef LUMIERA_H
|
||||
#define LUMIERA_H
|
||||
|
||||
|
||||
|
||||
|
||||
/* common types frequently used... */
|
||||
|
||||
#include "common/util.hpp"
|
||||
#include "common/time.hpp"
|
||||
#include "common/error.hpp" ///< pulls in NoBug via nobugcfg.hpp
|
||||
#include "lib/appconfig.hpp"
|
||||
|
||||
|
||||
namespace lumiera
|
||||
{
|
||||
/* additional global configuration goes here... */
|
||||
|
||||
|
||||
} // namespace lumiera
|
||||
|
||||
#endif /*LUMIERA_H*/
|
||||
45
src/proc/nobugcfg.cpp
Normal file
45
src/proc/nobugcfg.cpp
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
NoBugCfg - NoBug definitions and initialisation for the Proc-Layer
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Christian Thaeter <ct@pipapo.org>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
* *****************************************************/
|
||||
|
||||
|
||||
#include "proc/nobugcfg.hpp"
|
||||
|
||||
#define NOBUG_INIT_DEFS_
|
||||
#include "proc/nobugcfg.hpp"
|
||||
#undef NOBUG_INIT_DEFS_
|
||||
|
||||
|
||||
namespace lumiera
|
||||
{
|
||||
void
|
||||
initialize_NoBug ()
|
||||
{
|
||||
NOBUG_INIT;
|
||||
|
||||
#ifdef DEBUG
|
||||
static uint callCount = 0;
|
||||
ASSERT ( 0 == callCount++ );
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
NOBUGCFG.h - global configuration and definitions for NoBug
|
||||
NOBUGCFG.hpp - NoBug definitions and initialisation for the Proc-Layer
|
||||
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
|
|
@ -22,17 +22,20 @@
|
|||
|
||||
*/
|
||||
|
||||
/** @file nobugcfg.h
|
||||
/** @file nobugcfg.hpp
|
||||
** This header is for including and configuring NoBug.
|
||||
** The idea is that configuration and some globally used flag
|
||||
** declarations are to be kept in one central location. Normally,
|
||||
** this header will be included by appconfig.hpp, which in turn gets
|
||||
** included by lumiera.h
|
||||
** this header will be included via some of the basic headers like
|
||||
** error.hpp, which in turn gets included by proc/lumiera.hpp
|
||||
**
|
||||
** @par Besides the usual guarded declarations, this header contains
|
||||
** one section with the corresponding <b>definitions</b>. This section
|
||||
** is to be called by appconfig.cpp only, which deals with application
|
||||
** wide configuration values contained in the Singleton class Appconfig.
|
||||
** Incidentally, the constructor of Appconfig issues the NOBUG_INIT call
|
||||
** is to be included once by some translation unit (currently this is
|
||||
** nobugcfg.cpp) in order to generate the necessary definitions.
|
||||
**
|
||||
** @note this header assures automatic initialisation of NoBug
|
||||
** by placing a static ctor call.
|
||||
**
|
||||
*/
|
||||
|
||||
|
|
@ -41,10 +44,9 @@
|
|||
#define NOBUGCFG_H
|
||||
|
||||
#include <syslog.h>
|
||||
|
||||
/* configuration of NoBug goes here... */
|
||||
|
||||
#include <nobug.h>
|
||||
#include "lib/appconfig.hpp"
|
||||
#include "common/error.hpp" ///< make assertions throw instead of abort()
|
||||
|
||||
|
||||
/* declare flags used throughout the code base... */
|
||||
|
|
@ -54,8 +56,13 @@
|
|||
NOBUG_DECLARE_FLAG(singleton);
|
||||
NOBUG_DECLARE_FLAG(assetmem);
|
||||
NOBUG_DECLARE_FLAG(mobjectmem);
|
||||
|
||||
|
||||
|
||||
|
||||
namespace lumiera {
|
||||
void initialize_NoBug ();
|
||||
namespace {
|
||||
LifecycleHook schedule_ (ON_BASIC_INIT, &initialize_NoBug);
|
||||
} }
|
||||
#endif /*NOBUGCFG_H ======= (End) Part 1: DECLARATIONS ======== */
|
||||
|
||||
|
||||
|
|
@ -65,15 +72,6 @@
|
|||
|
||||
#ifdef NOBUG_INIT_DEFS_ /*========== Part 2: DEFINITIONS ========= */
|
||||
|
||||
/* ================================= common C Part ========= */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus /* ============== C++-Part ============== */
|
||||
|
||||
|
||||
/* flags used throughout the code base... */
|
||||
NOBUG_CPP_DEFINE_FLAG(config);
|
||||
|
|
@ -83,11 +81,7 @@
|
|||
NOBUG_CPP_DEFINE_FLAG_LIMIT(assetmem, LOG_WARNING);
|
||||
NOBUG_CPP_DEFINE_FLAG_LIMIT(mobjectmem, LOG_WARNING);
|
||||
|
||||
#include "common/error.hpp"
|
||||
|
||||
|
||||
#endif /* ===================== (End) C++-Part ============= */
|
||||
|
||||
|
||||
|
||||
#endif /*NOBUG_INIT_DEFS_ ==== (End) Part 2: DEFINITIONS ========= */
|
||||
|
|
@ -3,11 +3,11 @@
|
|||
## SConscript - SCons buildscript for tool subdirectory (called by SConstruct)
|
||||
##
|
||||
|
||||
Import('env','artifacts')
|
||||
Import('env','artifacts','core')
|
||||
|
||||
|
||||
# build the ubiquitous Hello World application (note: C source)
|
||||
artifacts['tools'] = [ env.Program('#$BINDIR/hello-world','hello.c')
|
||||
+ env.Program('#$BINDIR/try', 'try.cpp') #### to try out some feature:
|
||||
+ env.Program('#$BINDIR/try', 'try.cpp') #### to try out some feature...
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -7,18 +7,19 @@
|
|||
// execute with NOBUG_LOG='ttt:TRACE' bin/try
|
||||
// 1/08 - working out a static initialisation problem for Visitor (Tag creation)
|
||||
// 1/08 - check 64bit longs
|
||||
// 4/08 - comparison operators on shared_ptr<Asset>
|
||||
|
||||
|
||||
#include <nobug.h>
|
||||
#include <iostream>
|
||||
#include <typeinfo>
|
||||
|
||||
#include <limits>
|
||||
|
||||
|
||||
using std::string;
|
||||
using std::cout;
|
||||
|
||||
NOBUG_CPP_DEFINE_FLAG(test);
|
||||
|
||||
|
||||
|
||||
int main (int argc, char* argv[])
|
||||
|
|
@ -26,12 +27,8 @@ int main (int argc, char* argv[])
|
|||
|
||||
NOBUG_INIT;
|
||||
|
||||
int64_t lol (1);
|
||||
cout << sizeof(lol)<< "\n";
|
||||
cout << "\ngulp\n";
|
||||
|
||||
cout << "long: "<< std::numeric_limits<long>::max()
|
||||
<<" 64: " << std::numeric_limits<int64_t>::max()
|
||||
<<"\n";
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
TESTING "test system selftest" cat
|
||||
TESTING "test system selftest" /bin/cat
|
||||
|
||||
TEST "test cat'ing stdin to stdout" <<END
|
||||
in: foo: bar
|
||||
|
|
@ -7,7 +7,7 @@ return: 0
|
|||
END
|
||||
|
||||
TEST "test stderr, cat'ing noonexistant file" ,nonexistent_file <<END
|
||||
err: cat: ,nonexistent_file: No such file or directory
|
||||
err: /bin/cat: ,nonexistent_file: No such file or directory
|
||||
return: 1
|
||||
END
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
export LC_ALL=C
|
||||
|
||||
arg0="$0"
|
||||
srcdir=$(dirname "$arg0")
|
||||
srcdir="$(dirname "$arg0")"
|
||||
|
||||
ulimit -S -t 1 -v 524288
|
||||
valgrind=""
|
||||
|
|
@ -45,7 +45,7 @@ else
|
|||
fi
|
||||
|
||||
echo
|
||||
echo ================ ${0##*/} ================
|
||||
echo "================ ${0##*/} ================"
|
||||
|
||||
TESTCNT=0
|
||||
SKIPCNT=0
|
||||
|
|
@ -84,7 +84,7 @@ function TEST()
|
|||
echo "$arg" >>,expect_stderr
|
||||
;;
|
||||
'return')
|
||||
expect_return=$arg
|
||||
expect_return="$arg"
|
||||
;;
|
||||
*)
|
||||
echo "UNKOWN TEST COMMAND '$cmd'" 1>&2
|
||||
|
|
@ -95,7 +95,7 @@ function TEST()
|
|||
echo -n "TEST $name: "
|
||||
echo -en "\nTEST $name: $* " >>,testlog
|
||||
|
||||
case $TESTMODE in
|
||||
case "$TESTMODE" in
|
||||
*FAST*)
|
||||
if grep "^TEST $name: .* FAILED" ,testlog.pre >&/dev/null; then
|
||||
MSGOK=" (fixed)"
|
||||
|
|
@ -121,39 +121,45 @@ function TEST()
|
|||
|
||||
fails=0
|
||||
|
||||
|
||||
if test -f ,send_stdin; then
|
||||
cat ,send_stdin | $valgrind $TESTBIN "$@" 2>,stderr >,stdout
|
||||
else
|
||||
$valgrind $TESTBIN "$@" 2>,stderr >,stdout
|
||||
fi &>/dev/null
|
||||
return=$?
|
||||
|
||||
echo -n >,testtmp
|
||||
|
||||
if test -f ,expect_stdout; then
|
||||
if ! cmp ,expect_stdout ,stdout &>/dev/null; then
|
||||
echo "unexpected data on stdout" >>,testtmp
|
||||
grep -v ': \(TRACE\|INFO\|NOTICE\|WARNING\|ERR\):' <,stdout >,tmp
|
||||
diff -ua ,expect_stdout ,tmp >>,testtmp
|
||||
rm ,tmp
|
||||
((fails+=1))
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -f ,expect_stderr; then
|
||||
if ! cmp ,expect_stderr ,stderr &>/dev/null; then
|
||||
echo "unexpected data on stderr" >>,testtmp
|
||||
grep -v ': \(TRACE\|INFO\|NOTICE\|WARNING\|ERR\):' <,stderr >,tmp
|
||||
diff -ua ,expect_stderr ,tmp >>,testtmp
|
||||
rm ,tmp
|
||||
((fails+=1))
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $expect_return != $return; then
|
||||
echo "unexpected return value $return" >>,testtmp
|
||||
if ! test -x $TESTBIN; then
|
||||
echo -n >,stdout
|
||||
echo "test binary '$TESTBIN' not found" >,stderr
|
||||
((fails+=1))
|
||||
|
||||
else
|
||||
if test -f ,send_stdin; then
|
||||
cat ,send_stdin | $valgrind $TESTBIN "$@" 2>,stderr >,stdout
|
||||
else
|
||||
$valgrind $TESTBIN "$@" 2>,stderr >,stdout
|
||||
fi &>/dev/null
|
||||
return=$?
|
||||
|
||||
if test -f ,expect_stdout; then
|
||||
if ! cmp ,expect_stdout ,stdout &>/dev/null; then
|
||||
echo "unexpected data on stdout" >>,testtmp
|
||||
grep -v ': \(TRACE\|INFO\|NOTICE\|WARNING\|ERR\):' <,stdout >,tmp
|
||||
diff -ua ,expect_stdout ,tmp >>,testtmp
|
||||
rm ,tmp
|
||||
((fails+=1))
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -f ,expect_stderr; then
|
||||
if ! cmp ,expect_stderr ,stderr &>/dev/null; then
|
||||
echo "unexpected data on stderr" >>,testtmp
|
||||
grep -v ': \(TRACE\|INFO\|NOTICE\|WARNING\|ERR\):' <,stderr >,tmp
|
||||
diff -ua ,expect_stderr ,tmp >>,testtmp
|
||||
rm ,tmp
|
||||
((fails+=1))
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$expect_return" != "$return"; then
|
||||
echo "unexpected return value $return" >>,testtmp
|
||||
((fails+=1))
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $fails -eq 0; then
|
||||
|
|
@ -191,7 +197,7 @@ function RUNTESTS()
|
|||
if test \( ! "${TESTSUITES/*,*/}" \) -a "$TESTSUITES"; then
|
||||
TESTSUITES="{$TESTSUITES}"
|
||||
fi
|
||||
for t in $(eval echo $srcdir/*$TESTSUITES*.tests); do
|
||||
for t in $(eval echo "$srcdir/*$TESTSUITES*.tests"); do
|
||||
echo "$t"
|
||||
done | sort | uniq | {
|
||||
while read i; do
|
||||
|
|
|
|||
Loading…
Reference in a new issue