diff --git a/SConstruct b/SConstruct index b76e0101e..8434b0a98 100644 --- a/SConstruct +++ b/SConstruct @@ -33,7 +33,7 @@ CUSTOPTIONSFILE = 'custom-options' SRCDIR = 'src' BINDIR = 'bin' TESTDIR = 'tests' -VERSION = '3+alpha.01' +VERSION = '0.1+pre.01' #-----------------------------------Configuration # NOTE: scons -h for help. @@ -68,6 +68,7 @@ def setupBasicEnvironment(): RegisterPrecompiledHeader_Builder(env) handleNoBugSwitches(env) + env.Append(CPPDEFINES = '_GNU_SOURCE') appendCppDefine(env,'DEBUG','DEBUG', 'NDEBUG') appendCppDefine(env,'OPENGL','USE_OPENGL') appendVal(env,'ARCHFLAGS', 'CCFLAGS') # for both C and C++ diff --git a/admin/vgsuppression.c b/admin/vgsuppression.c index 0e1f41fca..cad026e52 100644 --- a/admin/vgsuppression.c +++ b/admin/vgsuppression.c @@ -18,7 +18,6 @@ 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) diff --git a/tests/00test.tests b/tests/00test.tests index 60b4b26d1..d1205b8c1 100644 --- a/tests/00test.tests +++ b/tests/00test.tests @@ -22,3 +22,4 @@ END PLANNED "this may never happen" END + diff --git a/tests/SConscript b/tests/SConscript index 44d34e047..5a7c0145d 100644 --- a/tests/SConscript +++ b/tests/SConscript @@ -9,6 +9,10 @@ from Buildhelper import globRootdirs Import('env','artifacts','core') +# temp fix to add test.h -- wouldn't it be better to put this header be into src/lib ? +env = env.Clone() +env.Append(CPPPATH='#/.') # add Rootdir to Includepath, so test/test.h is found +# temp fix------------- def testExecutable(env,tree, exeName=None, obj=None): """ declare all targets needed to create a standalone @@ -52,7 +56,7 @@ def treatPluginTestcase(env): moduledirs = globRootdirs('*') # but have to treat some subdirs individually. -specials = ['plugin','locking','library'] +specials = ['plugin','locking','library','backend'] diff --git a/tests/test.h b/tests/test.h new file mode 100644 index 000000000..d25fa0a59 --- /dev/null +++ b/tests/test.h @@ -0,0 +1,52 @@ +/* + test.h - macros for running tests + + Copyright (C) CinelerraCV + 2008, Christian Thaeter + + 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 TEST_H +#define TEST_H + +#include + +#include "lib/error.h" + +LUMIERA_ERROR_DEFINE (TEST, "test error"); + +#define TESTS_BEGIN \ +int \ +main (int argc, char** argv) \ +{ \ + NOBUG_INIT; \ + \ + if (argc == 1) \ + return 1; + +#define TEST(name) \ + else if (!strcmp(argv[1], name)) + + +#define TESTS_END \ + else \ + return 1; \ + \ + return 0; \ +} + + +#endif diff --git a/tests/test.sh b/tests/test.sh index 77bac66bf..d919ed073 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -1,7 +1,6 @@ #!/bin/bash # Copyright (C) Lumiera.org -# 2007, Christian Thaeter -# Hermann Vosseler +# 2007 - 2008, Christian Thaeter # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as