You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
(26) |
Apr
(35) |
May
(37) |
Jun
(8) |
Jul
(3) |
Aug
(21) |
Sep
(29) |
Oct
(113) |
Nov
(70) |
Dec
(44) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(1) |
Feb
(9) |
Mar
(48) |
Apr
(13) |
May
|
Jun
(16) |
Jul
(2) |
Aug
(5) |
Sep
(16) |
Oct
(3) |
Nov
(31) |
Dec
(30) |
| 2005 |
Jan
(61) |
Feb
(42) |
Mar
(18) |
Apr
(9) |
May
|
Jun
(10) |
Jul
(33) |
Aug
(26) |
Sep
(9) |
Oct
(13) |
Nov
(42) |
Dec
(62) |
| 2006 |
Jan
(16) |
Feb
(80) |
Mar
(87) |
Apr
(36) |
May
(37) |
Jun
(57) |
Jul
(44) |
Aug
(3) |
Sep
(27) |
Oct
(93) |
Nov
(6) |
Dec
(32) |
| 2007 |
Jan
(34) |
Feb
(12) |
Mar
(20) |
Apr
(7) |
May
(21) |
Jun
(33) |
Jul
(31) |
Aug
|
Sep
(23) |
Oct
(11) |
Nov
(46) |
Dec
(8) |
| 2008 |
Jan
(50) |
Feb
(41) |
Mar
(35) |
Apr
(12) |
May
(20) |
Jun
(19) |
Jul
(8) |
Aug
(4) |
Sep
(2) |
Oct
|
Nov
(10) |
Dec
(1) |
| 2009 |
Jan
(4) |
Feb
(1) |
Mar
(4) |
Apr
(1) |
May
(14) |
Jun
(7) |
Jul
(13) |
Aug
(19) |
Sep
(35) |
Oct
(28) |
Nov
(28) |
Dec
(16) |
| 2010 |
Jan
(17) |
Feb
(19) |
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
(6) |
Jul
(50) |
Aug
(9) |
Sep
|
Oct
(2) |
Nov
(11) |
Dec
(5) |
| 2011 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
(12) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
|
From: <mh...@us...> - 2017-09-26 12:51:20
|
Revision: 960
http://sourceforge.net/p/confix/svn/960
Author: mhaubi
Date: 2017-09-26 12:51:18 +0000 (Tue, 26 Sep 2017)
Log Message:
-----------
add 'has_undefined_symbols' property for libraries
Windows does not support undefined symbols in shared libraries,
so libtool refuses to create DLLs without the -no-undefined flag.
Adding explicit HAS_UNDEFINED_SYMBOLS(False) api call per library,
and the optional (has_undefined_symbols=False) argument to AutoC().
For backwards compatibility, default is (has_undefined_symbols=True).
Modified Paths:
--------------
confix/trunk/libconfix/plugins/automake/c/out_c.py
confix/trunk/libconfix/plugins/c/clusterer.py
confix/trunk/libconfix/plugins/c/explicit_iface.py
confix/trunk/libconfix/plugins/c/library.py
confix/trunk/libconfix/plugins/c/setups/default_setup.py
confix/trunk/libconfix/setups/c.py
Modified: confix/trunk/libconfix/plugins/automake/c/out_c.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/c/out_c.py 2013-01-07 20:03:58 UTC (rev 959)
+++ confix/trunk/libconfix/plugins/automake/c/out_c.py 2017-09-26 12:51:18 UTC (rev 960)
@@ -487,6 +487,9 @@
elif b.default_version() is not None:
automake_output_builder.makefile_am().add_compound_ldflags(automakelibname, '-release '+b.default_version())
pass
+ if b.has_undefined_symbols() is False:
+ automake_output_builder.makefile_am().add_compound_ldflags(automakelibname, '-no-undefined')
+ pass
pass
else:
automake_output_builder.configure_ac().add_paragraph(
Modified: confix/trunk/libconfix/plugins/c/clusterer.py
===================================================================
--- confix/trunk/libconfix/plugins/c/clusterer.py 2013-01-07 20:03:58 UTC (rev 959)
+++ confix/trunk/libconfix/plugins/c/clusterer.py 2017-09-26 12:51:18 UTC (rev 960)
@@ -33,7 +33,7 @@
import types
class CClustererSetup(Setup):
- def __init__(self, linkednamefinder=None):
+ def __init__(self, linkednamefinder=None, has_undefined_symbols=True):
assert linkednamefinder is None or isinstance(linkednamefinder, NameFinder)
Setup.__init__(self)
if linkednamefinder is None:
@@ -41,10 +41,11 @@
else:
self.__namefinder = linkednamefinder
pass
+ self.__has_undefined_symbols = has_undefined_symbols
pass
def setup(self, dirbuilder):
- clusterer = CClusterer(namefinder=self.__namefinder)
+ clusterer = CClusterer(namefinder=self.__namefinder, has_undefined_symbols=self.__has_undefined_symbols)
dirbuilder.add_builder(clusterer)
dirbuilder.add_interface(CClustererInterfaceProxy(clusterer=clusterer))
pass
@@ -51,11 +52,12 @@
pass
class CClusterer(Builder):
- def __init__(self, namefinder):
+ def __init__(self, namefinder, has_undefined_symbols=True):
Builder.__init__(self)
self.__namefinder = namefinder
self.__libname = None
self.__libtool_version_info = None
+ self.__has_undefined_symbols = has_undefined_symbols
pass
def shortname(self):
@@ -85,6 +87,15 @@
pass
pass
+ def set_has_undefined_symbols(self, has_undefined_symbols):
+ self.__has_undefined_symbols = has_undefined_symbols
+ for builder in self.parentbuilder().iter_builders():
+ if isinstance(builder, LibraryBuilder):
+ builder.set_has_undefined_symbols(has_undefined_symbols)
+ break
+ pass
+ pass
+
def enlarge(self):
super(CClusterer, self).enlarge()
@@ -163,7 +174,8 @@
LibraryBuilder(
basename=libname,
version=self.__libtool_version_info,
- default_version=self.package().version()))
+ default_version=self.package().version(),
+ has_undefined_symbols=self.__has_undefined_symbols))
for b in itertools.chain(nomain_builders, header_builders):
library.add_member(b)
pass
@@ -229,6 +241,13 @@
pass
self.__clusterer.set_libtool_version_info(version)
pass
+
+ def HAS_UNDEFINED_SYMBOLS(self, has_undefined_symbols):
+ if type(has_undefined_symbols) is not types.BooleanType:
+ raise Error("HAS_UNDEFINED_SYMBOLS(): 'has_undefined_symbols' argument must be a boolean")
+ self.__clusterer.set_has_undefined_symbols(has_undefined_symbols)
+ pass
+
pass
class NameFinder:
Modified: confix/trunk/libconfix/plugins/c/explicit_iface.py
===================================================================
--- confix/trunk/libconfix/plugins/c/explicit_iface.py 2013-01-07 20:03:58 UTC (rev 959)
+++ confix/trunk/libconfix/plugins/c/explicit_iface.py 2017-09-26 12:51:18 UTC (rev 960)
@@ -104,7 +104,7 @@
self.__dirbuilder.add_builder(yacc)
return yacc
- def LIBRARY(self, members, basename=None, version=None):
+ def LIBRARY(self, members, basename=None, version=None, undefined_symbols=True):
the_basename = basename
if the_basename is None:
the_basename=LongNameFinder().find_libname(
@@ -113,7 +113,8 @@
pass
library = LibraryBuilder(basename=the_basename,
version=version,
- default_version=self.__dirbuilder.package().version())
+ default_version=self.__dirbuilder.package().version(),
+ has_undefined_symbols=undefined_symbols)
for m in members:
library.add_member(m)
pass
Modified: confix/trunk/libconfix/plugins/c/library.py
===================================================================
--- confix/trunk/libconfix/plugins/c/library.py 2013-01-07 20:03:58 UTC (rev 959)
+++ confix/trunk/libconfix/plugins/c/library.py 2017-09-26 12:51:18 UTC (rev 960)
@@ -25,7 +25,8 @@
def __init__(self,
basename,
version,
- default_version):
+ default_version,
+ has_undefined_symbols):
# library version. passed to libtool as "-version-info
# <current>:<revision>:<age>", for example.
@@ -40,6 +41,7 @@
self.__basename = basename
self.__version = version
self.__default_version = default_version
+ self.__has_undefined_symbols = has_undefined_symbols
self.__buildinfo_added = False
@@ -82,6 +84,10 @@
super(LibraryBuilder, self).force_enlarge()
pass
+ def set_has_undefined_symbols(self, has_undefined_symbols):
+ self.__has_undefined_symbols = has_undefined_symbols
+ pass
+
def version(self):
return self.__version
@@ -88,4 +94,7 @@
def default_version(self):
return self.__default_version
+ def has_undefined_symbols(self):
+ return self.__has_undefined_symbols
+
pass
Modified: confix/trunk/libconfix/plugins/c/setups/default_setup.py
===================================================================
--- confix/trunk/libconfix/plugins/c/setups/default_setup.py 2013-01-07 20:03:58 UTC (rev 959)
+++ confix/trunk/libconfix/plugins/c/setups/default_setup.py 2017-09-26 12:51:18 UTC (rev 960)
@@ -25,8 +25,8 @@
from libconfix.core.machinery.setup import CompositeSetup
-def make_core_setups(linkednamefinder):
- return [CClustererSetup(linkednamefinder=linkednamefinder),
+def make_core_setups(linkednamefinder, has_undefined_symbols):
+ return [CClustererSetup(linkednamefinder=linkednamefinder, has_undefined_symbols=has_undefined_symbols),
CCreatorSetup(),
CommonInterfaceSetup(),
RelocatedHeadersSetup(),
@@ -34,8 +34,9 @@
class DefaultCSetup(CompositeSetup):
def __init__(self,
- linkednamefinder=None):
- setups = make_core_setups(linkednamefinder=linkednamefinder)
+ linkednamefinder=None,
+ has_undefined_symbols=True):
+ setups = make_core_setups(linkednamefinder=linkednamefinder, has_undefined_symbols=has_undefined_symbols)
setups.append(ImplicitInterfaceSetup())
CompositeSetup.__init__(
self,
Modified: confix/trunk/libconfix/setups/c.py
===================================================================
--- confix/trunk/libconfix/setups/c.py 2013-01-07 20:03:58 UTC (rev 959)
+++ confix/trunk/libconfix/setups/c.py 2017-09-26 12:51:18 UTC (rev 960)
@@ -26,7 +26,7 @@
pass
class AutoC(CompositeSetup):
- def __init__(self, libnamefinder=None):
- CompositeSetup.__init__(self, [DefaultCSetup(libnamefinder)])
+ def __init__(self, libnamefinder=None, has_undefined_symbols=True):
+ CompositeSetup.__init__(self, [DefaultCSetup(libnamefinder, has_undefined_symbols=has_undefined_symbols)])
pass
pass
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jf...@us...> - 2013-01-29 21:47:26
|
Revision: 966
http://confix.svn.sourceforge.net/confix/?rev=966&view=rev
Author: jfasch
Date: 2013-01-29 21:47:20 +0000 (Tue, 29 Jan 2013)
Log Message:
-----------
release graph, 2.3.9
Modified Paths:
--------------
confix/trunk/00branches.txt
Modified: confix/trunk/00branches.txt
===================================================================
--- confix/trunk/00branches.txt 2013-01-29 21:33:09 UTC (rev 965)
+++ confix/trunk/00branches.txt 2013-01-29 21:47:20 UTC (rev 966)
@@ -102,11 +102,14 @@
| 894 REL-2.3.2
| |
| 900 REL-2.3.6
- | |
+ | 936 REL-2.3.7
| 947 REL-2.3.8
| |
| <------------+ 949
| |
+ | 965 REL-2.3.9
+ | |
+ | |
| v RB-2.3
|
|
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jf...@us...> - 2013-01-29 21:33:16
|
Revision: 965
http://confix.svn.sourceforge.net/confix/?rev=965&view=rev
Author: jfasch
Date: 2013-01-29 21:33:09 +0000 (Tue, 29 Jan 2013)
Log Message:
-----------
REL-2.3.9
Added Paths:
-----------
confix/tags/REL-2.3.9/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jf...@us...> - 2013-01-29 21:30:46
|
Revision: 964
http://confix.svn.sourceforge.net/confix/?rev=964&view=rev
Author: jfasch
Date: 2013-01-29 21:30:40 +0000 (Tue, 29 Jan 2013)
Log Message:
-----------
REL-2.3.7
Added Paths:
-----------
confix/tags/REL-2.3.7/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jf...@us...> - 2013-01-29 21:29:58
|
Revision: 963
http://confix.svn.sourceforge.net/confix/?rev=963&view=rev
Author: jfasch
Date: 2013-01-29 21:29:52 +0000 (Tue, 29 Jan 2013)
Log Message:
-----------
oops, 2.3.7 was wrong
Removed Paths:
-------------
confix/tags/REL-2.3.7/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jf...@us...> - 2013-01-29 21:28:37
|
Revision: 962
http://confix.svn.sourceforge.net/confix/?rev=962&view=rev
Author: jfasch
Date: 2013-01-29 21:28:31 +0000 (Tue, 29 Jan 2013)
Log Message:
-----------
version 2.3.9
Modified Paths:
--------------
confix/branches/RB-2.3/libconfix/core/utils/const.py
Modified: confix/branches/RB-2.3/libconfix/core/utils/const.py
===================================================================
--- confix/branches/RB-2.3/libconfix/core/utils/const.py 2013-01-29 21:25:44 UTC (rev 961)
+++ confix/branches/RB-2.3/libconfix/core/utils/const.py 2013-01-29 21:28:31 UTC (rev 962)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2010 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -17,7 +17,7 @@
# USA
# Confix version
-CONFIX_VERSION = '2.3.8'
+CONFIX_VERSION = '2.3.9'
# version of persistent data, the repo.
REPO_VERSION = '2.3.0'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jf...@us...> - 2013-01-29 21:25:50
|
Revision: 961
http://confix.svn.sourceforge.net/confix/?rev=961&view=rev
Author: jfasch
Date: 2013-01-29 21:25:44 +0000 (Tue, 29 Jan 2013)
Log Message:
-----------
if set, use $CONFIG_SHELL to call configure
Modified Paths:
--------------
confix/branches/RB-2.3/libconfix/plugins/automake/configure.py
Modified: confix/branches/RB-2.3/libconfix/plugins/automake/configure.py
===================================================================
--- confix/branches/RB-2.3/libconfix/plugins/automake/configure.py 2013-01-29 21:12:32 UTC (rev 960)
+++ confix/branches/RB-2.3/libconfix/plugins/automake/configure.py 2013-01-29 21:25:44 UTC (rev 961)
@@ -27,7 +27,12 @@
assert type(prefix) in [types.NoneType, types.ListType, types.TupleType]
assert type(readonly_prefixes) in [types.NoneType, types.ListType, types.TupleType]
+ program = os.sep.join(packageroot + ['configure'])
argv = []
+ if 'CONFIG_SHELL' in os.environ:
+ argv.append(program)
+ program = os.environ['CONFIG_SHELL']
+ pass
if prefix is not None:
argv.append('--prefix='+os.sep.join(prefix))
pass
@@ -45,7 +50,7 @@
argv.extend(args)
pass
- external_cmd.exec_program(program=os.sep.join(packageroot + ['configure']),
+ external_cmd.exec_program(program=program,
args=argv,
env=env,
dir=builddir,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jf...@us...> - 2013-01-29 21:12:38
|
Revision: 960
http://confix.svn.sourceforge.net/confix/?rev=960&view=rev
Author: jfasch
Date: 2013-01-29 21:12:32 +0000 (Tue, 29 Jan 2013)
Log Message:
-----------
REL-2.3.7
Added Paths:
-----------
confix/tags/REL-2.3.7/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jf...@us...> - 2013-01-07 20:04:10
|
Revision: 959
http://confix.svn.sourceforge.net/confix/?rev=959&view=rev
Author: jfasch
Date: 2013-01-07 20:03:58 +0000 (Mon, 07 Jan 2013)
Log Message:
-----------
tests: defaultTestLoader.loadTestsFromTestCase
Modified Paths:
--------------
confix/trunk/libconfix/core/filesys/tests/automake/overlay_basic.py
confix/trunk/libconfix/core/filesys/tests/automake/suite.py
confix/trunk/libconfix/core/filesys/tests/inmem/basic.py
confix/trunk/libconfix/core/filesys/tests/inmem/overlay.py
confix/trunk/libconfix/core/filesys/tests/inmem/overlay_basic.py
confix/trunk/libconfix/core/filesys/tests/inmem/overlay_error.py
confix/trunk/libconfix/core/filesys/tests/inmem/property.py
confix/trunk/libconfix/core/filesys/tests/inmem/scan.py
confix/trunk/libconfix/core/filesys/tests/inmem/suite.py
confix/trunk/libconfix/core/hierarchy/tests/explicit_iface.py
confix/trunk/libconfix/core/hierarchy/tests/ignored_entries.py
confix/trunk/libconfix/core/hierarchy/tests/suite_inmem.py
confix/trunk/libconfix/core/tests/suite_build.py
confix/trunk/libconfix/core/tests/suite_inmem.py
confix/trunk/libconfix/frontends/confix2/tests/composite.py
confix/trunk/libconfix/frontends/confix2/tests/configfile.py
confix/trunk/libconfix/frontends/confix2/tests/suite_inmem.py
confix/trunk/libconfix/frontends/tests/suite_inmem.py
confix/trunk/libconfix/plugins/automake/c/tests/library_dependencies/suite_build.py
confix/trunk/libconfix/plugins/automake/c/tests/noinst_headers_build.py
confix/trunk/libconfix/plugins/automake/c/tests/suite_build.py
confix/trunk/libconfix/plugins/automake/plainfile/tests/suite_build.py
confix/trunk/libconfix/plugins/automake/script/tests/suite_build.py
confix/trunk/libconfix/plugins/automake/tests/autoconf_archive.py
confix/trunk/libconfix/plugins/automake/tests/check/suite_build.py
confix/trunk/libconfix/plugins/automake/tests/exename/suite_build.py
confix/trunk/libconfix/plugins/automake/tests/explicit_package_build.py
confix/trunk/libconfix/plugins/automake/tests/idl_build.py
confix/trunk/libconfix/plugins/automake/tests/inter_package_build.py
confix/trunk/libconfix/plugins/automake/tests/interix_link.py
confix/trunk/libconfix/plugins/automake/tests/intra_package_build.py
confix/trunk/libconfix/plugins/automake/tests/kde_hack.py
confix/trunk/libconfix/plugins/automake/tests/readonly_prefixes/suite_build.py
confix/trunk/libconfix/plugins/automake/tests/relocated_headers/implicit_inter_package_build.py
confix/trunk/libconfix/plugins/automake/tests/relocated_headers/suite_build.py
confix/trunk/libconfix/plugins/automake/tests/simple_build.py
confix/trunk/libconfix/plugins/automake/tests/suite_build.py
confix/trunk/libconfix/plugins/c/relocated_headers/tests/basic.py
confix/trunk/libconfix/plugins/c/relocated_headers/tests/bug_1817734.py
confix/trunk/libconfix/plugins/c/relocated_headers/tests/inter_package_inmem.py
confix/trunk/libconfix/plugins/c/relocated_headers/tests/suite_inmem.py
confix/trunk/libconfix/plugins/c/setups/tests/explicit/check.py
confix/trunk/libconfix/plugins/c/setups/tests/explicit/check_build.py
confix/trunk/libconfix/plugins/c/setups/tests/explicit/check_inmem.py
confix/trunk/libconfix/plugins/c/setups/tests/explicit/complete_package_inmem.py
confix/trunk/libconfix/plugins/c/setups/tests/explicit/executable.py
confix/trunk/libconfix/plugins/c/setups/tests/explicit/library.py
confix/trunk/libconfix/plugins/c/setups/tests/explicit/relocated_header_build.py
confix/trunk/libconfix/plugins/c/setups/tests/explicit/relocated_header_inmem.py
confix/trunk/libconfix/plugins/c/setups/tests/explicit/suite_build.py
confix/trunk/libconfix/plugins/c/setups/tests/explicit/suite_inmem.py
confix/trunk/libconfix/plugins/c/setups/tests/ignored_entries.py
confix/trunk/libconfix/plugins/c/setups/tests/suite_build.py
confix/trunk/libconfix/plugins/c/setups/tests/suite_inmem.py
confix/trunk/libconfix/plugins/c/tests/suite_build.py
confix/trunk/libconfix/plugins/cmake/tests/cmake_bug_10082_build.py
confix/trunk/libconfix/plugins/cmake/tests/custom_command_build.py
confix/trunk/libconfix/plugins/cmake/tests/external_library_build.py
confix/trunk/libconfix/plugins/cmake/tests/generator_build.py
confix/trunk/libconfix/plugins/cmake/tests/idl_build.py
confix/trunk/libconfix/plugins/cmake/tests/inter_package_build.py
confix/trunk/libconfix/plugins/cmake/tests/intra_package_build.py
confix/trunk/libconfix/plugins/cmake/tests/library_dependencies_build.py
confix/trunk/libconfix/plugins/cmake/tests/local_install_build.py
confix/trunk/libconfix/plugins/cmake/tests/plainfile_build.py
confix/trunk/libconfix/plugins/cmake/tests/public_install_build.py
confix/trunk/libconfix/plugins/cmake/tests/readonly_prefixes_build.py
confix/trunk/libconfix/plugins/cmake/tests/repo_install_build.py
confix/trunk/libconfix/plugins/cmake/tests/script_build.py
confix/trunk/libconfix/plugins/cmake/tests/suite_build.py
confix/trunk/libconfix/plugins/make/tests/basic.py
confix/trunk/libconfix/plugins/make/tests/generated_package.py
confix/trunk/libconfix/plugins/make/tests/suite_build.py
confix/trunk/libconfix/plugins/tests/suite_build.py
confix/trunk/libconfix/plugins/tests/suite_inmem.py
confix/trunk/libconfix/tests/suite_build.py
confix/trunk/libconfix/tests/suite_inmem.py
confix/trunk/tests/00build.py
confix/trunk/tests/00inmem.py
Removed Paths:
-------------
confix/trunk/libconfix/plugins/automake/tests/relocated_headers/explicit_build.py
confix/trunk/libconfix/plugins/automake/tests/relocated_headers/inter_package_build.py
Modified: confix/trunk/libconfix/core/filesys/tests/automake/overlay_basic.py
===================================================================
--- confix/trunk/libconfix/core/filesys/tests/automake/overlay_basic.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/core/filesys/tests/automake/overlay_basic.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Joerg Faschingbauer
+# Copyright (C) 2007-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -34,13 +34,6 @@
import sys
import os
-class OverlayBasicSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(OverlayBasicTest('test'))
- pass
- pass
-
class OverlayBasicTest(PersistentTestCase):
def test(self):
source = self.rootpath() + ['source']
@@ -151,7 +144,9 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(OverlayBasicTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(OverlayBasicSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/filesys/tests/automake/suite.py
===================================================================
--- confix/trunk/libconfix/core/filesys/tests/automake/suite.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/core/filesys/tests/automake/suite.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2008 Joerg Faschingbauer
+# Copyright (C) 2007-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -15,17 +15,13 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-from overlay_basic import OverlayBasicSuite
+import overlay_basic
import unittest
-class Suite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(OverlayBasicSuite())
- pass
- pass
+suite = unittest.TestSuite()
+suite.addTest(overlay_basic.suite)
if __name__ == '__main__':
- unittest.TextTestRunner().run(Suite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/filesys/tests/inmem/basic.py
===================================================================
--- confix/trunk/libconfix/core/filesys/tests/inmem/basic.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/core/filesys/tests/inmem/basic.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Joerg Faschingbauer
+# Copyright (C) 2007-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -25,25 +25,8 @@
import unittest, os, stat, shutil, sys
-class BasicSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(Basics('test'))
- self.addTest(RelativePath('test'))
- self.addTest(Sync('test_mem2sync'))
- self.addTest(Sync('test_dirty2sync'))
- self.addTest(Sync('test_filechange'))
- self.addTest(Sync('test_file_clear_on_sync_false'))
- self.addTest(Sync('test_file_clear_on_sync_true'))
- self.addTest(Sync('test_file_truncate_persistent'))
- self.addTest(Sync_RootMoreThanOneDirectoryDeep('test'))
- self.addTest(VirtualFile('test'))
- self.addTest(ExplicitMode('test'))
- pass
- pass
-
-class Basics(unittest.TestCase):
- def test(self):
+class BasicTest(PersistentTestCase):
+ def test__very_basic(self):
fs = FileSystem(path=['a', 'b'])
subdir = Directory()
subdir.add(name='file', entry=File())
@@ -59,10 +42,8 @@
self.assertRaises(Directory.AlreadyMounted, fs.rootdirectory().add, name='subdir', entry=File())
pass
- pass
-class RelativePath(unittest.TestCase):
- def test(self):
+ def test__relative_path(self):
fs = FileSystem(path=['a', 'b'])
subdir = fs.rootdirectory().add(name='subdir', entry=Directory())
subsubdir = subdir.add(name='subsubdir', entry=Directory())
@@ -71,21 +52,9 @@
self.failUnless(subsubdir.relpath(fs.rootdirectory()) == ['subdir', 'subsubdir'])
self.failUnless(file.relpath(subdir) == ['subsubdir', 'file'])
pass
- pass
-
-class Sync(unittest.TestCase):
- def setUp(self):
- self.rootpath_ = ['', 'tmp', 'confix.FileSystem.'+str(self.__class__.__name__)+'.'+str(os.getpid())]
- pass
- def tearDown(self):
- dir = os.sep.join(self.rootpath_)
- if os.path.isdir(dir):
- shutil.rmtree(dir)
- pass
- pass
- def test_mem2sync(self):
- fs = FileSystem(path=self.rootpath_)
+ def test__sync_mem2sync(self):
+ fs = FileSystem(path=self.rootpath())
subdir = Directory(mode=0700)
fs.rootdirectory().add(name='subdir', entry=subdir)
file = File(mode=0755)
@@ -101,16 +70,16 @@
self.failUnlessEqual(subdir.state(), DirectoryState.SYNC)
self.failUnlessEqual(file.state(), FileState.SYNC_INMEM)
- self.failUnless(os.path.isdir(os.sep.join(self.rootpath_)))
- self.failUnless(os.path.isdir(os.sep.join(self.rootpath_+['subdir'])))
- self.failUnless(os.path.isfile(os.sep.join(self.rootpath_+['subdir', 'file'])))
+ self.failUnless(os.path.isdir(os.sep.join(self.rootpath())))
+ self.failUnless(os.path.isdir(os.sep.join(self.rootpath()+['subdir'])))
+ self.failUnless(os.path.isfile(os.sep.join(self.rootpath()+['subdir', 'file'])))
- self.failUnlessEqual(stat.S_IMODE(os.stat(os.sep.join(self.rootpath_+['subdir'])).st_mode), 0700)
- self.failUnlessEqual(stat.S_IMODE(os.stat(os.sep.join(self.rootpath_+['subdir', 'file'])).st_mode), 0755)
+ self.failUnlessEqual(stat.S_IMODE(os.stat(os.sep.join(self.rootpath()+['subdir'])).st_mode), 0700)
+ self.failUnlessEqual(stat.S_IMODE(os.stat(os.sep.join(self.rootpath()+['subdir', 'file'])).st_mode), 0755)
pass
- def test_dirty2sync(self):
- fs = FileSystem(path=self.rootpath_)
+ def test__sync_dirty2sync(self):
+ fs = FileSystem(path=self.rootpath())
subdir = Directory(mode=0700)
fs.rootdirectory().add(name='subdir', entry=subdir)
file = File(mode=0755)
@@ -125,20 +94,20 @@
fs.sync()
self.failUnlessEqual(newfile.state(), FileState.SYNC_INMEM)
- self.failUnless(os.path.isfile(os.sep.join(self.rootpath_+['subdir', 'newfile'])))
+ self.failUnless(os.path.isfile(os.sep.join(self.rootpath()+['subdir', 'newfile'])))
pass
- def test_filechange(self):
+ def test__sync_filechange(self):
# build up filesystem with our test file and sync it.
- fs = FileSystem(path=self.rootpath_)
+ fs = FileSystem(path=self.rootpath())
file = File(lines=['line 0'])
fs.rootdirectory().add(name='file', entry=file)
file.add_lines(['line 1', 'line 2', 'line 3'])
fs.sync()
# re-read our file and see if everything is there
- fs = scan_filesystem(path=self.rootpath_)
+ fs = scan_filesystem(path=self.rootpath())
file = fs.rootdirectory().find(['file'])
lines = file.lines()
self.failUnlessEqual(lines[0], 'line 0')
@@ -149,13 +118,13 @@
fs.sync()
# append to our file without explicitly reading it.
- fs = scan_filesystem(path=self.rootpath_)
+ fs = scan_filesystem(path=self.rootpath())
file = fs.rootdirectory().find(['file'])
file.add_lines(['line 5'])
fs.sync()
# see if there's still everything there.
- fs = scan_filesystem(path=self.rootpath_)
+ fs = scan_filesystem(path=self.rootpath())
file = fs.rootdirectory().find(['file'])
lines = file.lines()
self.failUnlessEqual(lines[0], 'line 0')
@@ -166,43 +135,40 @@
self.failUnlessEqual(lines[5], 'line 5')
pass
- def test_file_clear_on_sync_false(self):
- fs = FileSystem(path=self.rootpath_)
+ def test__sync_file_clear_on_sync_false(self):
+ fs = FileSystem(path=self.rootpath())
file = File(lines=['line'])
fs.rootdirectory().add(name='file', entry=file)
fs.sync()
self.failIf(file.raw_lines() is None)
pass
- def test_file_clear_on_sync_true(self):
- fs = FileSystem(path=self.rootpath_, flags=set([FileSystem.CLEAR_ON_SYNC]))
+ def test__sync_file_clear_on_sync_true(self):
+ fs = FileSystem(path=self.rootpath(), flags=set([FileSystem.CLEAR_ON_SYNC]))
file = File(lines=['line'])
fs.rootdirectory().add(name='file', entry=file)
fs.sync()
self.failUnless(file.raw_lines() is None)
pass
- def test_file_truncate_persistent(self):
+ def test__sync_file_truncate_persistent(self):
- fs = FileSystem(path=self.rootpath_)
+ fs = FileSystem(path=self.rootpath())
file = File(lines=['line'])
fs.rootdirectory().add(name='file', entry=file)
fs.sync()
- fs = scan_filesystem(path=self.rootpath_)
+ fs = scan_filesystem(path=self.rootpath())
file = fs.rootdirectory().find(['file'])
file.truncate()
fs.sync()
- fs = scan_filesystem(path=self.rootpath_)
+ fs = scan_filesystem(path=self.rootpath())
file = fs.rootdirectory().find(['file'])
self.failUnless(file.lines() == [])
pass
- pass
-
-class VirtualFile(PersistentTestCase):
- def test(self):
+ def test__virtual_file(self):
fs = FileSystem(path=self.rootpath())
dir = fs.rootdirectory().add(
name='dir',
@@ -220,24 +186,19 @@
self.failIf(file.raw_lines() is None)
self.failUnless(file.lines() == ['some token', 'some other token'])
pass
- pass
-class Sync_RootMoreThanOneDirectoryDeep(PersistentTestCase):
+ def test__sync_root_more_than_one_deep(self):
+ # the above tests only test syncing an in-memory filesystem
+ # whose root is only one directory apart from a physical
+ # directory. here we test whether it work with two directory
+ # entries in the air as well.
- # the above tests only test syncing an in-memory filesystem whose
- # root is only one directory apart from a physical directory. here
- # we test whether it work with two directory entries in the air as
- # well.
-
- def test(self):
fs = FileSystem(path=self.rootpath())
fs.sync()
self.failUnless(os.path.isdir(os.sep.join(self.rootpath())))
pass
- pass
-class ExplicitMode(PersistentTestCase):
- def test(self):
+ def test__explicit_mode(self):
fs = FileSystem(path=self.rootpath())
file_with_0755 = fs.rootdirectory().add(
name='file_with_0755',
@@ -249,6 +210,8 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(BasicTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(BasicSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/filesys/tests/inmem/overlay.py
===================================================================
--- confix/trunk/libconfix/core/filesys/tests/inmem/overlay.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/core/filesys/tests/inmem/overlay.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Joerg Faschingbauer
+# Copyright (C) 2007-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -15,20 +15,16 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-from overlay_basic import OverlayBasicSuite
-from overlay_error import OverlayErrorSuite
+import overlay_basic
+import overlay_error
import unittest
-class OverlaySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(OverlayBasicSuite())
- self.addTest(OverlayErrorSuite())
- pass
- pass
+suite = unittest.TestSuite()
+suite.addTest(overlay_basic.suite)
+suite.addTest(overlay_error.suite)
if __name__ == '__main__':
- unittest.TextTestRunner().run(OverlaySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/filesys/tests/inmem/overlay_basic.py
===================================================================
--- confix/trunk/libconfix/core/filesys/tests/inmem/overlay_basic.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/core/filesys/tests/inmem/overlay_basic.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Joerg Faschingbauer
+# Copyright (C) 2007-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -27,23 +27,64 @@
import unittest
import os
-class OverlayBasicSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(OverlayBasicTest('test'))
- self.addTest(OverlaySyncTest('test'))
- self.addTest(OverlayAddFileTest('test'))
- self.addTest(OverlayAddDirectoryTest('test'))
- self.addTest(OverlaySyncTest('test'))
- self.addTest(OverlayAbsPathTest('test'))
- self.addTest(OverlayFileTruncateTest('test'))
- self.addTest(OverlayFileAddLinesTest('test'))
+class OverlayBasicTest(PersistentTestCase):
+ """
+ Derived tests cover a handful of facets of overlaying - sync
+ issues, adding, etc.
+
+ They all use as a basis the following layout,
+
+ first self.first()
+ |-- first_file self.first_first_file()
+ `-- subdir self.first_subdir()
+ `-- first_file self.first_subdir_first_file()
+
+ second self.second()
+ |-- second_file self.second_second_file()
+ `-- subdir self.second_subdir()
+ `-- second_file self.second_subdir_second_file()
+ """
+ def setUp(self):
+ super(OverlayBasicTest, self).setUp()
+
+ self.__first = FileSystem(path=self.rootpath()+['first'])
+ self.__first_first_file = self.__first.rootdirectory().add(
+ name='first_file',
+ entry=File())
+ self.__first_subdir = self.__first.rootdirectory().add(
+ name='subdir',
+ entry=Directory())
+ self.__first_subdir_first_file = self.__first_subdir.add(
+ name='first_file',
+ entry=File())
+
+ self.__second = FileSystem(path=self.rootpath()+['second'])
+ self.__second_second_file = self.__second.rootdirectory().add(
+ name='second_file',
+ entry=File())
+ self.__second_subdir = self.__second.rootdirectory().add(
+ name='subdir',
+ entry=Directory())
+ self.__second_subdir_second_file = self.__second_subdir.add(
+ name='second_file',
+ entry=File())
pass
- pass
-class OverlayBasicTest(unittest.TestCase):
- def test(self):
+ def first(self): return self.__first
+ def first_first_file(self): return self.__first_first_file
+ def first_subdir(self): return self.__first_subdir
+ def first_subdir_first_file(self): return self.__first_subdir_first_file
+ def second(self): return self.__second
+ def second_second_file(self): return self.__second_second_file
+ def second_subdir(self): return self.__second_subdir
+ def second_subdir_second_file(self): return self.__second_subdir_second_file
+
+ def test__basic(self):
+
+ # (this one doesn't use anything from the base, it's just
+ # there)
+
# The following tree contains two directories, original and
# overlay, where overlay is supposed to be 'overlayed' over
# original. That is, the union of both directories contains
@@ -130,67 +171,9 @@
self.failUnless(found_d20_0 is found_d20_1 is found_d20_2)
pass
- pass
-class OverlayTest(PersistentTestCase):
+ def test__sync_1(self):
- """
- Derived tests cover a handful of facets of overlaying - sync
- issues, adding, etc.
-
- They all use as a basis the following layout,
-
- first self.first()
- |-- first_file self.first_first_file()
- `-- subdir self.first_subdir()
- `-- first_file self.first_subdir_first_file()
-
- second self.second()
- |-- second_file self.second_second_file()
- `-- subdir self.second_subdir()
- `-- second_file self.second_subdir_second_file()
- """
- def setUp(self):
- super(OverlayTest, self).setUp()
-
- self.__first = FileSystem(path=self.rootpath()+['first'])
- self.__first_first_file = self.__first.rootdirectory().add(
- name='first_file',
- entry=File())
- self.__first_subdir = self.__first.rootdirectory().add(
- name='subdir',
- entry=Directory())
- self.__first_subdir_first_file = self.__first_subdir.add(
- name='first_file',
- entry=File())
-
- self.__second = FileSystem(path=self.rootpath()+['second'])
- self.__second_second_file = self.__second.rootdirectory().add(
- name='second_file',
- entry=File())
- self.__second_subdir = self.__second.rootdirectory().add(
- name='subdir',
- entry=Directory())
- self.__second_subdir_second_file = self.__second_subdir.add(
- name='second_file',
- entry=File())
- pass
-
- def first(self): return self.__first
- def first_first_file(self): return self.__first_first_file
- def first_subdir(self): return self.__first_subdir
- def first_subdir_first_file(self): return self.__first_subdir_first_file
-
- def second(self): return self.__second
- def second_second_file(self): return self.__second_second_file
- def second_subdir(self): return self.__second_subdir
- def second_subdir_second_file(self): return self.__second_subdir_second_file
-
- pass
-
-class OverlaySyncTest(OverlayTest):
- def test(self):
-
# all write access goes to first, and so does sync
union = OverlayFileSystem(original=self.first(), overlay=self.second())
@@ -205,10 +188,8 @@
self.failIf(os.path.exists(os.sep.join(self.second_subdir_second_file().abspath())))
pass
- pass
-class OverlayAddFileTest(OverlayTest):
- def test(self):
+ def test__add_file(self):
# adding a file to a unioned directory always goes to the
# first, and not to the second.
@@ -227,10 +208,8 @@
self.failIf(self.second().rootdirectory().get('added_file'))
pass
- pass
-class OverlayAddDirectoryTest(OverlayTest):
- def test(self):
+ def test__add_directory(self):
union = OverlayFileSystem(original=self.first(), overlay=self.second())
# like file addition above, a directory addition must show up
@@ -256,10 +235,8 @@
self.failUnless(first_newdir.get('dir'))
self.failUnless(first_newdir.get('file'))
pass
- pass
-class OverlaySyncTest(OverlayTest):
- def test(self):
+ def test__sync_2(self):
union = OverlayFileSystem(original=self.first(), overlay=self.second())
# sync the union; first is synced, and second is not.
@@ -293,10 +270,8 @@
self.failIf(os.path.exists(os.sep.join(self.second().rootdirectory().abspath()+['newdir'])))
self.failIf(os.path.exists(os.sep.join(self.second().rootdirectory().abspath()+['newdir', 'newfile'])))
pass
- pass
-class OverlayAbsPathTest(OverlayTest):
- def test(self):
+ def test__abspath(self):
union = OverlayFileSystem(original=self.first(), overlay=self.second())
# the path of the union filesystem itself is the first.
@@ -335,10 +310,8 @@
# </entries of second>
pass
- pass
-class OverlayFileTruncateTest(OverlayTest):
- def test(self):
+ def test__file_truncate(self):
union = OverlayFileSystem(original=self.first(), overlay=self.second())
first_file = union.rootdirectory().find(['first_file'])
second_file = union.rootdirectory().find(['second_file'])
@@ -348,10 +321,8 @@
self.fail()
except OverlayFile.TruncateError: pass
pass
- pass
-class OverlayFileAddLinesTest(OverlayTest):
- def test(self):
+ def test__file_add_lines(self):
union = OverlayFileSystem(original=self.first(), overlay=self.second())
first_file = union.rootdirectory().find(['first_file'])
second_file = union.rootdirectory().find(['second_file'])
@@ -363,7 +334,9 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(OverlayBasicTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(OverlayBasicSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/filesys/tests/inmem/overlay_error.py
===================================================================
--- confix/trunk/libconfix/core/filesys/tests/inmem/overlay_error.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/core/filesys/tests/inmem/overlay_error.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Joerg Faschingbauer
+# Copyright (C) 2007-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -23,13 +23,6 @@
import unittest
-class OverlayErrorSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(OverlayErrorTest('test'))
- pass
- pass
-
class OverlayErrorTest(unittest.TestCase):
def test(self):
fs_orig = FileSystem(path=[])
@@ -48,6 +41,8 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(OverlayErrorTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(OverlayErrorSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/filesys/tests/inmem/property.py
===================================================================
--- confix/trunk/libconfix/core/filesys/tests/inmem/property.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/core/filesys/tests/inmem/property.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -21,13 +21,6 @@
import unittest
-class PropertySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(Property('test'))
- pass
- pass
-
class Property(unittest.TestCase):
def test(self):
dir = Directory()
@@ -48,6 +41,8 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(Property)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(PropertySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/filesys/tests/inmem/scan.py
===================================================================
--- confix/trunk/libconfix/core/filesys/tests/inmem/scan.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/core/filesys/tests/inmem/scan.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2010 Joerg Faschingbauer
+# Copyright (C) 2007-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -24,18 +24,8 @@
import unittest
import os
-class ScanSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(Test('new_file'))
- self.addTest(Test('new_directory'))
- self.addTest(Test('new_file_in_existing_directory'))
- self.addTest(Test('removed_file'))
- pass
- pass
-
class Test(PersistentTestCase):
- def new_file(self):
+ def test__new_file(self):
# use a filesystem instance to conveniently create the initial
# directory.
fs_orig = FileSystem(self.rootpath())
@@ -59,7 +49,7 @@
self.failUnless(fs_dup.rootdirectory().get('file2'))
pass
- def new_directory(self):
+ def test__new_directory(self):
fs_orig = FileSystem(self.rootpath())
fs_orig.sync()
@@ -74,7 +64,7 @@
self.failUnless(fs_dup.rootdirectory().get('dir'))
pass
- def new_file_in_existing_directory(self):
+ def test__new_file_in_existing_directory(self):
fs_orig = FileSystem(self.rootpath())
orig_dir = fs_orig.rootdirectory().add(
name='dir',
@@ -92,7 +82,7 @@
self.failUnless(fs_dup.rootdirectory().find(['dir', 'file']))
pass
- def removed_file(self):
+ def test__removed_file(self):
# use a filesystem instance to conveniently create the initial
# directory.
fs = FileSystem(self.rootpath())
@@ -110,7 +100,9 @@
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(Test)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(ScanSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/filesys/tests/inmem/suite.py
===================================================================
--- confix/trunk/libconfix/core/filesys/tests/inmem/suite.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/core/filesys/tests/inmem/suite.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2007 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -16,23 +16,19 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-from basic import BasicSuite
-from property import PropertySuite
-from scan import ScanSuite
-from overlay import OverlaySuite
+import basic
+import property
+import scan
+import overlay
import unittest
-class Suite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(BasicSuite())
- self.addTest(PropertySuite())
- self.addTest(ScanSuite())
- self.addTest(OverlaySuite())
- pass
- pass
+suite = unittest.TestSuite()
+suite.addTest(basic.suite)
+suite.addTest(property.suite)
+suite.addTest(scan.suite)
+suite.addTest(overlay.suite)
if __name__ == '__main__':
- unittest.TextTestRunner().run(Suite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/hierarchy/tests/explicit_iface.py
===================================================================
--- confix/trunk/libconfix/core/hierarchy/tests/explicit_iface.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/core/hierarchy/tests/explicit_iface.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Joerg Faschingbauer
+# Copyright (C) 2007-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -24,20 +24,12 @@
from libconfix.core.machinery.local_package import LocalPackage
from libconfix.setups.explicit_setup import ExplicitSetup
-class ExplicitInterfaceInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(Without_Confix2_dir('test'))
- self.addTest(With_Confix2_dir('test'))
- pass
- pass
+class ExplicitInterfaceInMemoryTest(unittest.TestCase):
+ def test__without_confix2_dir(self):
-class Without_Confix2_dir(unittest.TestCase):
-
- """ See if 'subdir' is built when we explicitly say that it
- should. We do not add a Confix2.dir file to 'subdir'."""
+ # See if 'subdir' is built when we explicitly say that it
+ # should. We do not add a Confix2.dir file to 'subdir'.
- def test(self):
fs = FileSystem(path=[])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -56,18 +48,17 @@
self.failIf(package.rootbuilder().find_entry_builder(['subdir']) is None)
pass
- pass
-class With_Confix2_dir(unittest.TestCase):
+ def test__with_confix2_dir(self):
+
+ # Explicitly adding 'subdir' as subdirectory to be built, we
+ # check that an eventual Confix2.dir file is recognized an
+ # executed.
- """ Explicitly adding 'subdir' as subdirectory to be built, we
- check that an eventual Confix2.dir file is recognized an executed.
-
- This is done by adding a file to the subdirectory, and then adding
- a file property to it from the subdir's Confix2.dir file.
- """
+ # This is done by adding a file to the subdirectory, and then
+ # adding a file property to it from the subdir's Confix2.dir
+ # file.
- def test(self):
fs = FileSystem(path=[])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -96,6 +87,8 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(ExplicitInterfaceInMemoryTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(ExplicitInterfaceInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/hierarchy/tests/ignored_entries.py
===================================================================
--- confix/trunk/libconfix/core/hierarchy/tests/ignored_entries.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/core/hierarchy/tests/ignored_entries.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -29,13 +29,6 @@
import unittest
-class IgnoredEntriesSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(IgnoredEntries('test'))
- pass
- pass
-
class IgnoreTestSetup(Setup):
def setup(self, dirbuilder):
dirbuilder.add_builder(IgnoreTestCreator())
@@ -95,6 +88,8 @@
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(IgnoredEntries)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(IgnoredEntriesSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/hierarchy/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/core/hierarchy/tests/suite_inmem.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/core/hierarchy/tests/suite_inmem.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2012 Joerg Faschingbauer
+# Copyright (C) 2008-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -16,8 +16,8 @@
# USA
import dirsetup
-from explicit_iface import ExplicitInterfaceInMemorySuite
-from ignored_entries import IgnoredEntriesSuite
+import explicit_iface
+import ignored_entries
import pseudo_handwritten
import common_iface_suite
@@ -25,8 +25,8 @@
suite = unittest.TestSuite()
suite.addTest(dirsetup.suite)
-suite.addTest(ExplicitInterfaceInMemorySuite())
-suite.addTest(IgnoredEntriesSuite())
+suite.addTest(explicit_iface.suite)
+suite.addTest(ignored_entries.suite)
suite.addTest(pseudo_handwritten.suite)
suite.addTest(common_iface_suite.suite)
Modified: confix/trunk/libconfix/core/tests/suite_build.py
===================================================================
--- confix/trunk/libconfix/core/tests/suite_build.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/core/tests/suite_build.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2012 Joerg Faschingbauer
+# Copyright (C) 2007-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -15,12 +15,12 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-from libconfix.core.filesys.tests.automake.suite import Suite as FileSystemSuite
+import libconfix.core.filesys.tests.automake.suite as filesys_build
import unittest
suite = unittest.TestSuite()
-suite.addTest(FileSystemSuite())
+suite.addTest(filesys_build.suite)
if __name__ == '__main__':
unittest.TextTestRunner().run(suite)
Modified: confix/trunk/libconfix/core/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/core/tests/suite_inmem.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/core/tests/suite_inmem.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2012 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -15,20 +15,20 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-import libconfix.core.utils.tests.suite_inmem
-from libconfix.core.filesys.tests.inmem.suite import Suite as FileSystemSuite
-import libconfix.core.digraph.tests.suite_inmem
-import libconfix.core.machinery.tests.suite_inmem
-import libconfix.core.hierarchy.tests.suite_inmem
+import libconfix.core.utils.tests.suite_inmem as utils_inmem
+import libconfix.core.filesys.tests.inmem.suite as filesys_inmem
+import libconfix.core.digraph.tests.suite_inmem as digraph_inmem
+import libconfix.core.machinery.tests.suite_inmem as machinery_inmem
+import libconfix.core.hierarchy.tests.suite_inmem as hierarchy_inmem
import unittest
suite = unittest.TestSuite()
-suite.addTest(libconfix.core.utils.tests.suite_inmem.suite)
-suite.addTest(FileSystemSuite())
-suite.addTest(libconfix.core.digraph.tests.suite_inmem.suite)
-suite.addTest(libconfix.core.machinery.tests.suite_inmem.suite)
-suite.addTest(libconfix.core.hierarchy.tests.suite_inmem.suite)
+suite.addTest(utils_inmem.suite)
+suite.addTest(filesys_inmem.suite)
+suite.addTest(digraph_inmem.suite)
+suite.addTest(machinery_inmem.suite)
+suite.addTest(hierarchy_inmem.suite)
if __name__ == '__main__':
unittest.TextTestRunner().run(suite)
Modified: confix/trunk/libconfix/frontends/confix2/tests/composite.py
===================================================================
--- confix/trunk/libconfix/frontends/confix2/tests/composite.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/frontends/confix2/tests/composite.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2008 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -25,13 +25,6 @@
from libconfix.core.filesys.file import File
from libconfix.core.filesys.filesys import FileSystem
-class CompositeConfigSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(CompositeConfigTest('test'))
- pass
- pass
-
class CompositeConfigTest(unittest.TestCase):
def test(self):
config = CompositeConfiguration()
@@ -109,6 +102,8 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(CompositeConfigTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(CompositeConfigSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/frontends/confix2/tests/configfile.py
===================================================================
--- confix/trunk/libconfix/frontends/confix2/tests/configfile.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/frontends/confix2/tests/configfile.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2008 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -23,13 +23,6 @@
import unittest
-class ConfigFileSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(ConfigFileTest('test'))
- pass
- pass
-
class ConfigFileTest(unittest.TestCase):
def setUp(self):
fs = FileSystem(path=['', 'home', 'jfasch', '.confix2'])
@@ -88,6 +81,8 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(ConfigFileTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(ConfigFileSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/frontends/confix2/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/frontends/confix2/tests/suite_inmem.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/frontends/confix2/tests/suite_inmem.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -16,19 +16,15 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-from configfile import ConfigFileSuite
-from composite import CompositeConfigSuite
+import configfile
+import composite
import unittest
-class ConfixSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(ConfigFileSuite())
- self.addTest(CompositeConfigSuite())
- pass
- pass
+suite = unittest.TestSuite()
+suite.addTest(configfile.suite)
+suite.addTest(composite.suite)
if __name__ == '__main__':
- unittest.TextTestRunner().run(ConfixSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/frontends/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/frontends/tests/suite_inmem.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/frontends/tests/suite_inmem.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2008 Joerg Faschingbauer
+# Copyright (C) 2007-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -15,17 +15,13 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-from libconfix.frontends.confix2.tests.suite_inmem import ConfixSuite
+import libconfix.frontends.confix2.tests.suite_inmem as confix_inmem
import unittest
-class FrontendsInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(ConfixSuite())
- pass
- pass
+suite = unittest.TestSuite()
+suite.addTest(confix_inmem.suite)
if __name__ == '__main__':
- unittest.TextTestRunner().run(FrontendsInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/c/tests/library_dependencies/suite_build.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/c/tests/library_dependencies/suite_build.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/plugins/automake/c/tests/library_dependencies/suite_build.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -36,16 +36,8 @@
import sys
import os
-class LibraryDependenciesBuildSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(LibraryDependenciesBuildTest('test'))
- self.addTest(LibraryDependenciesBuildTest('test_implicit_with_explicit_libname'))
- pass
- pass
-
class LibraryDependenciesBuildTest(PersistentTestCase):
- def test(self):
+ def test__basic(self):
dirstructure = DirectoryStructure(path=self.rootpath())
# bootstrap&&configure&&build&&install packages in order
@@ -135,7 +127,7 @@
pass
- def test_implicit_with_explicit_libname(self):
+ def test__implicit_with_explicit_libname(self):
fs = FileSystem(path=self.rootpath())
source = fs.rootdirectory().add(
@@ -212,8 +204,11 @@
self.failUnless(os.path.isfile(
os.sep.join(itertools.chain(build.abspath(), ['exe', 'test_implicit_with_explicit_libname_exe_main']))))
+ pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(LibraryDependenciesBuildTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(LibraryDependenciesBuildSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/c/tests/noinst_headers_build.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/c/tests/noinst_headers_build.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/plugins/automake/c/tests/noinst_headers_build.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Joerg Faschingbauer
+# Copyright (C) 2009-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -36,16 +36,8 @@
import unittest
import sys
-class NoInstallHeadersBuildSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(NoPublicInstall('test_explicit_no_public_visibility'))
- self.addTest(NoPublicInstall('test_auto_no_public_visibility'))
- pass
- pass
-
class NoPublicInstall(PersistentTestCase):
- def test_explicit_no_public_visibility(self):
+ def test__explicit_no_public_visibility(self):
fs = FileSystem(path=self.rootpath())
source = fs.rootdirectory().add(
name='source',
@@ -97,7 +89,7 @@
pass
- def test_auto_no_public_visibility(self):
+ def test__auto_no_public_visibility(self):
fs = FileSystem(path=self.rootpath())
source = fs.rootdirectory().add(
name='source',
@@ -151,6 +143,8 @@
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(NoPublicInstall)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(NoInstallHeadersBuildSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/c/tests/suite_build.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/c/tests/suite_build.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/plugins/automake/c/tests/suite_build.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,4 +1,4 @@
-# Copyright (C) 2008 Joerg Faschingbauer
+# Copyright (C) 2008-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -15,19 +15,15 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-from library_dependencies.suite_build import LibraryDependenciesBuildSuite
-from noinst_headers_build import NoInstallHeadersBuildSuite
+import library_dependencies.suite_build as library_dependencies_build
+import noinst_headers_build
import unittest
-class AutomakeCBuildSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(LibraryDependenciesBuildSuite())
- self.addTest(NoInstallHeadersBuildSuite())
- pass
- pass
+suite = unittest.TestSuite()
+suite.addTest(library_dependencies_build.suite)
+suite.addTest(noinst_headers_build.suite)
if __name__ == '__main__':
- unittest.TextTestRunner().run(AutomakeCBuildSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/plainfile/tests/suite_build.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/plainfile/tests/suite_build.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/plugins/automake/plainfile/tests/suite_build.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -41,18 +41,7 @@
import sys
import unittest
-class AutomakePlainfileBuildSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(AutomakePlainfileBuildTest('test'))
- pass
- pass
-
class AutomakePlainfileBuildTest(PersistentTestCase):
- def __init__(self, methodname):
- PersistentTestCase.__init__(self, methodname)
- pass
-
def test(self):
fs = FileSystem(path=self.rootpath())
source = fs.rootdirectory().add(
@@ -114,6 +103,8 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(AutomakePlainfileBuildTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(AutomakePlainfileBuildSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/script/tests/suite_build.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/script/tests/suite_build.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/plugins/automake/script/tests/suite_build.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,4 +1,4 @@
-# Copyright (C) 2010 Joerg Faschingbauer
+# Copyright (C) 2010-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -36,15 +36,8 @@
import sys
import unittest
-class AutomakeScriptBuildSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(AutomakeTestScriptTest('test_true'))
- pass
- pass
-
class AutomakeTestScriptTest(PersistentTestCase):
- def test_true(self):
+ def test__true(self):
fs = FileSystem(path=self.rootpath())
source = fs.rootdirectory().add(
name='source',
@@ -120,6 +113,8 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(AutomakeTestScriptTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(AutomakeScriptBuildSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/tests/autoconf_archive.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/autoconf_archive.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/plugins/automake/tests/autoconf_archive.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2008 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -29,20 +29,10 @@
import sys
import unittest
-class AutoConfArchiveSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(AutoConfArchiveTest('test'))
- pass
- pass
-
class AutoConfArchiveTest(PersistentTestCase):
""" See if we set the aclocal path to the autoconf archive."""
- def __init__(self, methodName):
- PersistentTestCase.__init__(self, methodName)
- pass
def test(self):
fs = FileSystem(path=self.rootpath())
fs.rootdirectory().add(
@@ -65,7 +55,9 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(AutoConfArchiveTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(AutoConfArchiveSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/tests/check/suite_build.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/check/suite_build.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/plugins/automake/tests/check/suite_build.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -32,18 +32,8 @@
import sys
import unittest
-class CheckProgramBuildSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(Test('test_implicit_with_libtool'))
- self.addTest(Test('test_implicit_without_libtool'))
- self.addTest(Test('test_explicit_with_libtool'))
- self.addTest(Test('test_explicit_without_libtool'))
- pass
- pass
-
class Test(PersistentTestCase):
- def test_implicit_with_libtool(self):
+ def test__implicit_with_libtool(self):
fs, source, build = _skeleton(path=self.rootpath())
source.add(
@@ -65,7 +55,7 @@
self.failUnless(os.path.isfile(os.sep.join(build.abspath()+['my-check-was-here'])))
pass
- def test_implicit_without_libtool(self):
+ def test__implicit_without_libtool(self):
fs, source, build = _skeleton(path=self.rootpath())
source.add(
@@ -87,7 +77,7 @@
self.failUnless(os.path.isfile(os.sep.join(build.abspath()+['my-check-was-here'])))
pass
- def test_explicit_with_libtool(self):
+ def test__explicit_with_libtool(self):
fs, source, build = _skeleton(path=self.rootpath())
source.add(
@@ -112,7 +102,7 @@
self.failUnless(os.path.isfile(os.sep.join(build.abspath()+['my-check-was-here'])))
pass
- def test_explicit_without_libtool(self):
+ def test__explicit_without_libtool(self):
fs, source, build = _skeleton(path=self.rootpath())
source.add(
@@ -196,7 +186,9 @@
' O_CREAT|O_RDWR, S_IRUSR|S_IWUSR) >=0?0:1;',
'}']
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(Test)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(CheckProgramBuildSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/tests/exename/suite_build.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/exename/suite_build.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/plugins/automake/tests/exename/suite_build.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2008 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -29,13 +29,6 @@
import sys
import os
-class ExecutableNameBuildSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(ExplicitExecutableNameBuildTest('test'))
- pass
- pass
-
class ExplicitExecutableNameBuildTest(PersistentTestCase):
def test(self):
fs = FileSystem(path=self.rootpath())
@@ -91,7 +84,9 @@
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(ExplicitExecutableNameBuildTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(ExecutableNameBuildSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/tests/explicit_package_build.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/explicit_package_build.py 2013-01-07 08:40:52 UTC (rev 958)
+++ confix/trunk/libconfix/plugins/automake/tests/explicit_package_build.py 2013-01-07 20:03:58 UTC (rev 959)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2009 Joerg Faschingbauer
+# Copyright (C) 2007-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -30,19 +30,16 @@
import unittest
import sys
-class ExplicitPackageBuildSuite(unittest.TestSuite...
[truncated message content] |
|
From: <jf...@us...> - 2013-01-07 08:41:04
|
Revision: 958
http://confix.svn.sourceforge.net/confix/?rev=958&view=rev
Author: jfasch
Date: 2013-01-07 08:40:52 +0000 (Mon, 07 Jan 2013)
Log Message:
-----------
tests: defaultTestLoader.loadTestsFromTestCase
Modified Paths:
--------------
confix/trunk/libconfix/plugins/automake/c/tests/external_library.py
confix/trunk/libconfix/plugins/automake/c/tests/header_install_inmem.py
confix/trunk/libconfix/plugins/automake/c/tests/library.py
confix/trunk/libconfix/plugins/automake/c/tests/library_dependencies/suite_inmem.py
confix/trunk/libconfix/plugins/automake/c/tests/suite_inmem.py
confix/trunk/libconfix/plugins/automake/pkg_config/tests/suite_inmem.py
confix/trunk/libconfix/plugins/automake/script/tests/suite_inmem.py
confix/trunk/libconfix/plugins/automake/tests/ac_config_srcdir_suite.py
confix/trunk/libconfix/plugins/automake/tests/exe.py
confix/trunk/libconfix/plugins/automake/tests/suite_inmem.py
confix/trunk/libconfix/plugins/c/h.py
confix/trunk/libconfix/plugins/c/tests/suite_inmem.py
confix/trunk/libconfix/plugins/cmake/tests/buildinfo_inmem.py
confix/trunk/libconfix/plugins/cmake/tests/cmakelists_inmem.py
confix/trunk/libconfix/plugins/cmake/tests/dependency_order_check_inmem.py
confix/trunk/libconfix/plugins/cmake/tests/external_library_inmem.py
confix/trunk/libconfix/plugins/cmake/tests/hierarchy_inmem.py
confix/trunk/libconfix/plugins/cmake/tests/iface_inmem.py
confix/trunk/libconfix/plugins/cmake/tests/inter_package_inmem.py
confix/trunk/libconfix/plugins/cmake/tests/intra_package_inmem.py
confix/trunk/libconfix/plugins/cmake/tests/modules_inmem.py
confix/trunk/libconfix/plugins/cmake/tests/suite_inmem.py
confix/trunk/libconfix/plugins/cmake/tests/toplevel_boilerplate.py
confix/trunk/libconfix/plugins/idl/tests/suite_inmem.py
confix/trunk/libconfix/plugins/plainfile/tests/suite_inmem.py
confix/trunk/libconfix/plugins/tests/suite_inmem.py
Removed Paths:
-------------
confix/trunk/libconfix/plugins/automake/pkg_config/tests/basic.py
confix/trunk/libconfix/plugins/idl/tests/basic.py
confix/trunk/libconfix/plugins/idl/tests/creator.py
Modified: confix/trunk/libconfix/plugins/automake/c/tests/external_library.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/c/tests/external_library.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/automake/c/tests/external_library.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2008 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -30,17 +30,6 @@
import unittest
-class ExternalLibraryInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(ExternalLibraryTest('testIncludePath'))
- self.addTest(ExternalLibraryTest('testCmdlineMacros'))
- self.addTest(ExternalLibraryTest('testCFlags'))
- self.addTest(ExternalLibraryTest('testCXXFlags'))
- self.addTest(ExternalLibraryTest('testLinkery'))
- pass
- pass
-
class ExternalLibraryTest(unittest.TestCase):
def setUp(self):
fs = FileSystem(path=['', 'path', 'to', 'it'])
@@ -110,7 +99,7 @@
self.__package = None
pass
- def testIncludePath(self):
+ def test__includepath(self):
# lolo must not be seen in lo's include path since nothing is
# built there
lodir_builder = self.__package.rootbuilder().find_entry_builder(['lo'])
@@ -145,7 +134,7 @@
self.failUnless(pos_lo < pos_lolo)
pass
- def testCmdlineMacros(self):
+ def test__cmdline_macros(self):
hidir_builder = self.__package.rootbuilder().find_entry_builder(['hi'])
self.failIf(hidir_builder is None)
hidir_output_builder = find_automake_output_builder(hidir_builder)
@@ -157,7 +146,7 @@
self.failUnless(hidir_output_builder.makefile_am().cmdlinemacros().get('cmdlinemacro_lo') == 'value_lo')
pass
- def testCFlags(self):
+ def test__cflags(self):
hidir_builder = self.__package.rootbuilder().find_entry_builder(['hi'])
self.failIf(hidir_builder is None)
hidir_output_builder = find_automake_output_builder(hidir_builder)
@@ -167,7 +156,7 @@
self.failUnless('lo_cflags' in hidir_output_builder.makefile_am().am_cflags())
pass
- def testCXXFlags(self):
+ def test__cxxflags(self):
hidir_builder = self.__package.rootbuilder().find_entry_builder(['hi'])
self.failIf(hidir_builder is None)
hidir_output_builder = find_automake_output_builder(hidir_builder)
@@ -177,7 +166,7 @@
self.failUnless('lo_cxxflags' in hidir_output_builder.makefile_am().am_cxxflags())
pass
- def testLinkery(self):
+ def test__linkery(self):
hidir_builder = self.__package.rootbuilder().find_entry_builder(['hi'])
self.failIf(hidir_builder is None)
hidir_output_builder = find_automake_output_builder(hidir_builder)
@@ -226,7 +215,9 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(ExternalLibraryTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(ExternalLibraryInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/c/tests/header_install_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/c/tests/header_install_inmem.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/automake/c/tests/header_install_inmem.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -29,17 +29,8 @@
import unittest
-class HeaderInstallInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(BasicHeaderInstallTest('test_zerodeep'))
- self.addTest(BasicHeaderInstallTest('test_onedeep'))
- self.addTest(BasicHeaderInstallTest('test_twodeep'))
- pass
- pass
-
-class BasicHeaderInstallTest(unittest.TestCase):
- def test_zerodeep(self):
+class HeaderInstallTest(unittest.TestCase):
+ def test__zerodeep(self):
fs = dirhier.packageroot()
file_h = fs.rootdirectory().add(name='file.h',
entry=File())
@@ -64,7 +55,7 @@
# pointed to $(srcdir)
pass
- def test_onedeep(self):
+ def test__onedeep(self):
fs = dirhier.packageroot()
file_h = fs.rootdirectory().add(name='file.h',
@@ -119,7 +110,7 @@
pass
- def test_twodeep(self):
+ def test__twodeep(self):
fs = dirhier.packageroot()
file_h = fs.rootdirectory().add(name='file.h',
entry=File())
@@ -141,6 +132,8 @@
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(HeaderInstallTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(HeaderInstallInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/c/tests/library.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/c/tests/library.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/automake/c/tests/library.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Joerg Faschingbauer
+# Copyright (C) 2009-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -29,18 +29,6 @@
import unittest
-class LibraryInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(LibtoolLibrary('test_library_alone'))
- self.addTest(LibtoolLibrary('test_version'))
- self.addTest(ArchiveLibrary('test_library_alone'))
- self.addTest(ArchiveLibrary('test_AC_PROG_RANLIB'))
- self.addTest(LIBADD('test_libtool'))
- self.addTest(LIBADD('test_no_libtool'))
- pass
- pass
-
class LibraryBase(unittest.TestCase):
def use_libtool(self): assert 0
@@ -199,6 +187,11 @@
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(LibtoolLibrary))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(ArchiveLibrary))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(LIBADD))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(LibraryInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/c/tests/library_dependencies/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/c/tests/library_dependencies/suite_inmem.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/automake/c/tests/library_dependencies/suite_inmem.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -39,16 +39,8 @@
import unittest
-class LibraryDependenciesInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(LibraryDependenciesInMemoryTest('test_plain_output'))
- self.addTest(LibraryDependenciesInMemoryTest('test_executable_come_and_go'))
- pass
- pass
-
class LibraryDependenciesInMemoryTest(PersistentTestCase):
- def test_plain_output(self):
+ def test__plain_output(self):
dirstructure = DirectoryStructure(path=self.rootpath())
# kind of bootstrap packages in order (just without writing
@@ -96,7 +88,7 @@
pass
- def test_executable_come_and_go(self):
+ def test__executable_come_and_go(self):
class TestGuide(Builder):
"""
Removes executable as it sees it, and checks that the
@@ -179,6 +171,8 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(LibraryDependenciesInMemoryTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(LibraryDependenciesInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/c/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/c/tests/suite_inmem.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/automake/c/tests/suite_inmem.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2009 Joerg Faschingbauer
+# Copyright (C) 2008-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -15,24 +15,19 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-from library_dependencies.suite_inmem import LibraryDependenciesInMemorySuite
-from external_library import ExternalLibraryInMemorySuite
-from library import LibraryInMemorySuite
-from header_install_inmem import HeaderInstallInMemorySuite
+import external_library
+import library_dependencies.suite_inmem
+import library
+import header_install_inmem
import unittest
-class AutomakeCInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(ExternalLibraryInMemorySuite())
- self.addTest(LibraryDependenciesInMemorySuite())
- self.addTest(LibraryInMemorySuite())
- self.addTest(HeaderInstallInMemorySuite())
- pass
+suite = unittest.TestSuite()
+suite.addTest(external_library.suite)
+suite.addTest(library_dependencies.suite_inmem.suite)
+suite.addTest(library.suite)
+suite.addTest(header_install_inmem.suite)
- pass
-
if __name__ == '__main__':
- unittest.TextTestRunner().run(AutomakeCInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Deleted: confix/trunk/libconfix/plugins/automake/pkg_config/tests/basic.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/pkg_config/tests/basic.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/automake/pkg_config/tests/basic.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -1,94 +0,0 @@
-# Copyright (C) 2007-2009 Joerg Faschingbauer
-
-# This library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of the
-# License, or (at your option) any later version.
-
-# This library 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
-# Lesser General Public License for more details.
-
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-# USA
-
-from libconfix.plugins.automake.pkg_config.setup import PkgConfigSetup
-from libconfix.plugins.automake.out_automake import find_automake_output_builder
-
-from libconfix.core.filesys.directory import Directory
-from libconfix.core.filesys.file import File
-from libconfix.core.utils import const
-from libconfix.core.machinery.local_package import LocalPackage
-from libconfix.frontends.confix2.confix_setup import ConfixSetup
-
-import unittest
-
-class BasicSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(BasicTest('test'))
- pass
- pass
-
-class BasicTest(unittest.TestCase):
-
- def test(self):
- root = Directory()
- root.add(
- name=const.CONFIX2_PKG,
- entry=File(lines=['PACKAGE_NAME("'+self.__class__.__name__+'")',
- 'PACKAGE_VERSION("1.2.3")']))
- root.add(
- name=const.CONFIX2_DIR,
- entry=File())
-
- ext_lib = root.add(
- name='ext-lib',
- entry=Directory())
- ext_lib.add(
- name=const.CONFIX2_DIR,
- entry=File(lines=['PROVIDE_H("ext_lib.h")',
- 'PKG_CONFIG_LIBRARY(packagename="ext_lib")']))
-
- main = root.add(
- name='main',
- entry=Directory())
- main.add(
- name='main.cc',
- entry=File(lines=['#include <ext_lib.h>',
- '// CONFIX:REQUIRE_H("ext_lib.h", REQUIRED)',
- '// CONFIX:EXENAME("the_exe")',
- 'int main() { return 0; }']))
- main.add(
- name=const.CONFIX2_DIR,
- entry=File())
-
- package = LocalPackage(rootdirectory=root,
- setups=[ConfixSetup(use_libtool=False),
- PkgConfigSetup()])
- package.boil(external_nodes=[])
- package.output()
-
- maindir_builder = package.rootbuilder().find_entry_builder(['main'])
- self.failIf(maindir_builder is None)
-
- maindir_output_builder = find_automake_output_builder(maindir_builder)
- self.failIf(maindir_output_builder is None)
-
- self.failUnless('$(ext_lib_PKG_CONFIG_CFLAGS)' in maindir_output_builder.makefile_am().am_cflags())
- self.failUnless('$(ext_lib_PKG_CONFIG_CFLAGS)' in maindir_output_builder.makefile_am().am_cxxflags())
-
- main_ldadd = maindir_output_builder.makefile_am().compound_ldadd(compound_name='the_exe')
- self.failIf(main_ldadd is None)
-
- self.failUnless('$(ext_lib_PKG_CONFIG_LIBS)' in main_ldadd)
- pass
- pass
-
-if __name__ == '__main__':
- unittest.TextTestRunner().run(BasicSuite())
- pass
-
Modified: confix/trunk/libconfix/plugins/automake/pkg_config/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/pkg_config/tests/suite_inmem.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/automake/pkg_config/tests/suite_inmem.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Joerg Faschingbauer
+# Copyright (C) 2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -15,18 +15,74 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-from basic import BasicSuite
+from libconfix.core.filesys.directory import Directory
+from libconfix.core.utils import const
+from libconfix.core.filesys.file import File
+from libconfix.core.machinery.local_package import LocalPackage
+from libconfix.frontends.confix2.confix_setup import ConfixSetup
+from libconfix.plugins.automake.pkg_config.setup import PkgConfigSetup
+from libconfix.plugins.automake.out_automake import find_automake_output_builder
import unittest
-class PkgConfigInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(BasicSuite())
+class BasicTest(unittest.TestCase):
+
+ def test(self):
+ root = Directory()
+ root.add(
+ name=const.CONFIX2_PKG,
+ entry=File(lines=['PACKAGE_NAME("'+self.__class__.__name__+'")',
+ 'PACKAGE_VERSION("1.2.3")']))
+ root.add(
+ name=const.CONFIX2_DIR,
+ entry=File())
+
+ ext_lib = root.add(
+ name='ext-lib',
+ entry=Directory())
+ ext_lib.add(
+ name=const.CONFIX2_DIR,
+ entry=File(lines=['PROVIDE_H("ext_lib.h")',
+ 'PKG_CONFIG_LIBRARY(packagename="ext_lib")']))
+
+ main = root.add(
+ name='main',
+ entry=Directory())
+ main.add(
+ name='main.cc',
+ entry=File(lines=['#include <ext_lib.h>',
+ '// CONFIX:REQUIRE_H("ext_lib.h", REQUIRED)',
+ '// CONFIX:EXENAME("the_exe")',
+ 'int main() { return 0; }']))
+ main.add(
+ name=const.CONFIX2_DIR,
+ entry=File())
+
+ package = LocalPackage(rootdirectory=root,
+ setups=[ConfixSetup(use_libtool=False),
+ PkgConfigSetup()])
+ package.boil(external_nodes=[])
+ package.output()
+
+ maindir_builder = package.rootbuilder().find_entry_builder(['main'])
+ self.failIf(maindir_builder is None)
+
+ maindir_output_builder = find_automake_output_builder(maindir_builder)
+ self.failIf(maindir_output_builder is None)
+
+ self.failUnless('$(ext_lib_PKG_CONFIG_CFLAGS)' in maindir_output_builder.makefile_am().am_cflags())
+ self.failUnless('$(ext_lib_PKG_CONFIG_CFLAGS)' in maindir_output_builder.makefile_am().am_cxxflags())
+
+ main_ldadd = maindir_output_builder.makefile_am().compound_ldadd(compound_name='the_exe')
+ self.failIf(main_ldadd is None)
+
+ self.failUnless('$(ext_lib_PKG_CONFIG_LIBS)' in main_ldadd)
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(BasicTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(PkgConfigInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/script/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/script/tests/suite_inmem.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/automake/script/tests/suite_inmem.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2008 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -26,13 +26,6 @@
import unittest
-class AutomakeScriptInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(ScriptInMemoryTest('test'))
- pass
- pass
-
class ScriptInMemoryTest(unittest.TestCase):
def test(self):
fs = FileSystem(path=['don\'t', 'care'])
@@ -57,6 +50,8 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(ScriptInMemoryTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(AutomakeScriptInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/tests/ac_config_srcdir_suite.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/ac_config_srcdir_suite.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/automake/tests/ac_config_srcdir_suite.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -24,14 +24,6 @@
import unittest
-class AC_CONFIG_SRCDIR_Suite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(NoFiles('test'))
- self.addTest(NonTrivialFiles('test'))
- pass
- pass
-
class AC_CONFIG_SRCDIR_Test(unittest.TestCase):
def test__no_files(self):
fs = FileSystem(path=['dont', 'care'])
Modified: confix/trunk/libconfix/plugins/automake/tests/exe.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/exe.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/automake/tests/exe.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -30,19 +30,6 @@
import unittest
-class ExecutableSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(LibtoolExecutable('common_test'))
- self.addTest(StandardExecutable('common_test'))
- self.addTest(LibtoolExecutable('test'))
- self.addTest(StandardExecutable('test'))
- self.addTest(CheckAndNoinstProgram('test'))
- self.addTest(LDADD('test_libtool'))
- self.addTest(LDADD('test_no_libtool'))
- pass
- pass
-
class ExecutableBase(unittest.TestCase):
def use_libtool(self): assert 0, 'abstract'
def setUp(self):
@@ -118,7 +105,7 @@
self.package_ = None
pass
- def common_test(self):
+ def test__common(self):
exedir_automake_builder = find_automake_output_builder(self.exedir_builder_)
self.failUnless('blah_exe_main' in exedir_automake_builder.makefile_am().bin_programs())
@@ -216,7 +203,7 @@
'int main() {}']))
pass
- def test_libtool(self):
+ def test__libtool(self):
package = LocalPackage(rootdirectory=self.fs_.rootdirectory(),
setups=[ConfixSetup(use_libtool=True)])
package.boil(external_nodes=[])
@@ -230,7 +217,7 @@
self.failUnless('-lLDADD_lib' in exedir_output_builder.makefile_am().compound_ldadd('LDADD_exe_exe'))
pass
- def test_no_libtool(self):
+ def test__no_libtool(self):
package = LocalPackage(rootdirectory=self.fs_.rootdirectory(),
setups=[ConfixSetup(use_libtool=False)])
package.boil(external_nodes=[])
@@ -246,7 +233,11 @@
pass
-suite = ExecutableSuite()
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(LibtoolExecutable))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(StandardExecutable))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(CheckAndNoinstProgram))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(LDADD))
if __name__ == '__main__':
unittest.TextTestRunner().run(suite)
Modified: confix/trunk/libconfix/plugins/automake/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/suite_inmem.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/automake/tests/suite_inmem.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -31,38 +31,32 @@
import inter_package_inmem
import check.suite_inmem
-from libconfix.plugins.automake.pkg_config.tests.suite_inmem import PkgConfigInMemorySuite
-from libconfix.plugins.automake.c.tests.suite_inmem import AutomakeCInMemorySuite
-from libconfix.plugins.automake.script.tests.suite_inmem import AutomakeScriptInMemorySuite
+import libconfix.plugins.automake.pkg_config.tests.suite_inmem
+import libconfix.plugins.automake.c.tests.suite_inmem
+import libconfix.plugins.automake.script.tests.suite_inmem
import unittest
-class AutomakeInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
+suite = unittest.TestSuite()
+suite.addTest(makefile_utils.suite)
+suite.addTest(makefile_am.suite)
+suite.addTest(configure_ac.suite)
+suite.addTest(output.suite)
+suite.addTest(iface.suite)
+suite.addTest(file_installer_suite.suite)
+suite.addTest(c.suite)
+suite.addTest(exe.suite)
+suite.addTest(exename.suite_inmem.suite)
+suite.addTest(readonly_prefixes.suite_inmem.suite)
+suite.addTest(libtool.suite)
+suite.addTest(buildinfo.suite)
+suite.addTest(libconfix.plugins.automake.pkg_config.tests.suite_inmem.suite)
+suite.addTest(libconfix.plugins.automake.c.tests.suite_inmem.suite)
+suite.addTest(ac_config_srcdir_suite.suite)
+suite.addTest(inter_package_inmem.suite)
+suite.addTest(check.suite_inmem.suite)
+suite.addTest(libconfix.plugins.automake.script.tests.suite_inmem.suite)
- self.addTest(makefile_utils.suite)
- self.addTest(makefile_am.suite)
- self.addTest(configure_ac.suite)
- self.addTest(output.suite)
- self.addTest(iface.suite)
- self.addTest(file_installer_suite.suite)
- self.addTest(c.suite)
- self.addTest(exe.suite)
- self.addTest(exename.suite_inmem.suite)
- self.addTest(readonly_prefixes.suite_inmem.suite)
- self.addTest(libtool.suite)
- self.addTest(buildinfo.suite)
- self.addTest(PkgConfigInMemorySuite())
- self.addTest(AutomakeCInMemorySuite())
- self.addTest(ac_config_srcdir_suite.suite)
- self.addTest(inter_package_inmem.suite)
- self.addTest(check.suite_inmem.suite)
- self.addTest(AutomakeScriptInMemorySuite())
- pass
-
- pass
-
if __name__ == '__main__':
- unittest.TextTestRunner().run(AutomakeInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/c/h.py
===================================================================
--- confix/trunk/libconfix/plugins/c/h.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/c/h.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -29,30 +29,30 @@
import os
+class AmbiguousVisibility(Error):
+ def __init__(self, header_builder, cur, prev):
+ Error.__init__(self,
+ msg='Ambiguous visibility of header "'+\
+ '/'.join(header_builder.file().relpath(from_dir=header_builder.package().rootdirectory()))+'": '+\
+ '/'.join(cur)+' vs. '+'/'.join(prev))
+ pass
+ pass
+
+class BadNamespace(Error):
+ def __init__(self, path, error):
+ assert isinstance(error, Error)
+ Error.__init__(self,
+ msg='Bad namespace in file '+'/'.join(path),
+ list=[error])
+ pass
+ pass
+
class HeaderBuilder(CBaseBuilder):
PROPERTY_INSTALLPATH = 'INSTALLPATH_CINCLUDE'
LOCALVISIBILITY_INSTALL = 0
LOCALVISIBILITY_DIRECT_INCLUDE = 1
- class AmbiguousVisibility(Error):
- def __init__(self, header_builder, cur, prev):
- Error.__init__(self,
- msg='Ambiguous visibility of header "'+\
- '/'.join(header_builder.file().relpath(from_dir=header_builder.package().rootdirectory()))+'": '+\
- '/'.join(cur)+' vs. '+'/'.join(prev))
- pass
- pass
-
- class BadNamespace(Error):
- def __init__(self, path, error):
- assert isinstance(error, Error)
- Error.__init__(self,
- msg='Bad namespace in file '+'/'.join(path),
- list=[error])
- pass
- pass
-
def __init__(self, file):
CBaseBuilder.__init__(self, file=file)
@@ -76,7 +76,7 @@
def set_visibility(self, v):
assert type(v) is list
if self.__explicit_visibility is not None and self.__explicit_visibility != v:
- raise self.AmbiguousVisibility(header_builder=self, cur=v, prev=self.__explicit_visibility)
+ raise AmbiguousVisibility(header_builder=self, cur=v, prev=self.__explicit_visibility)
self.__explicit_visibility = v
# others may want to be told about the fact.
@@ -214,7 +214,7 @@
return vis
try:
return self.__calc_namespace()
- except self.BadNamespace:
+ except BadNamespace:
return []
pass
@@ -228,7 +228,7 @@
property_install_path = self.file().get_property(HeaderBuilder.PROPERTY_INSTALLPATH)
if self.__explicit_visibility is not None and property_install_path is not None:
- raise self.AmbiguousVisibility(header_builder=self, cur=self.__explicit_visibility, prev=property_install_path)
+ raise AmbiguousVisibility(header_builder=self, cur=self.__explicit_visibility, prev=property_install_path)
if self.__explicit_visibility is not None:
return self.__explicit_visibility
@@ -244,7 +244,7 @@
try:
self.__namespace_install_path = namespace.find_unique_namespace(self.file().lines())
except Error, e:
- self.__namespace_error = self.BadNamespace(
+ self.__namespace_error = BadNamespace(
path=self.file().relpath(from_dir=self.package().rootdirectory()),
error=e)
raise self.__namespace_error
Modified: confix/trunk/libconfix/plugins/c/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/c/tests/suite_inmem.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/c/tests/suite_inmem.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2012 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -38,32 +38,27 @@
import unittest
-class CInMemoryTestSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
+suite = unittest.TestSuite()
+suite.addTest(provide_require.suite)
+suite.addTest(requires.suite)
+suite.addTest(relate.suite)
+suite.addTest(library.suite)
+suite.addTest(libconfix.plugins.c.setups.tests.suite_inmem.suite)
+suite.addTest(libconfix.plugins.c.relocated_headers.tests.suite_inmem.suite)
+suite.addTest(header_visibility_inmem.suite)
+suite.addTest(regressions.suite_inmem.suite)
+suite.addTest(confix2_dir.suite)
+suite.addTest(misc.suite)
+suite.addTest(setup_cxx.suite)
+suite.addTest(setup_exe.suite)
+suite.addTest(setup_lexyacc.suite)
+suite.addTest(setup_library.suite)
+suite.addTest(clusterer.suite_inmem.suite)
+suite.addTest(ignored_entries.suite)
+suite.addTest(library_versions.suite)
+suite.addTest(inter_package_inmem.suite)
+suite.addTest(buildinfo_inmem.suite)
- self.addTest(provide_require.suite)
- self.addTest(requires.suite)
- self.addTest(relate.suite)
- self.addTest(library.suite)
- self.addTest(libconfix.plugins.c.setups.tests.suite_inmem.suite)
- self.addTest(libconfix.plugins.c.relocated_headers.tests.suite_inmem.suite)
- self.addTest(header_visibility_inmem.suite)
- self.addTest(regressions.suite_inmem.suite)
- self.addTest(confix2_dir.suite)
- self.addTest(misc.suite)
- self.addTest(setup_cxx.suite)
- self.addTest(setup_exe.suite)
- self.addTest(setup_lexyacc.suite)
- self.addTest(setup_library.suite)
- self.addTest(clusterer.suite_inmem.suite)
- self.addTest(ignored_entries.suite)
- self.addTest(library_versions.suite)
- self.addTest(inter_package_inmem.suite)
- self.addTest(buildinfo_inmem.suite)
- pass
- pass
-
if __name__ == '__main__':
- unittest.TextTestRunner().run(CInMemoryTestSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/cmake/tests/buildinfo_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/cmake/tests/buildinfo_inmem.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/cmake/tests/buildinfo_inmem.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Joerg Faschingbauer
+# Copyright (C) 2009-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -28,15 +28,8 @@
import unittest
-class BuildInformationInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(BuildInformationTest('test_confix_module_propagate'))
- pass
- pass
-
class BuildInformationTest(unittest.TestCase):
- def test_confix_module_propagate(self):
+ def test__confix_module_propagate(self):
fs = FileSystem(path=[])
source = fs.rootdirectory().add(
name='source',
@@ -85,6 +78,8 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(BuildInformationTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(BuildInformationInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/cmake/tests/cmakelists_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/cmake/tests/cmakelists_inmem.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/cmake/tests/cmakelists_inmem.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2010 Joerg Faschingbauer
+# Copyright (C) 2009-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -19,19 +19,8 @@
import unittest
-class CMakeListsInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(CMakeListsInMemoryTest('unique_find_call'))
- self.addTest(CMakeListsInMemoryTest('find_call_list'))
- self.addTest(CMakeListsInMemoryTest('collapse_multiple_include'))
- self.addTest(CMakeListsInMemoryTest('target_link_libraries_tightened_after_set'))
- self.addTest(CMakeListsInMemoryTest('target_link_libraries_tightened_before_set'))
- pass
- pass
-
class CMakeListsInMemoryTest(unittest.TestCase):
- def unique_find_call(self):
+ def test__unique_find_call(self):
cmakelists = CMakeLists(custom_command_helper=None)
cmakelists.add_find_call('xxx')
cmakelists.add_find_call('xxx')
@@ -43,14 +32,14 @@
self.failUnlessEqual(len(cmakelists.get_find_calls()), 1)
pass
- def find_call_list(self):
+ def test__find_call_list(self):
cmakelists = CMakeLists(custom_command_helper=None)
cmakelists.add_find_call(['0', '1'])
self.failUnlessEqual(cmakelists.get_find_calls()[0], '0')
self.failUnlessEqual(cmakelists.get_find_calls()[1], '1')
pass
- def collapse_multiple_include(self):
+ def test__collapse_multiple_include(self):
cmakelists = CMakeLists(custom_command_helper=None)
cmakelists.add_include('xxx')
cmakelists.add_include('xxx')
@@ -60,7 +49,7 @@
self.failUnlessEqual(cmakelists.get_includes()[1], 'yyy')
pass
- def target_link_libraries_tightened_after_set(self):
+ def test__target_link_libraries_tightened_after_set(self):
cmakelists = CMakeLists(custom_command_helper=None)
cmakelists.target_link_libraries('target', ['a', 'b'])
cmakelists.tighten_target_link_library(target='target', basename='a', tightened='tight_a')
@@ -69,7 +58,7 @@
['tight_a', 'tight_b'])
pass
- def target_link_libraries_tightened_before_set(self):
+ def test__target_link_libraries_tightened_before_set(self):
cmakelists = CMakeLists(custom_command_helper=None)
cmakelists.tighten_target_link_library(target='target', basename='a', tightened='tight_a')
cmakelists.tighten_target_link_library(target='target', basename='b', tightened='tight_b')
@@ -78,29 +67,10 @@
['tight_a', 'tight_b'])
pass
- def add_custom_command__output(self):
- # only asserting parameters here. I don't know how this will
- # evolve, and I'll likely change much as time passes.
-
- cmakelists = CMakeLists(custom_command_helper=None)
-
- # full set of parameters.
- cmakelists.add_custom_command__output(
- outputs=['output1', 'output2'],
- commands=[('command1', ['arg1.1', 'arg1.2']),
- ('command2', ['arg2.1', 'arg2.2'])],
- depends=['depend1', 'depend2'],
- working_directory='working_directory')
-
- # working_directory is optional.
- cmakelists.add_custom_command__output(
- outputs=['output1', 'output2'],
- commands=[('command1', ['arg1.1', 'arg1.2']),
- ('command2', ['arg2.1', 'arg2.2'])],
- depends=['depend1', 'depend2'])
- pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(CMakeListsInMemoryTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(CMakeListsInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/cmake/tests/dependency_order_check_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/cmake/tests/dependency_order_check_inmem.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/cmake/tests/dependency_order_check_inmem.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Joerg Faschingbauer
+# Copyright (C) 2009-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -29,13 +29,6 @@
import unittest
-class DependencyOrderInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(DependencyOrderTest('test'))
- pass
- pass
-
class DependencyOrderTest(unittest.TestCase):
def test(self):
fs = FileSystem(path=[])
@@ -229,6 +222,8 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(DependencyOrderTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(DependencyOrderInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/cmake/tests/external_library_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/cmake/tests/external_library_inmem.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/cmake/tests/external_library_inmem.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Joerg Faschingbauer
+# Copyright (C) 2009-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -27,13 +27,6 @@
import unittest
-class ExternalLibraryInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(ExternalLibraryTest('test'))
- pass
- pass
-
class ExternalLibraryTest(unittest.TestCase):
def test(self):
fs = FileSystem(path=[])
@@ -84,6 +77,8 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(ExternalLibraryTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(ExternalLibraryInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/cmake/tests/hierarchy_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/cmake/tests/hierarchy_inmem.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/cmake/tests/hierarchy_inmem.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Joerg Faschingbauer
+# Copyright (C) 2009-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -27,15 +27,8 @@
import unittest
-class HierarchyInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(HierarchyInMemoryTest('basic'))
- pass
- pass
-
class HierarchyInMemoryTest(unittest.TestCase):
- def basic(self):
+ def test__basic(self):
fs = FileSystem(path=[])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -71,6 +64,8 @@
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(HierarchyInMemoryTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(HierarchyInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/cmake/tests/iface_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/cmake/tests/iface_inmem.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/cmake/tests/iface_inmem.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Joerg Faschingbauer
+# Copyright (C) 2009-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -41,31 +41,8 @@
import itertools
import unittest
-class InterfaceInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(InterfaceInMemoryTest('test_CMAKE_ADD_MODULE_FILE'))
-
- self.addTest(InterfaceInMemoryTest('test_CMAKE_CMAKELISTS_ADD_INCLUDE_local_only'))
- self.addTest(InterfaceInMemoryTest('test_CMAKE_CMAKELISTS_ADD_INCLUDE_propagate_only'))
- self.addTest(InterfaceInMemoryTest('test_CMAKE_CMAKELISTS_ADD_INCLUDE_propagate_and_local'))
- self.addTest(InterfaceInMemoryTest('test_CMAKE_CMAKELISTS_ADD_INCLUDE_DIRECTORY_local'))
- self.addTest(InterfaceInMemoryTest('test_CMAKE_CMAKELISTS_ADD_INCLUDE_DIRECTORY_propagate'))
- self.addTest(InterfaceInMemoryTest('test_CMAKE_CMAKELISTS_ADD_FIND_CALL_local_only'))
- self.addTest(InterfaceInMemoryTest('test_CMAKE_CMAKELISTS_ADD_FIND_CALL_propagate_only'))
- self.addTest(InterfaceInMemoryTest('test_CMAKE_CMAKELISTS_ADD_FIND_CALL_propagate_and_local'))
- self.addTest(InterfaceInMemoryTest('test_CMAKE_CMAKELISTS_ADD_FIND_CALL_multiline'))
-
- self.addTest(InterfaceInMemoryTest('test_CMAKE_CMDLINE_MACROS_local_only'))
- self.addTest(InterfaceInMemoryTest('test_CMAKE_CMDLINE_MACROS_propagate_only'))
- self.addTest(InterfaceInMemoryTest('test_CMAKE_CMDLINE_MACROS_propagate_and_local'))
- self.addTest(InterfaceInMemoryTest('test_CMAKE_EXTERNAL_LIBRARY'))
- self.addTest(InterfaceInMemoryTest('test_CMAKE_PKG_CONFIG_LIBRARY'))
- pass
- pass
-
class InterfaceInMemoryTest(unittest.TestCase):
- def test_CMAKE_ADD_MODULE_FILE(self):
+ def test__CMAKE_ADD_MODULE_FILE(self):
fs = FileSystem(path=[''])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -92,7 +69,7 @@
pass
- def test_CMAKE_CMAKELISTS_ADD_INCLUDE_local_only(self):
+ def test__CMAKE_CMAKELISTS_ADD_INCLUDE_local_only(self):
fs = FileSystem(path=[''])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -116,7 +93,7 @@
pass
pass
- def test_CMAKE_CMAKELISTS_ADD_INCLUDE_propagate_only(self):
+ def test__CMAKE_CMAKELISTS_ADD_INCLUDE_propagate_only(self):
fs = FileSystem(path=[''])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -142,7 +119,7 @@
pass
pass
- def test_CMAKE_CMAKELISTS_ADD_INCLUDE_propagate_and_local(self):
+ def test__CMAKE_CMAKELISTS_ADD_INCLUDE_propagate_and_local(self):
fs = FileSystem(path=[''])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -168,7 +145,7 @@
pass
pass
- def test_CMAKE_CMAKELISTS_ADD_INCLUDE_DIRECTORY_local(self):
+ def test__CMAKE_CMAKELISTS_ADD_INCLUDE_DIRECTORY_local(self):
fs = FileSystem(path=[''])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -194,7 +171,7 @@
self.failUnless('include-directory' in cmake_output_builder.local_cmakelists().get_include_directories())
pass
- def test_CMAKE_CMAKELISTS_ADD_INCLUDE_DIRECTORY_propagate(self):
+ def test__CMAKE_CMAKELISTS_ADD_INCLUDE_DIRECTORY_propagate(self):
fs = FileSystem(path=[''])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -235,7 +212,7 @@
self.failUnless('include-directory' in cmake_output_builder.local_cmakelists().get_include_directories())
pass
- def test_CMAKE_CMAKELISTS_ADD_FIND_CALL_local_only(self):
+ def test__CMAKE_CMAKELISTS_ADD_FIND_CALL_local_only(self):
fs = FileSystem(path=[''])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -259,7 +236,7 @@
pass
pass
- def test_CMAKE_CMAKELISTS_ADD_FIND_CALL_propagate_only(self):
+ def test__CMAKE_CMAKELISTS_ADD_FIND_CALL_propagate_only(self):
fs = FileSystem(path=[''])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -285,7 +262,7 @@
pass
pass
- def test_CMAKE_CMAKELISTS_ADD_FIND_CALL_propagate_and_local(self):
+ def test__CMAKE_CMAKELISTS_ADD_FIND_CALL_propagate_and_local(self):
fs = FileSystem(path=[''])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -311,7 +288,7 @@
pass
pass
- def test_CMAKE_CMAKELISTS_ADD_FIND_CALL_multiline(self):
+ def test__CMAKE_CMAKELISTS_ADD_FIND_CALL_multiline(self):
fs = FileSystem(path=[''])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -334,7 +311,7 @@
pass
pass
- def test_CMAKE_CMDLINE_MACROS_local_only(self):
+ def test__CMAKE_CMDLINE_MACROS_local_only(self):
fs = FileSystem(path=[])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -357,7 +334,7 @@
pass
pass
- def test_CMAKE_CMDLINE_MACROS_propagate_only(self):
+ def test__CMAKE_CMDLINE_MACROS_propagate_only(self):
fs = FileSystem(path=[])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -386,7 +363,7 @@
pass
pass
- def test_CMAKE_CMDLINE_MACROS_propagate_and_local(self):
+ def test__CMAKE_CMDLINE_MACROS_propagate_and_local(self):
fs = FileSystem(path=[])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -415,7 +392,7 @@
pass
pass
- def test_CMAKE_EXTERNAL_LIBRARY(self):
+ def test__CMAKE_EXTERNAL_LIBRARY(self):
fs = FileSystem(path=[''])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -482,7 +459,7 @@
pass
- def test_CMAKE_PKG_CONFIG_LIBRARY(self):
+ def test__CMAKE_PKG_CONFIG_LIBRARY(self):
fs = FileSystem(path=[])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -538,7 +515,9 @@
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(InterfaceInMemoryTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(InterfaceInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/cmake/tests/inter_package_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/cmake/tests/inter_package_inmem.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/cmake/tests/inter_package_inmem.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Joerg Faschingbauer
+# Copyright (C) 2009-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -27,14 +27,7 @@
import unittest
-class InterPackageInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(IntraPackageTest('test'))
- pass
- pass
-
-class IntraPackageTest(unittest.TestCase):
+class InterPackageTest(unittest.TestCase):
def setUp(self):
# hi -> mid -> lo
@@ -92,6 +85,8 @@
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(InterPackageTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(InterPackageInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/cmake/tests/intra_package_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/cmake/tests/intra_package_inmem.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/cmake/tests/intra_package_inmem.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Joerg Faschingbauer
+# Copyright (C) 2009-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -31,15 +31,6 @@
import unittest
-class IntraPackageInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(IntraPackageTest('test_output'))
- self.addTest(IntraPackageTest('test_linklines'))
- self.addTest(IntraPackageTest('test_include_paths'))
- pass
- pass
-
class IntraPackageTest(unittest.TestCase):
def setUp(self):
fs = FileSystem(path=[], rootdirectory=intra_package.make_source_tree())
@@ -54,7 +45,7 @@
self.__exe_output_builder = find_cmake_output_builder(self.__package.rootbuilder().find_entry_builder(['exe']))
pass
- def test_output(self):
+ def test__output(self):
# library 'lo'
self.failUnlessEqual(len(self.__lo_output_builder.local_cmakelists().get_library('lo')), 4)
self.failUnless('lo1.h' in self.__lo_output_builder.local_cmakelists().get_library('lo'))
@@ -79,7 +70,7 @@
pass
- def test_linklines(self):
+ def test__linklines(self):
# lo needs nothing.
self.failUnless(self.__lo_output_builder.local_cmakelists().get_target_link_libraries('lo') is None)
@@ -96,7 +87,7 @@
pass
- def test_include_paths(self):
+ def test__include_paths(self):
self.failUnlessEqual(len(self.__lo_output_builder.local_cmakelists().get_include_directories()),
# the binary directory that is associated with 'lo'
1
@@ -134,6 +125,8 @@
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(IntraPackageTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(IntraPackageInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/cmake/tests/modules_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/cmake/tests/modules_inmem.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/cmake/tests/modules_inmem.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2010 Joerg Faschingbauer
+# Copyright (C) 2009-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -27,17 +27,8 @@
import unittest
-class ModulesInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(ModulesInMemoryTest('test_ok'))
- self.addTest(ModulesInMemoryTest('test_good_duplicate'))
- self.addTest(ModulesInMemoryTest('test_live'))
- pass
- pass
-
class ModulesInMemoryTest(unittest.TestCase):
- def test_ok(self):
+ def test__ok(self):
modules_dir_builder = ModulesDirectoryBuilder(directory=Directory())
modules_dir_builder.add_module_file(name='mod1.cmake', lines=['mod1'])
modules_dir_builder.add_module_file(name='mod2.cmake', lines=['mod2'])
@@ -51,7 +42,7 @@
self.failUnlessEqual(mod2.lines(), ['mod2'])
pass
- def test_good_duplicate(self):
+ def test__good_duplicate(self):
modules_dir_builder = ModulesDirectoryBuilder(directory=Directory())
modules_dir_builder.add_module_file(name='mod1.cmake', lines=['mod1'])
modules_dir_builder.add_module_file(name='mod1.cmake', lines=['mod1'])
@@ -61,7 +52,7 @@
self.failUnlessEqual(mod1.lines(), ['mod1'])
pass
- def test_live(self):
+ def test__live(self):
fs = FileSystem(path=[])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -94,6 +85,8 @@
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(ModulesInMemoryTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(ModulesInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/cmake/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/cmake/tests/suite_inmem.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/cmake/tests/suite_inmem.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Joerg Faschingbauer
+# Copyright (C) 2009-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -15,36 +15,31 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-from cmakelists_inmem import CMakeListsInMemorySuite
-from toplevel_boilerplate import ToplevelBoilerplateInMemorySuite
-from modules_inmem import ModulesInMemorySuite
-from hierarchy_inmem import HierarchyInMemorySuite
-from intra_package_inmem import IntraPackageInMemorySuite
-from inter_package_inmem import InterPackageInMemorySuite
-from iface_inmem import InterfaceInMemorySuite
-from dependency_order_check_inmem import DependencyOrderInMemorySuite
-from external_library_inmem import ExternalLibraryInMemorySuite
-from buildinfo_inmem import BuildInformationInMemorySuite
+import cmakelists_inmem
+import toplevel_boilerplate
+import modules_inmem
+import hierarchy_inmem
+import intra_package_inmem
+import inter_package_inmem
+import iface_inmem
+import dependency_order_check_inmem
+import external_library_inmem
+import buildinfo_inmem
import unittest
-class CMakeInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(CMakeListsInMemorySuite())
- self.addTest(ToplevelBoilerplateInMemorySuite())
- self.addTest(ModulesInMemorySuite())
- self.addTest(HierarchyInMemorySuite())
- self.addTest(IntraPackageInMemorySuite())
- self.addTest(InterPackageInMemorySuite())
- self.addTest(InterfaceInMemorySuite())
- self.addTest(DependencyOrderInMemorySuite())
- self.addTest(ExternalLibraryInMemorySuite())
- self.addTest(BuildInformationInMemorySuite())
- pass
+suite = unittest.TestSuite()
+suite.addTest(cmakelists_inmem.suite)
+suite.addTest(toplevel_boilerplate.suite)
+suite.addTest(modules_inmem.suite)
+suite.addTest(hierarchy_inmem.suite)
+suite.addTest(intra_package_inmem.suite)
+suite.addTest(inter_package_inmem.suite)
+suite.addTest(iface_inmem.suite)
+suite.addTest(dependency_order_check_inmem.suite)
+suite.addTest(external_library_inmem.suite)
+suite.addTest(buildinfo_inmem.suite)
- pass
-
if __name__ == '__main__':
- unittest.TextTestRunner().run(CMakeInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/cmake/tests/toplevel_boilerplate.py
===================================================================
--- confix/trunk/libconfix/plugins/cmake/tests/toplevel_boilerplate.py 2013-01-07 08:09:27 UTC (rev 957)
+++ confix/trunk/libconfix/plugins/cmake/tests/toplevel_boilerplate.py 2013-01-07 08:40:52 UTC (rev 958)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Joerg Faschingbauer
+# Copyright (C) 2009-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -25,15 +25,6 @@
import unittest
-class ToplevelBoilerplateInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(ToplevelBoilerplateTest('test_basics'))
- self.addTest(ToplevelBoilerplateTest('test_cpack'))
- self.addTest(ToplevelBoilerplateTest('test_rpath'))
- pass
- pass
-
class ToplevelBoilerplateTest(unittest.TestCase):
def setUp(self):
rootdirectory = Directory()
@@ -52,13 +43,13 @@
self.__cmakelists = find_cmake_output_builder(package.rootbuilder()).top_cmakelists()
pass
- def test_basics(self):
+ def test__basics(self):
self.failUnlessEqual(self.__cmakelists.get_project(), 'package-name')
self.failUnlessEqual(self.__cmakelists.get_set('VERSION'), '1.2.3')
self.failUnlessEqual(self.__cmakelists.get_cmake_minimum_required('VERSION'), '2.6')
pass
- def test_cpack(self):
+ def test__cpack(self):
self.failUnless('CPack' in self.__cmakelists.get_includes())
self.failUnlessEqual(self.__cmakelists.get_set('CPACK_SOURCE_PACKAGE_FILE_NAME'), '"${PROJECT_NAME}-${VERSION}"')
self.failUnlessEqual(self.__cmakelists.get_set('CPACK_SOURCE_IGNORE_FILES'), "${CPACK_SOURCE_IGNORE_FILES};~\$")
@@ -68,7 +59,7 @@
s...
[truncated message content] |
|
From: <jf...@us...> - 2013-01-07 08:09:37
|
Revision: 957
http://confix.svn.sourceforge.net/confix/?rev=957&view=rev
Author: jfasch
Date: 2013-01-07 08:09:27 +0000 (Mon, 07 Jan 2013)
Log Message:
-----------
fixed header install tests: nested errors
Modified Paths:
--------------
confix/trunk/libconfix/core/utils/error.py
confix/trunk/libconfix/plugins/c/tests/header_visibility_inmem.py
Modified: confix/trunk/libconfix/core/utils/error.py
===================================================================
--- confix/trunk/libconfix/core/utils/error.py 2013-01-06 19:26:49 UTC (rev 956)
+++ confix/trunk/libconfix/core/utils/error.py 2013-01-07 08:09:27 UTC (rev 957)
@@ -58,6 +58,21 @@
pass
pass
return lines
+
+ def contains_error_of_type(self, t):
+ """ Do I contain a nested error of type t?
+
+ This is true when I am of type t, or when I contain an error
+ of type t. """
+
+ if isinstance(self, t):
+ return True
+ for e in self.__list:
+ if e.contains_error_of_type(t):
+ return True
+ pass
+ return False
+
pass
class NativeError(Exception):
Modified: confix/trunk/libconfix/plugins/c/tests/header_visibility_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/c/tests/header_visibility_inmem.py 2013-01-06 19:26:49 UTC (rev 956)
+++ confix/trunk/libconfix/plugins/c/tests/header_visibility_inmem.py 2013-01-07 08:09:27 UTC (rev 957)
@@ -21,6 +21,7 @@
from libconfix.setups.c import C
from libconfix.plugins.c.h import HeaderBuilder
+import libconfix.plugins.c.h
from libconfix.core.filesys.directory import Directory
from libconfix.core.filesys.file import File
@@ -105,7 +106,8 @@
try:
package.boil(external_nodes=[])
package.output()
- except HeaderBuilder.AmbiguousVisibility, e:
+ except Error, e:
+ self.failUnless(e.contains_error_of_type(libconfix.plugins.c.h.AmbiguousVisibility))
return
self.fail()
pass
@@ -127,7 +129,8 @@
try:
package.boil(external_nodes=[])
package.output()
- except HeaderBuilder.AmbiguousVisibility, e:
+ except Error, e:
+ self.failUnless(e.contains_error_of_type(libconfix.plugins.c.h.AmbiguousVisibility))
return
self.fail()
pass
@@ -150,7 +153,8 @@
try:
package.boil(external_nodes=[])
package.output()
- except HeaderBuilder.AmbiguousVisibility, e:
+ except Error, e:
+ self.failUnless(e.contains_error_of_type(libconfix.plugins.c.h.AmbiguousVisibility))
return
self.fail()
pass
@@ -272,7 +276,8 @@
try:
package.boil(external_nodes=[])
package.output()
- except HeaderBuilder.AmbiguousVisibility, e:
+ except Error, e:
+ self.failUnless(e.contains_error_of_type(libconfix.plugins.c.h.AmbiguousVisibility))
return
self.fail()
pass
@@ -407,7 +412,8 @@
try:
package.boil(external_nodes=[])
package.output()
- except HeaderBuilder.BadNamespace:
+ except Error, e:
+ self.failUnless(e.contains_error_of_type(libconfix.plugins.c.h.BadNamespace))
return
self.fail()
pass
@@ -436,7 +442,8 @@
try:
package.boil(external_nodes=[])
package.output()
- except HeaderBuilder.BadNamespace:
+ except Error, e:
+ self.failUnless(e.contains_error_of_type(libconfix.plugins.c.h.BadNamespace))
return
self.fail()
pass
@@ -485,7 +492,8 @@
try:
package.boil(external_nodes=[])
package.output()
- except HeaderBuilder.BadNamespace:
+ except Error, e:
+ self.failUnless(e.contains_error_of_type(libconfix.plugins.c.h.BadNamespace))
pass
pass
@@ -593,7 +601,8 @@
try:
package.boil(external_nodes=[])
package.output()
- except HeaderBuilder.AmbiguousVisibility:
+ except Error, e:
+ self.failUnless(e.contains_error_of_type(libconfix.plugins.c.h.AmbiguousVisibility))
return
self.fail()
pass
@@ -619,7 +628,8 @@
try:
package.boil(external_nodes=[])
package.output()
- except HeaderBuilder.AmbiguousVisibility:
+ except Error, e:
+ self.failUnless(e.contains_error_of_type(libconfix.plugins.c.h.AmbiguousVisibility))
return
self.fail()
pass
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jf...@us...> - 2013-01-06 19:26:58
|
Revision: 956
http://confix.svn.sourceforge.net/confix/?rev=956&view=rev
Author: jfasch
Date: 2013-01-06 19:26:49 +0000 (Sun, 06 Jan 2013)
Log Message:
-----------
tests: defaultTestLoader.loadTestsFromTestCase
Modified Paths:
--------------
confix/trunk/libconfix/plugins/automake/tests/ac_config_srcdir_suite.py
confix/trunk/libconfix/plugins/automake/tests/buildinfo.py
confix/trunk/libconfix/plugins/automake/tests/c.py
confix/trunk/libconfix/plugins/automake/tests/check/suite_inmem.py
confix/trunk/libconfix/plugins/automake/tests/configure_ac.py
confix/trunk/libconfix/plugins/automake/tests/exe.py
confix/trunk/libconfix/plugins/automake/tests/exename/suite_inmem.py
confix/trunk/libconfix/plugins/automake/tests/file_installer_suite.py
confix/trunk/libconfix/plugins/automake/tests/inter_package_inmem.py
confix/trunk/libconfix/plugins/automake/tests/libtool.py
confix/trunk/libconfix/plugins/automake/tests/makefile_am.py
confix/trunk/libconfix/plugins/automake/tests/makefile_utils.py
confix/trunk/libconfix/plugins/automake/tests/output.py
confix/trunk/libconfix/plugins/automake/tests/readonly_prefixes/suite_inmem.py
confix/trunk/libconfix/plugins/automake/tests/suite_inmem.py
Removed Paths:
-------------
confix/trunk/libconfix/plugins/automake/tests/readonly_prefixes/paths.py
Modified: confix/trunk/libconfix/plugins/automake/tests/ac_config_srcdir_suite.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/ac_config_srcdir_suite.py 2013-01-06 07:40:07 UTC (rev 955)
+++ confix/trunk/libconfix/plugins/automake/tests/ac_config_srcdir_suite.py 2013-01-06 19:26:49 UTC (rev 956)
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2009 Joerg Faschingbauer
+# Copyright (C) 2008-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -32,8 +32,8 @@
pass
pass
-class NoFiles(unittest.TestCase):
- def test(self):
+class AC_CONFIG_SRCDIR_Test(unittest.TestCase):
+ def test__no_files(self):
fs = FileSystem(path=['dont', 'care'])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -53,10 +53,8 @@
self.failUnless(rootdir_automake_builder.configure_ac().unique_file_in_srcdir() in ('Confix2.dir', 'Confix2.pkg'))
pass
- pass
-class NonTrivialFiles(unittest.TestCase):
- def test(self):
+ def test__nontrivial_files(self):
fs = FileSystem(path=['dont', 'care'])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -80,8 +78,9 @@
pass
pass
-
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(AC_CONFIG_SRCDIR_Test)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(AC_CONFIG_SRCDIR_Suite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/tests/buildinfo.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/buildinfo.py 2013-01-06 07:40:07 UTC (rev 955)
+++ confix/trunk/libconfix/plugins/automake/tests/buildinfo.py 2013-01-06 19:26:49 UTC (rev 956)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -28,16 +28,8 @@
import unittest
-class BuildInfoSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(BasicBuildInfoTest('test'))
- self.addTest(UniqueFlags_n_MacrosTest('test'))
- pass
- pass
-
-class BasicBuildInfoTest(unittest.TestCase):
- def test(self):
+class BuildInfoTest(unittest.TestCase):
+ def test__basic(self):
fs = FileSystem(path=['', 'path', 'to', 'it'])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -116,15 +108,14 @@
pass
pass
-class UniqueFlags_n_MacrosTest(unittest.TestCase):
+ def test__unique_flags_n_macros(self):
- # buildinformation (in the case of C: cflags, cxxflags,
- # cmdlinemacros) may float to the receiver over multiple
- # paths. (lo, mid1, hi) and (lo, mid2, hi) in this testcase.
+ # buildinformation (in the case of C: cflags, cxxflags,
+ # cmdlinemacros) may float to the receiver over multiple
+ # paths. (lo, mid1, hi) and (lo, mid2, hi) in this testcase.
- # the receiver is responsible for sorting out duplicates.
-
- def test(self):
+ # the receiver is responsible for sorting out duplicates.
+
fs = FileSystem(path=[])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -218,7 +209,9 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(BuildInfoTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(BuildInfoSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/tests/c.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/c.py 2013-01-06 07:40:07 UTC (rev 955)
+++ confix/trunk/libconfix/plugins/automake/tests/c.py 2013-01-06 19:26:49 UTC (rev 956)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2008 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -26,15 +26,8 @@
from libconfix.testutils import dirhier
-class CSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(CTest('test'))
- pass
- pass
-
class CTest(unittest.TestCase):
- def test(self):
+ def test__basic(self):
fs = dirhier.packageroot()
fs.rootdirectory().add(name='file.h',
entry=File(lines=['#ifndef FILE_H',
@@ -66,6 +59,8 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(CTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(CSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/tests/check/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/check/suite_inmem.py 2013-01-06 07:40:07 UTC (rev 955)
+++ confix/trunk/libconfix/plugins/automake/tests/check/suite_inmem.py 2013-01-06 19:26:49 UTC (rev 956)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -27,16 +27,8 @@
import unittest
-class CheckProgramInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(CheckProgramInMemory('test_with_implicit_setup'))
- self.addTest(CheckProgramInMemory('test_with_explicit_setup'))
- pass
- pass
-
class CheckProgramInMemory(unittest.TestCase):
- def test_with_implicit_setup(self):
+ def test__with_implicit_setup(self):
filesys = FileSystem(path=[])
filesys.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -62,7 +54,7 @@
self.failUnlessEqual(rootdir_output_builder.makefile_am().tests_environment()['name'], 'value')
pass
- def test_with_explicit_setup(self):
+ def test__with_explicit_setup(self):
filesys = FileSystem(path=[])
filesys.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -92,7 +84,9 @@
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(CheckProgramInMemory)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(CheckProgramInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/tests/configure_ac.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/configure_ac.py 2013-01-06 07:40:07 UTC (rev 955)
+++ confix/trunk/libconfix/plugins/automake/tests/configure_ac.py 2013-01-06 19:26:49 UTC (rev 956)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2008 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -20,13 +20,6 @@
import unittest, re
-class ConfigureACSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(ConfigureACTest('test'))
- pass
- pass
-
class ConfigureACTest(unittest.TestCase):
re_AC_INIT = re.compile(r'^\s*AC_INIT\((.*),(.*)\)\s*$')
@@ -36,7 +29,7 @@
re_AC_PREREQ = re.compile(r'^\s*AC_PREREQ\((.*)\)\s*$')
re_white = re.compile(r'\s+')
- def test(self):
+ def test__basic(self):
cf_ac = Configure_ac()
cf_ac.set_packagename('package')
@@ -81,7 +74,9 @@
pass
pass
-
+
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(ConfigureACTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(ConfigureACSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/tests/exe.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/exe.py 2013-01-06 07:40:07 UTC (rev 955)
+++ confix/trunk/libconfix/plugins/automake/tests/exe.py 2013-01-06 19:26:49 UTC (rev 956)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -246,6 +246,8 @@
pass
+suite = ExecutableSuite()
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(ExecutableSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/tests/exename/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/exename/suite_inmem.py 2013-01-06 07:40:07 UTC (rev 955)
+++ confix/trunk/libconfix/plugins/automake/tests/exename/suite_inmem.py 2013-01-06 19:26:49 UTC (rev 956)
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2008 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -25,13 +25,6 @@
import unittest
-class ExecutableNameInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(ExplicitExecutableNameInMemoryTest('test'))
- pass
- pass
-
class ExplicitExecutableNameInMemoryTest(unittest.TestCase):
def test(self):
fs = FileSystem(path=[])
@@ -61,7 +54,9 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(ExplicitExecutableNameInMemoryTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(ExecutableNameInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/tests/file_installer_suite.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/file_installer_suite.py 2013-01-06 07:40:07 UTC (rev 955)
+++ confix/trunk/libconfix/plugins/automake/tests/file_installer_suite.py 2013-01-06 19:26:49 UTC (rev 956)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2008 Joerg Faschingbauer
+# Copyright (C) 2007-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -21,20 +21,9 @@
import unittest
-class FileInstallerSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(OutputTest('test'))
- self.addTest(InterfaceTest('testOk'))
- self.addTest(InterfaceTest('testError'))
- pass
- pass
+class FileInstallerTest(unittest.TestCase):
-class OutputTest(unittest.TestCase):
-
- """Makefile.am output correctness"""
-
- def test(self):
+ def test__makefile_am_output_correctness(self):
file_installer = FileInstaller()
# public headers
@@ -114,12 +103,7 @@
pass
pass
-class InterfaceTest(unittest.TestCase):
-
- """Nail down the interface of FileInstaller, to make changes
- testable more locally."""
-
- def testOk(self):
+ def test__interface_ok(self):
file_installer = FileInstaller()
file_installer.add_public_header(filename='a.h', dir=[])
@@ -146,7 +130,7 @@
pass
- def testError(self):
+ def test__interface_error(self):
file_installer = FileInstaller()
file_installer.add_public_header(filename='a.h', dir=[])
try:
@@ -160,7 +144,9 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(FileInstallerTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(FileInstallerSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/tests/inter_package_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/inter_package_inmem.py 2013-01-06 07:40:07 UTC (rev 955)
+++ confix/trunk/libconfix/plugins/automake/tests/inter_package_inmem.py 2013-01-06 19:26:49 UTC (rev 956)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -34,21 +34,14 @@
import unittest
-class InterPackageInMemorySuite(unittest.TestSuite):
+class InterPackageInMemoryTest(unittest.TestCase):
- """ These tests assert fundamental behavior: relating the
- nodes. Unfortunately, the tests are tied together with the C
- plugin - they should have been written using core objects. (The
- excuse is that C was long considered to be core)."""
+ """ This test assert fundamental behavior: relating the
+ nodes. Unfortunately, the test is tied together with the C plugin
+ - it should have been written using core objects. (The excuse is
+ that C was long considered to be core)."""
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(RepoInstall('test'))
- pass
- pass
-
-class RepoInstall(unittest.TestCase):
- def test(self):
+ def test__repo_install(self):
rootdir = Directory()
rootdir.add(name=const.CONFIX2_PKG,
entry=File(lines=["PACKAGE_NAME('blah')",
@@ -69,7 +62,9 @@
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(InterPackageInMemoryTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(InterPackageInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/tests/libtool.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/libtool.py 2013-01-06 07:40:07 UTC (rev 955)
+++ confix/trunk/libconfix/plugins/automake/tests/libtool.py 2013-01-06 19:26:49 UTC (rev 956)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2008 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -33,16 +33,8 @@
import unittest
-class LibtoolSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(LibtoolTest('testLibrary'))
- self.addTest(LibtoolTest('testSeeThroughHeaders'))
- pass
- pass
-
class LibtoolTest(unittest.TestCase):
- def testLibrary(self):
+ def test__library(self):
rootdir = Directory()
rootdir.add(
name=const.CONFIX2_PKG,
@@ -73,7 +65,7 @@
self.failUnless('lib'+library_builder.basename()+'.la' in automake_output_builder.makefile_am().ltlibraries())
pass
- def testSeeThroughHeaders(self):
+ def test__see_through_headers(self):
fs = FileSystem(path=['don\'t', 'care'])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -177,6 +169,8 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(LibtoolTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(LibtoolSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/tests/makefile_am.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/makefile_am.py 2013-01-06 07:40:07 UTC (rev 955)
+++ confix/trunk/libconfix/plugins/automake/tests/makefile_am.py 2013-01-06 19:26:49 UTC (rev 956)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2008 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -23,18 +23,8 @@
import unittest
-class MakefileAmSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(MakefileAmTest('test_standard_lists'))
- self.addTest(MakefileAmTest('test_errors'))
- self.addTest(MakefileAmTest('test_default_install_directories'))
- self.addTest(MakefileAmTest('test_nondefault_install_directories'))
- pass
- pass
-
class MakefileAmTest(unittest.TestCase):
- def test_standard_lists(self):
+ def test__standard_lists(self):
mf_am = Makefile_am()
mf_am.add_compound_sources('the_program', 'source.h')
@@ -163,7 +153,7 @@
pass
- def test_errors(self):
+ def test__errors(self):
mf_am = Makefile_am()
mf_am.add_compound_sources('the_program', 'source.c')
@@ -174,7 +164,7 @@
pass
- def test_default_install_directories(self):
+ def test__default_install_directories(self):
mf_am = Makefile_am()
# default directory
mf_am.add_to_install_directory(symbolicname='',
@@ -193,7 +183,7 @@
pass
- def test_nondefault_install_directories(self):
+ def test__nondefault_install_directories(self):
mf_am = Makefile_am()
mf_am.define_install_directory(symbolicname='publicheaders_blah',
@@ -222,6 +212,8 @@
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(MakefileAmTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(MakefileAmSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/tests/makefile_utils.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/makefile_utils.py 2013-01-06 07:40:07 UTC (rev 955)
+++ confix/trunk/libconfix/plugins/automake/tests/makefile_utils.py 2013-01-06 19:26:49 UTC (rev 956)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -22,19 +22,8 @@
import unittest
-class MakefileUtilsSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(RuleTest('test_ok1'))
- self.addTest(RuleTest('test_ok2'))
- self.addTest(RuleTest('test_error'))
- self.addTest(RuleTest('test_command_as_list'))
- self.addTest(IncludeTest('test'))
- pass
- pass
-
-class RuleTest(unittest.TestCase):
- def test_ok1(self):
+class MakefileUtilsTest(unittest.TestCase):
+ def test__rules_ok1(self):
lines = []
for element in [makefile.Rule(targets=['target'],
prerequisites=['prereq1', 'prereq2'],
@@ -79,7 +68,7 @@
self.failIf(rule.commands() != [])
pass
- def test_ok2(self):
+ def test__rules_ok2(self):
elements = makefile.parse_makefile(
['',
'target1: prereq1 prereq2',
@@ -124,7 +113,7 @@
self.failIf(rule.commands() != ['command3'])
pass
- def test_error(self):
+ def test__rules_error(self):
self.failUnlessRaises(Error,
makefile.parse_makefile,
lines=['xxx'])
@@ -137,7 +126,7 @@
'zzz'])
pass
- def test_command_as_list(self):
+ def test__rules_command_as_list(self):
rule = makefile.Rule(targets=['target'],
commands=[['cmd1', 'cmd2'], ['cmd3']])
elements = makefile.parse_makefile(lines=rule.lines())
@@ -146,10 +135,7 @@
self.failUnlessEqual(found_rule.commands(), ['cmd1 cmd2', 'cmd3'])
pass
- pass
-
-class IncludeTest(unittest.TestCase):
- def test(self):
+ def test__include(self):
lines = []
for element in [makefile.Include('blah')]:
lines.extend(element.lines())
@@ -161,7 +147,8 @@
pass
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(MakefileUtilsTest)
if __name__ == '__main__':
- unittest.TextTestRunner().run(MakefileUtilsSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/tests/output.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/output.py 2013-01-06 07:40:07 UTC (rev 955)
+++ confix/trunk/libconfix/plugins/automake/tests/output.py 2013-01-06 19:26:49 UTC (rev 956)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -32,19 +32,6 @@
import unittest
-class AutomakeOutputSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(AutomakeOutputTest('test_subdirs'))
- self.addTest(AutomakeOutputTest('test_configure_ac'))
- self.addTest(AutomakeOutputTest('test_auxdir'))
- self.addTest(AutomakeOutputTest('test_toplevel_makefile_am'))
- self.addTest(AutomakeOutputTest('test_subdir1_makefile_am'))
- self.addTest(AutomakeOutputTest('test_subdir2_makefile_am'))
- self.addTest(AutomakeOutputTest('test_subdir3_makefile_am'))
- pass
- pass
-
class AutomakeOutputTest(unittest.TestCase):
def setUp(self):
self.__fs = dirhier.packageroot()
@@ -79,7 +66,7 @@
self.__package = None
pass
- def test_subdirs(self):
+ def test__subdirs(self):
rootdir_automake_builder = find_automake_output_builder(self.__package.rootbuilder())
self.failIfEqual(self.__fs.rootdirectory().find(['Makefile.am']), None)
@@ -134,7 +121,7 @@
pass
- def test_configure_ac(self):
+ def test__configure_ac(self):
rootdir_automake_builder = find_automake_output_builder(self.__package.rootbuilder())
self.failIfEqual(self.__fs.rootdirectory().find(['configure.ac']), None)
@@ -143,7 +130,7 @@
self.failIf(rootdir_automake_builder.configure_ac().packageversion() is None)
pass
- def test_auxdir(self):
+ def test__auxdir(self):
rootdir_automake_builder = find_automake_output_builder(self.__package.rootbuilder())
auxdir = self.__package.rootbuilder().directory().find(['confix-admin', 'automake'])
@@ -154,7 +141,7 @@
self.failUnless('confix-admin/automake/Makefile' in rootdir_automake_builder.configure_ac().ac_config_files())
pass
- def test_toplevel_makefile_am(self):
+ def test__toplevel_makefile_am(self):
rootdir_automake_builder = find_automake_output_builder(self.__package.rootbuilder())
self.failUnless('1.9' in rootdir_automake_builder.makefile_am().automake_options())
@@ -168,7 +155,7 @@
self.failUnless('Makefile.am' in rootdir_automake_builder.makefile_am().maintainercleanfiles())
pass
- def test_subdir1_makefile_am(self):
+ def test__subdir1_makefile_am(self):
subdir1_automake_builder = find_automake_output_builder(
self.__package.rootbuilder().find_entry_builder(['subdir1']))
@@ -178,7 +165,7 @@
self.failUnless('Makefile.am' in subdir1_automake_builder.makefile_am().maintainercleanfiles())
pass
- def test_subdir2_makefile_am(self):
+ def test__subdir2_makefile_am(self):
subdir2_automake_builder = find_automake_output_builder(
self.__package.rootbuilder().find_entry_builder(['subdir2']))
@@ -188,7 +175,7 @@
self.failUnless('Makefile.am' in subdir2_automake_builder.makefile_am().maintainercleanfiles())
pass
- def test_subdir3_makefile_am(self):
+ def test__subdir3_makefile_am(self):
subdir3_automake_builder = find_automake_output_builder(
self.__package.rootbuilder().find_entry_builder(['subdir3']))
@@ -200,7 +187,8 @@
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(AutomakeOutputTest)
if __name__ == '__main__':
- unittest.TextTestRunner().run(AutomakeOutputSuite())
+ unittest.TextTestRunner().run(suite)
pass
Deleted: confix/trunk/libconfix/plugins/automake/tests/readonly_prefixes/paths.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/readonly_prefixes/paths.py 2013-01-06 07:40:07 UTC (rev 955)
+++ confix/trunk/libconfix/plugins/automake/tests/readonly_prefixes/paths.py 2013-01-06 19:26:49 UTC (rev 956)
@@ -1,62 +0,0 @@
-# Copyright (C) 2006-2009 Joerg Faschingbauer
-
-# This library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of the
-# License, or (at your option) any later version.
-
-# This library 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
-# Lesser General Public License for more details.
-
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-# USA
-
-from source import source_tree
-
-from libconfix.plugins.automake.out_automake import find_automake_output_builder
-
-from libconfix.core.machinery.local_package import LocalPackage
-from libconfix.frontends.confix2.confix_setup import ConfixSetup
-
-import unittest
-
-class PathsInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(PathsInMemoryTest('test'))
- pass
- pass
-
-class PathsInMemoryTest(unittest.TestCase):
- def test(self):
- source = source_tree(testname=self.__class__.__name__)
- lo_dir = source.get('lo')
- hi_dir = source.get('hi')
-
- lo_pkg = LocalPackage(rootdirectory=lo_dir, setups=[ConfixSetup(use_libtool=False)])
- lo_pkg.boil(external_nodes=[])
- lo_pkg_inst = lo_pkg.install()
-
- hi_pkg = LocalPackage(rootdirectory=hi_dir, setups=[ConfixSetup(use_libtool=False)])
- hi_pkg.boil(external_nodes=lo_pkg_inst.nodes())
- hi_pkg.output()
-
- hi_pkg_rootdir_output_builder = find_automake_output_builder(hi_pkg.rootbuilder())
- self.failIf(hi_pkg_rootdir_output_builder is None)
- makefile_am = hi_pkg_rootdir_output_builder.makefile_am()
- self.failUnless('$(readonly_prefixes_incpath)' in makefile_am.includepath())
- print
- hi_ldadd = makefile_am.compound_ldadd(self.__class__.__name__+'-hi_main')
- self.failIf(hi_ldadd is None)
- self.failUnless('$(readonly_prefixes_libpath)' in hi_ldadd)
- pass
- pass
-
-if __name__ == '__main__':
- unittest.TextTestRunner().run(PathsInMemorySuite())
- pass
-
Modified: confix/trunk/libconfix/plugins/automake/tests/readonly_prefixes/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/readonly_prefixes/suite_inmem.py 2013-01-06 07:40:07 UTC (rev 955)
+++ confix/trunk/libconfix/plugins/automake/tests/readonly_prefixes/suite_inmem.py 2013-01-06 19:26:49 UTC (rev 956)
@@ -1,4 +1,4 @@
-# Copyright (C) 2006 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -15,17 +15,41 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-from paths import PathsInMemorySuite
+from libconfix.core.machinery.local_package import LocalPackage
+from libconfix.frontends.confix2.confix_setup import ConfixSetup
+from libconfix.plugins.automake.out_automake import find_automake_output_builder
+from source import source_tree
+
import unittest
-class InMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(PathsInMemorySuite())
+class PathsInMemoryTest(unittest.TestCase):
+ def test(self):
+ source = source_tree(testname=self.__class__.__name__)
+ lo_dir = source.get('lo')
+ hi_dir = source.get('hi')
+
+ lo_pkg = LocalPackage(rootdirectory=lo_dir, setups=[ConfixSetup(use_libtool=False)])
+ lo_pkg.boil(external_nodes=[])
+ lo_pkg_inst = lo_pkg.install()
+
+ hi_pkg = LocalPackage(rootdirectory=hi_dir, setups=[ConfixSetup(use_libtool=False)])
+ hi_pkg.boil(external_nodes=lo_pkg_inst.nodes())
+ hi_pkg.output()
+
+ hi_pkg_rootdir_output_builder = find_automake_output_builder(hi_pkg.rootbuilder())
+ self.failIf(hi_pkg_rootdir_output_builder is None)
+ makefile_am = hi_pkg_rootdir_output_builder.makefile_am()
+ self.failUnless('$(readonly_prefixes_incpath)' in makefile_am.includepath())
+ print
+ hi_ldadd = makefile_am.compound_ldadd(self.__class__.__name__+'-hi_main')
+ self.failIf(hi_ldadd is None)
+ self.failUnless('$(readonly_prefixes_libpath)' in hi_ldadd)
pass
- pass
+ pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(PathsInMemoryTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(InMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/automake/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/suite_inmem.py 2013-01-06 07:40:07 UTC (rev 955)
+++ confix/trunk/libconfix/plugins/automake/tests/suite_inmem.py 2013-01-06 19:26:49 UTC (rev 956)
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2008 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -15,21 +15,21 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-from makefile_utils import MakefileUtilsSuite
-from makefile_am import MakefileAmSuite
-from configure_ac import ConfigureACSuite
-from output import AutomakeOutputSuite
+import makefile_utils
+import makefile_am
+import configure_ac
+import output
import iface
-from file_installer_suite import FileInstallerSuite
-from c import CSuite
-from exe import ExecutableSuite
-from exename.suite_inmem import ExecutableNameInMemorySuite
+import file_installer_suite
+import c
+import exe
+import exename.suite_inmem
import readonly_prefixes.suite_inmem
-from libtool import LibtoolSuite
-from buildinfo import BuildInfoSuite
-from ac_config_srcdir_suite import AC_CONFIG_SRCDIR_Suite
-from inter_package_inmem import InterPackageInMemorySuite
-from check.suite_inmem import CheckProgramInMemorySuite
+import libtool
+import buildinfo
+import ac_config_srcdir_suite
+import inter_package_inmem
+import check.suite_inmem
from libconfix.plugins.automake.pkg_config.tests.suite_inmem import PkgConfigInMemorySuite
from libconfix.plugins.automake.c.tests.suite_inmem import AutomakeCInMemorySuite
@@ -41,23 +41,23 @@
def __init__(self):
unittest.TestSuite.__init__(self)
- self.addTest(MakefileUtilsSuite())
- self.addTest(MakefileAmSuite())
- self.addTest(ConfigureACSuite())
- self.addTest(AutomakeOutputSuite())
+ self.addTest(makefile_utils.suite)
+ self.addTest(makefile_am.suite)
+ self.addTest(configure_ac.suite)
+ self.addTest(output.suite)
self.addTest(iface.suite)
- self.addTest(FileInstallerSuite())
- self.addTest(CSuite())
- self.addTest(ExecutableSuite())
- self.addTest(ExecutableNameInMemorySuite())
- self.addTest(readonly_prefixes.suite_inmem.InMemorySuite())
- self.addTest(LibtoolSuite())
- self.addTest(BuildInfoSuite())
+ self.addTest(file_installer_suite.suite)
+ self.addTest(c.suite)
+ self.addTest(exe.suite)
+ self.addTest(exename.suite_inmem.suite)
+ self.addTest(readonly_prefixes.suite_inmem.suite)
+ self.addTest(libtool.suite)
+ self.addTest(buildinfo.suite)
self.addTest(PkgConfigInMemorySuite())
self.addTest(AutomakeCInMemorySuite())
- self.addTest(AC_CONFIG_SRCDIR_Suite())
- self.addTest(InterPackageInMemorySuite())
- self.addTest(CheckProgramInMemorySuite())
+ self.addTest(ac_config_srcdir_suite.suite)
+ self.addTest(inter_package_inmem.suite)
+ self.addTest(check.suite_inmem.suite)
self.addTest(AutomakeScriptInMemorySuite())
pass
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jf...@us...> - 2013-01-06 07:40:14
|
Revision: 955
http://confix.svn.sourceforge.net/confix/?rev=955&view=rev
Author: jfasch
Date: 2013-01-06 07:40:07 +0000 (Sun, 06 Jan 2013)
Log Message:
-----------
tests: starting to use defaultTestLoader.loadTestsFromTestCase
Modified Paths:
--------------
confix/trunk/libconfix/plugins/automake/tests/iface.py
confix/trunk/libconfix/plugins/automake/tests/suite_inmem.py
confix/trunk/libconfix/plugins/c/explicit_iface.py
Modified: confix/trunk/libconfix/plugins/automake/tests/iface.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/iface.py 2012-06-30 13:19:27 UTC (rev 954)
+++ confix/trunk/libconfix/plugins/automake/tests/iface.py 2013-01-06 07:40:07 UTC (rev 955)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2013 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -29,19 +29,8 @@
import unittest
-class InterfaceSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(MAKEFILE_AM_Test('test'))
- self.addTest(ADD_EXTRA_DIST_Test('test'))
- self.addTest(CONFIGURE_AC_ACINCLUDE_M4('test_local'))
- self.addTest(CONFIGURE_AC_ACINCLUDE_M4('test_propagate'))
- self.addTest(CONFIGURE_AC_ACINCLUDE_M4('test_defaults'))
- pass
- pass
-
-class MAKEFILE_AM_Test(unittest.TestCase):
- def test(self):
+class InterfaceTest(unittest.TestCase):
+ def test__MAKEFILE_AM(self):
fs = FileSystem(path=[])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -59,10 +48,8 @@
rootdir_automake_builder = find_automake_output_builder(package.rootbuilder())
self.failUnless(token in rootdir_automake_builder.makefile_am().lines())
pass
- pass
-
-class ADD_EXTRA_DIST_Test(unittest.TestCase):
- def test(self):
+
+ def test__ADD_EXTRA_DIST(self):
fs = FileSystem(path=[])
fs.rootdirectory().add(
name=const.CONFIX2_PKG,
@@ -82,10 +69,8 @@
rootdir_automake_builder = find_automake_output_builder(package.rootbuilder())
self.failUnless('file' in rootdir_automake_builder.makefile_am().extra_dist())
pass
- pass
-class CONFIGURE_AC_ACINCLUDE_M4(unittest.TestCase):
- def test_local(self):
+ def test__CONFIGURE_AC_ACINCLUDE_M4_local(self):
# We pass flags=[LOCAL] explicitly, to both ACINCLUDE_M4() and
# CONFIGURE_AC(), and check if both go into acinclude.m4 and
@@ -130,7 +115,7 @@
pass
pass
- def test_propagate(self):
+ def test__CONFIGURE_AC_ACINCLUDE_M4_propagate(self):
""" We pass flags=[PROPAGATE] explicitly, to both
ACINCLUDE_M4() and CONFIGURE_AC(), propagate it to a dependent
@@ -189,7 +174,7 @@
pass
pass
- def test_defaults(self):
+ def test__CONFIGURE_AC_ACINCLUDE_M4_defaults(self):
""" We do not pass any of flags, propagate it, and ..."""
@@ -247,8 +232,8 @@
pass
+suite = unittest.defaultTestLoader.loadTestsFromTestCase(InterfaceTest)
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(InterfaceSuite())
+ unittest.TextTestRunner().run(suite)
pass
-
-
Modified: confix/trunk/libconfix/plugins/automake/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/automake/tests/suite_inmem.py 2012-06-30 13:19:27 UTC (rev 954)
+++ confix/trunk/libconfix/plugins/automake/tests/suite_inmem.py 2013-01-06 07:40:07 UTC (rev 955)
@@ -19,7 +19,7 @@
from makefile_am import MakefileAmSuite
from configure_ac import ConfigureACSuite
from output import AutomakeOutputSuite
-from iface import InterfaceSuite
+import iface
from file_installer_suite import FileInstallerSuite
from c import CSuite
from exe import ExecutableSuite
@@ -45,7 +45,7 @@
self.addTest(MakefileAmSuite())
self.addTest(ConfigureACSuite())
self.addTest(AutomakeOutputSuite())
- self.addTest(InterfaceSuite())
+ self.addTest(iface.suite)
self.addTest(FileInstallerSuite())
self.addTest(CSuite())
self.addTest(ExecutableSuite())
Modified: confix/trunk/libconfix/plugins/c/explicit_iface.py
===================================================================
--- confix/trunk/libconfix/plugins/c/explicit_iface.py 2012-06-30 13:19:27 UTC (rev 954)
+++ confix/trunk/libconfix/plugins/c/explicit_iface.py 2013-01-06 07:40:07 UTC (rev 955)
@@ -81,6 +81,7 @@
raise Error('H(): invalid "relocate_to" value', [e])
self.__dirbuilder.add_builder(
Master(filename=filename, directory=the_path_to_relocate_to))
+ pass
return h
def C(self, filename):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jf...@us...> - 2012-06-30 13:19:34
|
Revision: 954
http://confix.svn.sourceforge.net/confix/?rev=954&view=rev
Author: jfasch
Date: 2012-06-30 13:19:27 +0000 (Sat, 30 Jun 2012)
Log Message:
-----------
tests restructured
Modified Paths:
--------------
confix/trunk/libconfix/core/hierarchy/tests/common_iface_suite.py
confix/trunk/libconfix/core/hierarchy/tests/dirsetup.py
confix/trunk/libconfix/core/hierarchy/tests/pseudo_handwritten.py
confix/trunk/libconfix/core/hierarchy/tests/suite_inmem.py
confix/trunk/libconfix/core/tests/suite_inmem.py
Modified: confix/trunk/libconfix/core/hierarchy/tests/common_iface_suite.py
===================================================================
--- confix/trunk/libconfix/core/hierarchy/tests/common_iface_suite.py 2012-06-30 13:09:29 UTC (rev 953)
+++ confix/trunk/libconfix/core/hierarchy/tests/common_iface_suite.py 2012-06-30 13:19:27 UTC (rev 954)
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2009 Joerg Faschingbauer
+# Copyright (C) 2008-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -29,24 +29,6 @@
import unittest
-class CommonDirectoryInterfaceSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
-
- self.addTest(CURRENT_BUILDER_Test('test'))
- self.addTest(CWD_Test('test'))
- self.addTest(CURRENT_DIRECTORY_Test('test'))
- self.addTest(ADD_DIRECTORY_Test('test'))
- self.addTest(FIND_ENTRY_Test('test'))
- self.addTest(GET_ENTRIES_Test('test'))
- self.addTest(RESCAN_CURRENT_DIRECTORY_Test('test'))
- self.addTest(ADD_BUILDER_Test('test'))
- self.addTest(SET_FILE_PROPERTIES_Test('test'))
- self.addTest(SET_FILE_PROPERTY_Test('test'))
- self.addTest(BUILDINFORMATION_propagates_Test('test'))
- pass
- pass
-
class CURRENT_BUILDER_Test(unittest.TestCase):
def test(self):
fs = FileSystem(path=[])
@@ -383,6 +365,19 @@
pass
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(CURRENT_BUILDER_Test))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(CWD_Test))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(CURRENT_DIRECTORY_Test))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(ADD_DIRECTORY_Test))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(FIND_ENTRY_Test))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(GET_ENTRIES_Test))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(RESCAN_CURRENT_DIRECTORY_Test))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(ADD_BUILDER_Test))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(SET_FILE_PROPERTIES_Test))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(SET_FILE_PROPERTY_Test))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(BUILDINFORMATION_propagates_Test))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(CommonDirectoryInterfaceSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/hierarchy/tests/dirsetup.py
===================================================================
--- confix/trunk/libconfix/core/hierarchy/tests/dirsetup.py 2012-06-30 13:09:29 UTC (rev 953)
+++ confix/trunk/libconfix/core/hierarchy/tests/dirsetup.py 2012-06-30 13:19:27 UTC (rev 954)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2008 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -25,13 +25,6 @@
import unittest
import types
-class BasicDirectorySetupSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(BasicDirectorySetup('test'))
- pass
- pass
-
class BasicDirectorySetup(unittest.TestCase):
def test(self):
@@ -60,6 +53,9 @@
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(BasicDirectorySetup))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(BasicDirectorySetupSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/hierarchy/tests/pseudo_handwritten.py
===================================================================
--- confix/trunk/libconfix/core/hierarchy/tests/pseudo_handwritten.py 2012-06-30 13:09:29 UTC (rev 953)
+++ confix/trunk/libconfix/core/hierarchy/tests/pseudo_handwritten.py 2012-06-30 13:19:27 UTC (rev 954)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -29,13 +29,6 @@
import unittest
import sys
-class PseudoHandwrittenSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(PseudoHandwritten('test'))
- pass
- pass
-
class PseudoHandwritten(unittest.TestCase):
def test(self):
fs = FileSystem(path=[])
@@ -95,7 +88,10 @@
pass
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(PseudoHandwritten))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(PseudoHandwrittenSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/hierarchy/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/core/hierarchy/tests/suite_inmem.py 2012-06-30 13:09:29 UTC (rev 953)
+++ confix/trunk/libconfix/core/hierarchy/tests/suite_inmem.py 2012-06-30 13:19:27 UTC (rev 954)
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2009 Joerg Faschingbauer
+# Copyright (C) 2008-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -15,27 +15,23 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-from dirsetup import BasicDirectorySetupSuite
+import dirsetup
from explicit_iface import ExplicitInterfaceInMemorySuite
from ignored_entries import IgnoredEntriesSuite
-from pseudo_handwritten import PseudoHandwrittenSuite
-from common_iface_suite import CommonDirectoryInterfaceSuite
+import pseudo_handwritten
+import common_iface_suite
import unittest
-class HierarchyInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(BasicDirectorySetupSuite())
- self.addTest(ExplicitInterfaceInMemorySuite())
- self.addTest(IgnoredEntriesSuite())
- self.addTest(PseudoHandwrittenSuite())
- self.addTest(CommonDirectoryInterfaceSuite())
- pass
- pass
+suite = unittest.TestSuite()
+suite.addTest(dirsetup.suite)
+suite.addTest(ExplicitInterfaceInMemorySuite())
+suite.addTest(IgnoredEntriesSuite())
+suite.addTest(pseudo_handwritten.suite)
+suite.addTest(common_iface_suite.suite)
if __name__ == '__main__':
- unittest.TextTestRunner().run(HierarchyInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/core/tests/suite_inmem.py 2012-06-30 13:09:29 UTC (rev 953)
+++ confix/trunk/libconfix/core/tests/suite_inmem.py 2012-06-30 13:19:27 UTC (rev 954)
@@ -19,7 +19,7 @@
from libconfix.core.filesys.tests.inmem.suite import Suite as FileSystemSuite
import libconfix.core.digraph.tests.suite_inmem
import libconfix.core.machinery.tests.suite_inmem
-from libconfix.core.hierarchy.tests.suite_inmem import HierarchyInMemorySuite
+import libconfix.core.hierarchy.tests.suite_inmem
import unittest
@@ -28,7 +28,7 @@
suite.addTest(FileSystemSuite())
suite.addTest(libconfix.core.digraph.tests.suite_inmem.suite)
suite.addTest(libconfix.core.machinery.tests.suite_inmem.suite)
-suite.addTest(HierarchyInMemorySuite())
+suite.addTest(libconfix.core.hierarchy.tests.suite_inmem.suite)
if __name__ == '__main__':
unittest.TextTestRunner().run(suite)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jf...@us...> - 2012-06-30 13:09:35
|
Revision: 953
http://confix.svn.sourceforge.net/confix/?rev=953&view=rev
Author: jfasch
Date: 2012-06-30 13:09:29 +0000 (Sat, 30 Jun 2012)
Log Message:
-----------
tests restructured
Modified Paths:
--------------
confix/trunk/libconfix/core/digraph/tests/nearest_property.py
confix/trunk/libconfix/core/digraph/tests/suite_inmem.py
Modified: confix/trunk/libconfix/core/digraph/tests/nearest_property.py
===================================================================
--- confix/trunk/libconfix/core/digraph/tests/nearest_property.py 2012-06-30 13:04:11 UTC (rev 952)
+++ confix/trunk/libconfix/core/digraph/tests/nearest_property.py 2012-06-30 13:09:29 UTC (rev 953)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -21,21 +21,6 @@
from libconfix.core.digraph.digraph import DirectedGraph, Edge
from libconfix.core.digraph import algorithm
-class NearestPropertySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(NearestProperty('test0'))
- self.addTest(NearestProperty('test1'))
- self.addTest(NearestProperty('test2'))
- self.addTest(NearestProperty('test3'))
- self.addTest(NearestProperty('test4'))
- self.addTest(NearestProperty('test5'))
- self.addTest(NearestProperty('test6'))
- self.addTest(NearestProperty('test7'))
- self.addTest(NearestProperty('test8'))
- pass
- pass
-
class Node:
GOOD = 0
BAD = 1
@@ -274,6 +259,9 @@
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(NearestProperty))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(NearestPropertySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/digraph/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/core/digraph/tests/suite_inmem.py 2012-06-30 13:04:11 UTC (rev 952)
+++ confix/trunk/libconfix/core/digraph/tests/suite_inmem.py 2012-06-30 13:09:29 UTC (rev 953)
@@ -17,13 +17,13 @@
# USA
import algorithm
-from nearest_property import NearestPropertySuite
+import nearest_property
import unittest
suite = unittest.TestSuite()
suite.addTest(algorithm.suite)
-suite.addTest(NearestPropertySuite())
+suite.addTest(nearest_property.suite)
if __name__ == '__main__':
unittest.TextTestRunner().run(suite)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jf...@us...> - 2012-06-30 13:04:19
|
Revision: 952
http://confix.svn.sourceforge.net/confix/?rev=952&view=rev
Author: jfasch
Date: 2012-06-30 13:04:11 +0000 (Sat, 30 Jun 2012)
Log Message:
-----------
tests restructured
Modified Paths:
--------------
confix/trunk/libconfix/core/digraph/tests/algorithm.py
confix/trunk/libconfix/core/digraph/tests/suite_inmem.py
confix/trunk/libconfix/core/machinery/tests/dependencyset.py
confix/trunk/libconfix/core/machinery/tests/depinfo.py
confix/trunk/libconfix/core/machinery/tests/enlarge_force.py
confix/trunk/libconfix/core/machinery/tests/iface.py
confix/trunk/libconfix/core/machinery/tests/local_package.py
confix/trunk/libconfix/core/machinery/tests/provide.py
confix/trunk/libconfix/core/machinery/tests/relate.py
confix/trunk/libconfix/core/machinery/tests/resolve.py
confix/trunk/libconfix/core/machinery/tests/suite_inmem.py
confix/trunk/libconfix/core/machinery/tests/urgency_error.py
confix/trunk/libconfix/core/tests/suite_build.py
confix/trunk/libconfix/core/tests/suite_inmem.py
confix/trunk/libconfix/core/utils/tests/helper_inmem.py
confix/trunk/libconfix/core/utils/tests/suite_inmem.py
confix/trunk/libconfix/plugins/c/relocated_headers/tests/suite_inmem.py
confix/trunk/libconfix/plugins/c/setups/tests/suite_inmem.py
confix/trunk/libconfix/plugins/c/tests/clusterer/suite_inmem.py
confix/trunk/libconfix/plugins/c/tests/suite_inmem.py
confix/trunk/libconfix/tests/suite_build.py
confix/trunk/libconfix/tests/suite_inmem.py
confix/trunk/tests/00inmem.py
Modified: confix/trunk/libconfix/core/digraph/tests/algorithm.py
===================================================================
--- confix/trunk/libconfix/core/digraph/tests/algorithm.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/libconfix/core/digraph/tests/algorithm.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -16,19 +16,10 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-import unittest
-
from libconfix.core.digraph.digraph import DirectedGraph, Edge
from libconfix.core.digraph import algorithm
-class AlgorithmSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(NodesReachedFromIncludingEntry('test'))
- self.addTest(SubtractNodes('test'))
- self.addTest(CombineGraphs('test'))
- pass
- pass
+import unittest
class NodesReachedFromIncludingEntry(unittest.TestCase):
def test(self):
@@ -101,7 +92,12 @@
pass
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(NodesReachedFromIncludingEntry))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(SubtractNodes))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(CombineGraphs))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(AlgorithmSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/digraph/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/core/digraph/tests/suite_inmem.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/libconfix/core/digraph/tests/suite_inmem.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -16,20 +16,16 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-import unittest
-
-from algorithm import AlgorithmSuite
+import algorithm
from nearest_property import NearestPropertySuite
-class DiGraphSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(AlgorithmSuite())
- self.addTest(NearestPropertySuite())
- pass
- pass
+import unittest
+suite = unittest.TestSuite()
+suite.addTest(algorithm.suite)
+suite.addTest(NearestPropertySuite())
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(DiGraphSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/machinery/tests/dependencyset.py
===================================================================
--- confix/trunk/libconfix/core/machinery/tests/dependencyset.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/libconfix/core/machinery/tests/dependencyset.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -21,13 +21,6 @@
import unittest
-class DependencySetSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(DependencySetTest('test'))
- pass
- pass
-
class DependencySetTest(unittest.TestCase):
def test(self):
a = Provide('a')
@@ -47,7 +40,10 @@
pass
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(DependencySetTest))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(DependencySetSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/machinery/tests/depinfo.py
===================================================================
--- confix/trunk/libconfix/core/machinery/tests/depinfo.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/libconfix/core/machinery/tests/depinfo.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -22,13 +22,6 @@
import unittest
-class DependencyInformationSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(DependencyInformationEqual('test'))
- pass
- pass
-
class DependencyInformationEqual(unittest.TestCase):
def test(self):
d1 = DependencyInformation()
@@ -82,7 +75,10 @@
pass
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(DependencyInformationEqual))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(DependencyInformationSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/machinery/tests/enlarge_force.py
===================================================================
--- confix/trunk/libconfix/core/machinery/tests/enlarge_force.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/libconfix/core/machinery/tests/enlarge_force.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -1,4 +1,4 @@
-# Copyright (C) 2006 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -24,13 +24,6 @@
import unittest
-class EnlargeForceSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(EnlargeForceTest('test'))
- pass
- pass
-
class EnlargeForceDummy(Builder):
def locally_unique_id(self):
return str(self.__class__)
@@ -58,8 +51,11 @@
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(EnlargeForceTest))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(EnlargeForceSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/machinery/tests/iface.py
===================================================================
--- confix/trunk/libconfix/core/machinery/tests/iface.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/libconfix/core/machinery/tests/iface.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -33,14 +33,6 @@
import unittest
-class BuilderInterfaceTestSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(BuilderInterface('testFilePropertyOK'))
- self.addTest(BuilderInterface('testRequires'))
- self.addTest(BuilderInterface('testProvides'))
- pass
-
class BuilderInterface(unittest.TestCase):
def testFilePropertyOK(self):
fs = FileSystem(path=[])
@@ -173,6 +165,9 @@
pass
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(BuilderInterface))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(BuilderInterfaceTestSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/machinery/tests/local_package.py
===================================================================
--- confix/trunk/libconfix/core/machinery/tests/local_package.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/libconfix/core/machinery/tests/local_package.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -30,13 +30,6 @@
import unittest
-class LocalPackageSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(PackageFileTest('test'))
- pass
- pass
-
class PackageFileTest(unittest.TestCase):
def test(self):
package = InstalledPackage(
@@ -65,6 +58,9 @@
pass
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(PackageFileTest))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(LocalPackageSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/machinery/tests/provide.py
===================================================================
--- confix/trunk/libconfix/core/machinery/tests/provide.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/libconfix/core/machinery/tests/provide.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2007 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -16,8 +16,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-import unittest
-
from libconfix.core.filesys.file import File
from libconfix.core.filesys.directory import Directory
from libconfix.core.filesys.filesys import FileSystem
@@ -26,13 +24,7 @@
from libconfix.core.utils import const
from libconfix.core.utils.error import Error
-class ProvideSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(ProvideStringUpdateTest('test'))
- self.addTest(DuplicateProvideTest('test'))
- pass
- pass
+import unittest
class ProvideStringUpdateTest(unittest.TestCase):
@@ -90,7 +82,11 @@
pass
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(ProvideStringUpdateTest))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(DuplicateProvideTest))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(ProvideSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/machinery/tests/relate.py
===================================================================
--- confix/trunk/libconfix/core/machinery/tests/relate.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/libconfix/core/machinery/tests/relate.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -25,14 +25,6 @@
import unittest
-class RelateTestSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(RelateBasic('test'))
- self.addTest(InternalRequires('test'))
- pass
- pass
-
class RelateBasic(unittest.TestCase):
""" See if we are calculating dependencies correctly. """
@@ -100,7 +92,11 @@
pass
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(RelateBasic))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(InternalRequires))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(RelateTestSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/machinery/tests/resolve.py
===================================================================
--- confix/trunk/libconfix/core/machinery/tests/resolve.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/libconfix/core/machinery/tests/resolve.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -36,15 +36,6 @@
import unittest
-class ResolveTestSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(BasicResolveTest('test'))
- self.addTest(NotResolvedTest('test'))
- self.addTest(AmbiguousResolveTest('test'))
- self.addTest(CycleTest('test'))
- pass
-
class BasicResolveTest(unittest.TestCase):
def test(self):
fs = dirhier.packageroot()
@@ -165,8 +156,13 @@
pass
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(BasicResolveTest))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(NotResolvedTest))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(AmbiguousResolveTest))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(CycleTest))
if __name__ == '__main__':
- unittest.TextTestRunner().run(ResolveTestSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/machinery/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/core/machinery/tests/suite_inmem.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/libconfix/core/machinery/tests/suite_inmem.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2007 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -15,34 +15,30 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-from dependencyset import DependencySetSuite
-from depinfo import DependencyInformationSuite
-from enlarge_force import EnlargeForceSuite
-from iface import BuilderInterfaceTestSuite
-from provide import ProvideSuite
-from relate import RelateTestSuite
-from resolve import ResolveTestSuite
-from urgency_error import UrgencyErrorSuite
-from local_package import LocalPackageSuite
+import dependencyset
+import depinfo
+import enlarge_force
+import iface
+import provide
+import relate
+import resolve
+import urgency_error
+import local_package
import unittest
-class MachineryInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(EnlargeForceSuite())
- self.addTest(DependencySetSuite())
- self.addTest(DependencyInformationSuite())
- self.addTest(BuilderInterfaceTestSuite())
- self.addTest(ProvideSuite())
- self.addTest(RelateTestSuite())
- self.addTest(ResolveTestSuite())
- self.addTest(LocalPackageSuite())
- self.addTest(UrgencyErrorSuite())
- pass
- pass
+suite = unittest.TestSuite()
+suite.addTest(enlarge_force.suite)
+suite.addTest(dependencyset.suite)
+suite.addTest(depinfo.suite)
+suite.addTest(iface.suite)
+suite.addTest(provide.suite)
+suite.addTest(relate.suite)
+suite.addTest(resolve.suite)
+suite.addTest(local_package.suite)
+suite.addTest(urgency_error.suite)
if __name__ == '__main__':
- unittest.TextTestRunner().run(MachineryInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/machinery/tests/urgency_error.py
===================================================================
--- confix/trunk/libconfix/core/machinery/tests/urgency_error.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/libconfix/core/machinery/tests/urgency_error.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -1,4 +1,4 @@
-# Copyright (C) 2006 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -29,13 +29,6 @@
import unittest
-class UrgencyErrorSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(UrgencyErrorTest('test'))
- pass
- pass
-
class DeferredProvider(Builder):
def __init__(self, provide):
Builder.__init__(self)
@@ -102,7 +95,10 @@
pass
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(UrgencyErrorTest))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(UrgencyErrorSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/tests/suite_build.py
===================================================================
--- confix/trunk/libconfix/core/tests/suite_build.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/libconfix/core/tests/suite_build.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2008 Joerg Faschingbauer
+# Copyright (C) 2007-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -19,14 +19,10 @@
import unittest
-class CoreBuildSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(FileSystemSuite())
- pass
- pass
+suite = unittest.TestSuite()
+suite.addTest(FileSystemSuite())
if __name__ == '__main__':
- unittest.TextTestRunner().run(CoreBuildSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/core/tests/suite_inmem.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/libconfix/core/tests/suite_inmem.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2008 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -15,25 +15,21 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-from libconfix.core.utils.tests.suite_inmem import UtilsInMemorySuite
+import libconfix.core.utils.tests.suite_inmem
from libconfix.core.filesys.tests.inmem.suite import Suite as FileSystemSuite
-from libconfix.core.digraph.tests.suite_inmem import DiGraphSuite
-from libconfix.core.machinery.tests.suite_inmem import MachineryInMemorySuite
+import libconfix.core.digraph.tests.suite_inmem
+import libconfix.core.machinery.tests.suite_inmem
from libconfix.core.hierarchy.tests.suite_inmem import HierarchyInMemorySuite
import unittest
-class CoreInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(UtilsInMemorySuite())
- self.addTest(FileSystemSuite())
- self.addTest(DiGraphSuite())
- self.addTest(MachineryInMemorySuite())
- self.addTest(HierarchyInMemorySuite())
- pass
- pass
+suite = unittest.TestSuite()
+suite.addTest(libconfix.core.utils.tests.suite_inmem.suite)
+suite.addTest(FileSystemSuite())
+suite.addTest(libconfix.core.digraph.tests.suite_inmem.suite)
+suite.addTest(libconfix.core.machinery.tests.suite_inmem.suite)
+suite.addTest(HierarchyInMemorySuite())
if __name__ == '__main__':
- unittest.TextTestRunner().run(CoreInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/utils/tests/helper_inmem.py
===================================================================
--- confix/trunk/libconfix/core/utils/tests/helper_inmem.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/libconfix/core/utils/tests/helper_inmem.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Joerg Faschingbauer
+# Copyright (C) 2009-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -19,13 +19,6 @@
import unittest
-class HelperInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(HelperTest('test_normalize_lines'))
- pass
- pass
-
class HelperTest(unittest.TestCase):
def test_normalize_lines(self):
self.failUnlessEqual(helper.normalize_lines(['\nxxx\n', 'yyyy']),
@@ -36,6 +29,9 @@
pass
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(HelperTest))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(HelperInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/core/utils/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/core/utils/tests/suite_inmem.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/libconfix/core/utils/tests/suite_inmem.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Joerg Faschingbauer
+# Copyright (C) 2009-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -15,18 +15,14 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-from helper_inmem import HelperInMemorySuite
+import helper_inmem
import unittest
-class UtilsInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(HelperInMemorySuite())
- pass
- pass
+suite = unittest.TestSuite()
+suite.addTest(helper_inmem.suite)
if __name__ == '__main__':
- unittest.TextTestRunner().run(UtilsInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/c/relocated_headers/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/c/relocated_headers/tests/suite_inmem.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/libconfix/plugins/c/relocated_headers/tests/suite_inmem.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -1,4 +1,4 @@
-# Copyright (C) 2006 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -30,7 +30,9 @@
pass
pass
+suite = RelocatedHeadersInMemorySuite()
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(RelocatedHeadersInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/c/setups/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/c/setups/tests/suite_inmem.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/libconfix/plugins/c/setups/tests/suite_inmem.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -28,6 +28,8 @@
pass
pass
+suite = SetupsInMemorySuite()
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(SetupsInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/c/tests/clusterer/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/c/tests/clusterer/suite_inmem.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/libconfix/plugins/c/tests/clusterer/suite_inmem.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -1,4 +1,4 @@
-# Copyright (C) 2006 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -17,14 +17,10 @@
import unittest
-class ClustererInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- pass
- pass
+suite = unittest.TestSuite()
if __name__ == '__main__':
- unittest.TextTestRunner().run(ClustererInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/c/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/c/tests/suite_inmem.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/libconfix/plugins/c/tests/suite_inmem.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -27,14 +27,14 @@
import setup_exe
import setup_lexyacc
import setup_library
-from clusterer.suite_inmem import ClustererInMemorySuite
+import clusterer.suite_inmem
import ignored_entries
import library_versions
import inter_package_inmem
import buildinfo_inmem
-from libconfix.plugins.c.setups.tests.suite_inmem import SetupsInMemorySuite
-from libconfix.plugins.c.relocated_headers.tests.suite_inmem import RelocatedHeadersInMemorySuite
+import libconfix.plugins.c.setups.tests.suite_inmem
+import libconfix.plugins.c.relocated_headers.tests.suite_inmem
import unittest
@@ -46,8 +46,8 @@
self.addTest(requires.suite)
self.addTest(relate.suite)
self.addTest(library.suite)
- self.addTest(SetupsInMemorySuite())
- self.addTest(RelocatedHeadersInMemorySuite())
+ self.addTest(libconfix.plugins.c.setups.tests.suite_inmem.suite)
+ self.addTest(libconfix.plugins.c.relocated_headers.tests.suite_inmem.suite)
self.addTest(header_visibility_inmem.suite)
self.addTest(regressions.suite_inmem.suite)
self.addTest(confix2_dir.suite)
@@ -56,7 +56,7 @@
self.addTest(setup_exe.suite)
self.addTest(setup_lexyacc.suite)
self.addTest(setup_library.suite)
- self.addTest(ClustererInMemorySuite())
+ self.addTest(clusterer.suite_inmem.suite)
self.addTest(ignored_entries.suite)
self.addTest(library_versions.suite)
self.addTest(inter_package_inmem.suite)
Modified: confix/trunk/libconfix/tests/suite_build.py
===================================================================
--- confix/trunk/libconfix/tests/suite_build.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/libconfix/tests/suite_build.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -15,7 +15,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-from libconfix.core.tests.suite_build import CoreBuildSuite
+import libconfix.core.tests.suite_build
from libconfix.plugins.tests.suite_build import PluginsBuildSuite
import unittest
@@ -23,7 +23,7 @@
class LibConfixBuildSuite(unittest.TestSuite):
def __init__(self):
unittest.TestSuite.__init__(self)
- self.addTest(CoreBuildSuite())
+ self.addTest(libconfix.core.tests.suite_build.suite)
self.addTest(PluginsBuildSuite())
pass
pass
Modified: confix/trunk/libconfix/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/tests/suite_inmem.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/libconfix/tests/suite_inmem.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -15,23 +15,19 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-from libconfix.core.tests.suite_inmem import CoreInMemorySuite
+import libconfix.core.tests.suite_inmem
from libconfix.plugins.tests.suite_inmem import PluginsInMemorySuite
from libconfix.frontends.tests.suite_inmem import FrontendsInMemorySuite
import unittest
-class LibConfixInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(CoreInMemorySuite())
- self.addTest(PluginsInMemorySuite())
- self.addTest(FrontendsInMemorySuite())
- pass
- pass
+suite = unittest.TestSuite()
+suite.addTest(libconfix.core.tests.suite_inmem.suite)
+suite.addTest(PluginsInMemorySuite())
+suite.addTest(FrontendsInMemorySuite())
if __name__ == '__main__':
- unittest.TextTestRunner().run(LibConfixInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/tests/00inmem.py
===================================================================
--- confix/trunk/tests/00inmem.py 2012-06-29 19:06:10 UTC (rev 951)
+++ confix/trunk/tests/00inmem.py 2012-06-30 13:04:11 UTC (rev 952)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2008 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -16,14 +16,14 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-from libconfix.tests.suite_inmem import LibConfixInMemorySuite
+import libconfix.tests.suite_inmem
import unittest
if __name__ == '__main__':
suite = unittest.TestSuite()
- suite.addTest(LibConfixInMemorySuite())
+ suite.addTest(libconfix.tests.suite_inmem.suite)
runner = unittest.TextTestRunner()
runner.run(suite)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jf...@us...> - 2012-06-29 19:06:17
|
Revision: 951
http://confix.svn.sourceforge.net/confix/?rev=951&view=rev
Author: jfasch
Date: 2012-06-29 19:06:10 +0000 (Fri, 29 Jun 2012)
Log Message:
-----------
tests restructured
Modified Paths:
--------------
confix/trunk/libconfix/plugins/c/tests/buildinfo_inmem.py
confix/trunk/libconfix/plugins/c/tests/confix2_dir.py
confix/trunk/libconfix/plugins/c/tests/header_visibility_inmem.py
confix/trunk/libconfix/plugins/c/tests/ignored_entries.py
confix/trunk/libconfix/plugins/c/tests/inter_package_inmem.py
confix/trunk/libconfix/plugins/c/tests/library.py
confix/trunk/libconfix/plugins/c/tests/library_versions.py
confix/trunk/libconfix/plugins/c/tests/misc.py
confix/trunk/libconfix/plugins/c/tests/provide_require.py
confix/trunk/libconfix/plugins/c/tests/regressions/bug1713807.py
confix/trunk/libconfix/plugins/c/tests/regressions/suite_inmem.py
confix/trunk/libconfix/plugins/c/tests/relate.py
confix/trunk/libconfix/plugins/c/tests/requires.py
confix/trunk/libconfix/plugins/c/tests/setup_cxx.py
confix/trunk/libconfix/plugins/c/tests/setup_exe.py
confix/trunk/libconfix/plugins/c/tests/setup_lexyacc.py
confix/trunk/libconfix/plugins/c/tests/setup_library.py
confix/trunk/libconfix/plugins/c/tests/suite_inmem.py
Modified: confix/trunk/libconfix/plugins/c/tests/buildinfo_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/c/tests/buildinfo_inmem.py 2012-06-29 16:44:06 UTC (rev 950)
+++ confix/trunk/libconfix/plugins/c/tests/buildinfo_inmem.py 2012-06-29 19:06:10 UTC (rev 951)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Joerg Faschingbauer
+# Copyright (C) 2009-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -21,13 +21,6 @@
import unittest
-class BuildInformationInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(BuildInformationTest('test'))
- pass
- pass
-
class BuildInformationTest(unittest.TestCase):
def test(self):
set1 = BuildInformationSet()
@@ -56,6 +49,9 @@
pass
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(BuildInformationTest))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(BuildInformationInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/c/tests/confix2_dir.py
===================================================================
--- confix/trunk/libconfix/plugins/c/tests/confix2_dir.py 2012-06-29 16:44:06 UTC (rev 950)
+++ confix/trunk/libconfix/plugins/c/tests/confix2_dir.py 2012-06-29 19:06:10 UTC (rev 951)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2008 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -26,13 +26,6 @@
import unittest
-class Confix2_dir_Suite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(ProvideRequireInclude('test'))
- pass
- pass
-
class ProvideRequireInclude(unittest.TestCase):
def test(self):
fs = FileSystem(path=['', 'path', 'to', 'it'])
@@ -68,8 +61,11 @@
self.failUnless(lo_builder in package.digraph().successors(hi_builder))
pass
pass
-
+
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(ProvideRequireInclude))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(Confix2_dir_Suite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/c/tests/header_visibility_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/c/tests/header_visibility_inmem.py 2012-06-29 16:44:06 UTC (rev 950)
+++ confix/trunk/libconfix/plugins/c/tests/header_visibility_inmem.py 2012-06-29 19:06:10 UTC (rev 951)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Joerg Faschingbauer
+# Copyright (C) 2009-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -31,47 +31,6 @@
import unittest
-class HeaderVisibilityInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
-
- # tests with the (bloody) automatic builder recognition iface
- self.addTest(Interfaces('test_auto_fileproperty_only'))
- self.addTest(Interfaces('test_auto_fileiface_only'))
- self.addTest(Interfaces('test_auto_fileiface_fileproperty_conflict'))
- self.addTest(Interfaces('test_auto_fileiface_diriface_conflict'))
- self.addTest(Interfaces('test_auto_fileproperty_diriface_conflict'))
- self.addTest(Interfaces('test_auto_INSTALLDIR_H_empty_string'))
- self.addTest(Interfaces('test_auto_INSTALLDIR_H_overrides_namespace'))
- # tests with the explicit builder registration iface.
- self.addTest(Interfaces('test_explicit_diriface'))
- self.addTest(Interfaces('test_explicit_fileproperty_conflict'))
- self.addTest(Interfaces('test_explicit_fileiface_conflict'))
-
- self.addTest(Namespace('testSimple'))
- self.addTest(Namespace('testNested'))
- self.addTest(Namespace('testGlobal'))
- self.addTest(Namespace('testAmbiguousFlat'))
- self.addTest(Namespace('testAmbiguousNested'))
- self.addTest(Namespace('testDirectory'))
- self.addTest(Namespace('test_bad_namespace_and_no_idea_where_to_install'))
- self.addTest(Namespace('test_bad_namespace_but_good_installdir'))
-
- self.addTest(InstallPriorities('test'))
-
- self.addTest(HeaderInstallPath('test_iface'))
- self.addTest(HeaderInstallPath('test_ambig1'))
- self.addTest(HeaderInstallPath('test_ambig2'))
-
- self.addTest(IntelligentConditionalLocalInstall('test_basic'))
- self.addTest(IntelligentConditionalLocalInstall('test_from_root_directory'))
-
- self.addTest(NoPublicInstall('test_explicit_no_public_visibility'))
- self.addTest(NoPublicInstall('test_auto_no_public_visibility'))
-
- pass
- pass
-
class Interfaces(unittest.TestCase):
def test_auto_fileproperty_only(self):
fs = FileSystem(path=[])
@@ -860,6 +819,14 @@
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(Interfaces))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(Namespace))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(InstallPriorities))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(HeaderInstallPath))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(IntelligentConditionalLocalInstall))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(NoPublicInstall))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(HeaderVisibilityInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/c/tests/ignored_entries.py
===================================================================
--- confix/trunk/libconfix/plugins/c/tests/ignored_entries.py 2012-06-29 16:44:06 UTC (rev 950)
+++ confix/trunk/libconfix/plugins/c/tests/ignored_entries.py 2012-06-29 19:06:10 UTC (rev 951)
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2009 Joerg Faschingbauer
+# Copyright (C) 2008-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -27,14 +27,6 @@
import unittest
-class IgnoredEntriesInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(IgnoredEntriesTest('test_rootdirectory'))
- self.addTest(IgnoredEntriesTest('test_subdirectory'))
- pass
- pass
-
class IgnoredEntriesTest(unittest.TestCase):
def test_rootdirectory(self):
fs = FileSystem(path=['a'])
@@ -122,6 +114,9 @@
pass
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(IgnoredEntriesTest))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(IgnoredEntriesInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/c/tests/inter_package_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/c/tests/inter_package_inmem.py 2012-06-29 16:44:06 UTC (rev 950)
+++ confix/trunk/libconfix/plugins/c/tests/inter_package_inmem.py 2012-06-29 19:06:10 UTC (rev 951)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Joerg Faschingbauer
+# Copyright (C) 2009-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -15,6 +15,12 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
+""" These tests assert fundamental behavior: relating the
+nodes. Unfortunately, the tests are tied together with the C plugin -
+they should have been written using core objects. (The excuse is that
+C was long considered to be core)."""
+
+
from libconfix.plugins.c.library import LibraryBuilder
from libconfix.plugins.c.buildinfo import BuildInfo_CLibrary_NativeInstalled
@@ -30,19 +36,6 @@
import unittest
-class InterPackageInMemorySuite(unittest.TestSuite):
-
- """ These tests assert fundamental behavior: relating the
- nodes. Unfortunately, the tests are tied together with the C
- plugin - they should have been written using core objects. (The
- excuse is that C was long considered to be core)."""
-
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(InterPackageRelate('test'))
- pass
- pass
-
class InterPackageRelate(unittest.TestCase):
def test(self):
# boil and install lo
@@ -118,7 +111,10 @@
pass
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(InterPackageRelate))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(InterPackageInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/c/tests/library.py
===================================================================
--- confix/trunk/libconfix/plugins/c/tests/library.py 2012-06-29 16:44:06 UTC (rev 950)
+++ confix/trunk/libconfix/plugins/c/tests/library.py 2012-06-29 19:06:10 UTC (rev 951)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2008 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -31,13 +31,6 @@
import unittest
-class LibrarySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(LibraryTest('test_library_members'))
- pass
- pass
-
class LibraryTest(unittest.TestCase):
def test_library_members(self):
fs = FileSystem(path=[])
@@ -82,6 +75,9 @@
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(LibraryTest))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(LibrarySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/c/tests/library_versions.py
===================================================================
--- confix/trunk/libconfix/plugins/c/tests/library_versions.py 2012-06-29 16:44:06 UTC (rev 950)
+++ confix/trunk/libconfix/plugins/c/tests/library_versions.py 2012-06-29 19:06:10 UTC (rev 951)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -29,16 +29,6 @@
import unittest
-class LibraryVersionsSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(ExplicitLibraryVersionTest('test'))
- self.addTest(DefaultLibraryVersionTest('testExactPackageVersion'))
- self.addTest(DefaultLibraryVersionTest('testPostfixedPackageVersion'))
- self.addTest(DefaultLibraryVersionTest('testUnparseablePackageVersion'))
- pass
- pass
-
class ExplicitLibraryVersionTest(unittest.TestCase):
def test(self):
fs = FileSystem(path=[])
@@ -114,6 +104,10 @@
pass
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(ExplicitLibraryVersionTest))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(DefaultLibraryVersionTest))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(LibraryVersionsSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/c/tests/misc.py
===================================================================
--- confix/trunk/libconfix/plugins/c/tests/misc.py 2012-06-29 16:44:06 UTC (rev 950)
+++ confix/trunk/libconfix/plugins/c/tests/misc.py 2012-06-29 19:06:10 UTC (rev 951)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2008 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -25,14 +25,6 @@
from libconfix.core.utils import const
from libconfix.frontends.confix2.confix_setup import ConfixSetup
-class MiscellaneousSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(IgnoredEntriesTest('test'))
- self.addTest(NoInternalRequiresTest('test'))
- pass
- pass
-
class IgnoredEntriesTest(unittest.TestCase):
# a regression I had one day. turned out that IGNORE_FILE() passed
@@ -88,7 +80,11 @@
pass
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(IgnoredEntriesTest))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(NoInternalRequiresTest))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(MiscellaneousSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/c/tests/provide_require.py
===================================================================
--- confix/trunk/libconfix/plugins/c/tests/provide_require.py 2012-06-29 16:44:06 UTC (rev 950)
+++ confix/trunk/libconfix/plugins/c/tests/provide_require.py 2012-06-29 19:06:10 UTC (rev 951)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2008 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -30,14 +30,6 @@
Provide_CInclude
from libconfix.plugins.c.setups.default_setup import DefaultCSetup
-class Provide_CInclude_and_Require_CInclude_Suite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(Provide_CInclude_and_Require_CInclude('testBasic'))
- self.addTest(Provide_CInclude_and_Require_CInclude('testIface'))
- pass
- pass
-
class Provide_CInclude_and_Require_CInclude(unittest.TestCase):
def testBasic(self):
r = Require_CInclude(filename='file.h', found_in=[], urgency=Require.URGENCY_DEFAULT)
@@ -103,6 +95,9 @@
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(Provide_CInclude_and_Require_CInclude))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(Provide_CInclude_and_Require_CInclude_Suite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/c/tests/regressions/bug1713807.py
===================================================================
--- confix/trunk/libconfix/plugins/c/tests/regressions/bug1713807.py 2012-06-29 16:44:06 UTC (rev 950)
+++ confix/trunk/libconfix/plugins/c/tests/regressions/bug1713807.py 2012-06-29 19:06:10 UTC (rev 951)
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2008 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -28,13 +28,6 @@
import unittest
-class Bug1713807(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(Bug1713807Test('test'))
- pass
- pass
-
class Bug1713807Test(unittest.TestCase):
""" [ 1713807 ] Full graph computed even for unused installed packages """
def test(self):
@@ -82,7 +75,10 @@
pass
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(Bug1713807Test))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(Bug1713807())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/c/tests/regressions/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/c/tests/regressions/suite_inmem.py 2012-06-29 16:44:06 UTC (rev 950)
+++ confix/trunk/libconfix/plugins/c/tests/regressions/suite_inmem.py 2012-06-29 19:06:10 UTC (rev 951)
@@ -15,17 +15,13 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-from bug1713807 import Bug1713807
+import bug1713807
import unittest
-class RegressionsInMemorySuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(Bug1713807())
- pass
- pass
+suite = unittest.TestSuite()
+suite.addTest(bug1713807.suite)
if __name__ == '__main__':
- unittest.TextTestRunner().run(RegressionsInMemorySuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/c/tests/relate.py
===================================================================
--- confix/trunk/libconfix/plugins/c/tests/relate.py 2012-06-29 16:44:06 UTC (rev 950)
+++ confix/trunk/libconfix/plugins/c/tests/relate.py 2012-06-29 19:06:10 UTC (rev 951)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -16,6 +16,11 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
+""" These tests assert fundamental behavior: relating the
+nodes. Unfortunately, the tests are tied together with the C plugin -
+they should have been written using core objects. (The excuse is that
+C was long considered to be core)."""
+
import unittest
from libconfix.core.filesys.directory import Directory
@@ -32,24 +37,6 @@
from libconfix.testutils import dirhier
from libconfix.testutils import packages
-class RelateSuite(unittest.TestSuite):
-
- """ These tests assert fundamental behavior: relating the
- nodes. Unfortunately, the tests are tied together with the C
- plugin - they should have been written using core objects. (The
- excuse is that C was long considered to be core)."""
-
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(InternalRequires('testNoInstallPath'))
- self.addTest(RelateBasic('testGraph'))
- self.addTest(RelateBasic('testLocalBuildInfo'))
- self.addTest(RelateBasic('testPropagatedLibraryInfo'))
- self.addTest(RelateBasic('testPropagatedIncludeInfo'))
- self.addTest(RelateBasic('testLinkOrder'))
- pass
- pass
-
class InternalRequires(unittest.TestCase):
def testNoInstallPath(self):
fs = dirhier.packageroot()
@@ -340,7 +327,12 @@
pass
pass
+
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(InternalRequires))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(RelateBasic))
if __name__ == '__main__':
- unittest.TextTestRunner().run(RelateSuite())
+ unittest.TextTestRunner().run(suite)
pass
+
Modified: confix/trunk/libconfix/plugins/c/tests/requires.py
===================================================================
--- confix/trunk/libconfix/plugins/c/tests/requires.py 2012-06-29 16:44:06 UTC (rev 950)
+++ confix/trunk/libconfix/plugins/c/tests/requires.py 2012-06-29 19:06:10 UTC (rev 951)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -28,14 +28,7 @@
from libconfix.plugins.c.c import CBuilder
from libconfix.plugins.c.dependency import Require_CInclude
-class RequireTestSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(ScanTest())
- pass
-
class ScanTest(unittest.TestCase):
- def runTest(self): self.test()
def test(self):
fs = FileSystem(path=[])
fs.rootdirectory().add(
@@ -95,7 +88,10 @@
pass
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(ScanTest))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(RequireTestSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/c/tests/setup_cxx.py
===================================================================
--- confix/trunk/libconfix/plugins/c/tests/setup_cxx.py 2012-06-29 16:44:06 UTC (rev 950)
+++ confix/trunk/libconfix/plugins/c/tests/setup_cxx.py 2012-06-29 19:06:10 UTC (rev 951)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2008 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -29,14 +29,6 @@
import unittest
-class CXXSetupSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(BasicCXXSetup('test'))
- self.addTest(HeadersOnlyMakeNoLibrary('test'))
- pass
- pass
-
class BasicCXXSetup(unittest.TestCase):
def test(self):
fs = FileSystem(path=['', 'path', 'to', 'package'])
@@ -145,7 +137,11 @@
pass
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(BasicCXXSetup))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(HeadersOnlyMakeNoLibrary))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(CXXSetupSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/c/tests/setup_exe.py
===================================================================
--- confix/trunk/libconfix/plugins/c/tests/setup_exe.py 2012-06-29 16:44:06 UTC (rev 950)
+++ confix/trunk/libconfix/plugins/c/tests/setup_exe.py 2012-06-29 19:06:10 UTC (rev 951)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -16,8 +16,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-import unittest
-
from libconfix.plugins.c.c import CBuilder
from libconfix.plugins.c.executable import ExecutableBuilder
from libconfix.plugins.c.h import HeaderBuilder
@@ -28,12 +26,7 @@
from libconfix.testutils import dirhier
from libconfix.frontends.confix2.confix_setup import ConfixSetup
-class ExecutableSetupSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(ExecutableSetupTest('test'))
- pass
- pass
+import unittest
class ExecutableSetupTest(unittest.TestCase):
@@ -100,7 +93,10 @@
pass
pass
-
+
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(ExecutableSetupTest))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(ExecutableSetupSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/c/tests/setup_lexyacc.py
===================================================================
--- confix/trunk/libconfix/plugins/c/tests/setup_lexyacc.py 2012-06-29 16:44:06 UTC (rev 950)
+++ confix/trunk/libconfix/plugins/c/tests/setup_lexyacc.py 2012-06-29 19:06:10 UTC (rev 951)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -27,13 +27,6 @@
import unittest
-class LexYaccSetupSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(LexYaccSetupTest('test'))
- pass
- pass
-
class LexYaccSetupTest(unittest.TestCase):
def test(self):
fs = FileSystem(path=['don\'t', 'care'])
@@ -95,7 +88,10 @@
pass
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(LexYaccSetupTest))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(LexYaccSetupSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/c/tests/setup_library.py
===================================================================
--- confix/trunk/libconfix/plugins/c/tests/setup_library.py 2012-06-29 16:44:06 UTC (rev 950)
+++ confix/trunk/libconfix/plugins/c/tests/setup_library.py 2012-06-29 19:06:10 UTC (rev 951)
@@ -1,5 +1,5 @@
# Copyright (C) 2002-2006 Salomon Automation
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -30,15 +30,6 @@
import unittest
-class LibrarySetupSuite(unittest.TestSuite):
- def __init__(self):
- unittest.TestSuite.__init__(self)
- self.addTest(LibrarySetupBasic('test'))
- self.addTest(LibraryNames('testLongName'))
- self.addTest(LibraryNames('testExplicitName'))
- pass
- pass
-
class LibrarySetupBasic(unittest.TestCase):
def test(self):
fs = dirhier.packageroot()
@@ -133,6 +124,10 @@
pass
pass
+suite = unittest.TestSuite()
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(LibrarySetupBasic))
+suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(LibraryNames))
+
if __name__ == '__main__':
- unittest.TextTestRunner().run(LibrarySetupSuite())
+ unittest.TextTestRunner().run(suite)
pass
Modified: confix/trunk/libconfix/plugins/c/tests/suite_inmem.py
===================================================================
--- confix/trunk/libconfix/plugins/c/tests/suite_inmem.py 2012-06-29 16:44:06 UTC (rev 950)
+++ confix/trunk/libconfix/plugins/c/tests/suite_inmem.py 2012-06-29 19:06:10 UTC (rev 951)
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2009 Joerg Faschingbauer
+# Copyright (C) 2006-2012 Joerg Faschingbauer
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
@@ -15,23 +15,23 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-from provide_require import Provide_CInclude_and_Require_CInclude_Suite
-from requires import RequireTestSuite
-from relate import RelateSuite
-from library import LibrarySuite
-from regressions.suite_inmem import RegressionsInMemorySuite
-from header_visibility_inmem import HeaderVisibilityInMemorySuite
-from confix2_dir import Confix2_dir_Suite
-from misc import MiscellaneousSuite
-from setup_cxx import CXXSetupSuite
-from setup_exe import ExecutableSetupSuite
-from setup_lexyacc import LexYaccSetupSuite
-from setup_library import LibrarySetupSuite
+import provide_require
+import requires
+import relate
+import library
+import regressions.suite_inmem
+import header_visibility_inmem
+import confix2_dir
+import misc
+import setup_cxx
+import setup_exe
+import setup_lexyacc
+import setup_library
from clusterer.suite_inmem import ClustererInMemorySuite
-from ignored_entries import IgnoredEntriesInMemorySuite
-from library_versions import LibraryVersionsSuite
-from inter_package_inmem import InterPackageInMemorySuite
-from buildinfo_inmem import BuildInformationInMemorySuite
+import ignored_entries
+import library_versions
+import inter_package_inmem
+import buildinfo_inmem
from libconfix.plugins.c.setups.tests.suite_inmem import SetupsInMemorySuite
from libconfix.plugins.c.relocated_headers.tests.suite_inmem import RelocatedHeadersInMemorySuite
@@ -42,25 +42,25 @@
def __init__(self):
unittest.TestSuite.__init__(self)
- self.addTest(Provide_CInclude_and_Require_CInclude_Suite())
- self.addTest(RequireTestSuite())
- self.addTest(RelateSuite())
- self.addTest(LibrarySuite())
+ self.addTest(provide_require.suite)
+ self.addTest(requires.suite)
+ self.addTest(relate.suite)
+ self.addTest(library.suite)
self.addTest(SetupsInMemorySuite())
self.addTest(RelocatedHeadersInMemorySuite())
- self.addTest(HeaderVisibilityInMemorySuite())
- self.addTest(RegressionsInMemorySuite())
- self.addTest(Confix2_dir_Suite())
- self.addTest(MiscellaneousSuite())
- self.addTest(CXXSetupSuite())
- self.addTest(ExecutableSetupSuite())
- self.addTest(LexYaccSetupSuite())
- self.addTest(LibrarySetupSuite())
+ self.addTest(header_visibility_inmem.suite)
+ self.addTest(regressions.suite_inmem.suite)
+ self.addTest(confix2_dir.suite)
+ self.addTest(misc.suite)
+ self.addTest(setup_cxx.suite)
+ self.addTest(setup_exe.suite)
+ self.addTest(setup_lexyacc.suite)
+ self.addTest(setup_library.suite)
self.addTest(ClustererInMemorySuite())
- self.addTest(IgnoredEntriesInMemorySuite())
- self.addTest(LibraryVersionsSuite())
- self.addTest(InterPackageInMemorySuite())
- self.addTest(BuildInformationInMemorySuite())
+ self.addTest(ignored_entries.suite)
+ self.addTest(library_versions.suite)
+ self.addTest(inter_package_inmem.suite)
+ self.addTest(buildinfo_inmem.suite)
pass
pass
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jf...@us...> - 2012-05-03 14:30:31
|
Revision: 949
http://confix.svn.sourceforge.net/confix/?rev=949&view=rev
Author: jfasch
Date: 2012-05-03 14:30:20 +0000 (Thu, 03 May 2012)
Log Message:
-----------
*** empty log message ***
Modified Paths:
--------------
confix/trunk/00branches.txt
Modified: confix/trunk/00branches.txt
===================================================================
--- confix/trunk/00branches.txt 2012-05-03 14:29:56 UTC (rev 948)
+++ confix/trunk/00branches.txt 2012-05-03 14:30:20 UTC (rev 949)
@@ -100,7 +100,7 @@
| 872 REL-2.3.0
| 889 REL-2.3.1
v 894 REL-2.3.2
- |
+ |
900 REL-2.3.6
|
947 REL-2.3.8
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jf...@us...> - 2012-05-03 14:30:07
|
Revision: 948
http://confix.svn.sourceforge.net/confix/?rev=948&view=rev
Author: jfasch
Date: 2012-05-03 14:29:56 +0000 (Thu, 03 May 2012)
Log Message:
-----------
*** empty log message ***
Modified Paths:
--------------
confix/trunk/00branches.txt
Modified: confix/trunk/00branches.txt
===================================================================
--- confix/trunk/00branches.txt 2012-05-03 14:28:43 UTC (rev 947)
+++ confix/trunk/00branches.txt 2012-05-03 14:29:56 UTC (rev 948)
@@ -103,6 +103,7 @@
|
900 REL-2.3.6
|
+ 947 REL-2.3.8
|
v RB-2.3
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jf...@us...> - 2012-05-03 14:28:53
|
Revision: 947
http://confix.svn.sourceforge.net/confix/?rev=947&view=rev
Author: jfasch
Date: 2012-05-03 14:28:43 +0000 (Thu, 03 May 2012)
Log Message:
-----------
creating tag REL-2.3.8
Added Paths:
-----------
confix/tags/REL-2.3.8/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jf...@us...> - 2012-05-03 14:27:23
|
Revision: 946
http://confix.svn.sourceforge.net/confix/?rev=946&view=rev
Author: jfasch
Date: 2012-05-03 14:27:12 +0000 (Thu, 03 May 2012)
Log Message:
-----------
version 2.3.8
add "foreign" argument to AM_INIT_AUTOMAKE, so it annoys me less
Modified Paths:
--------------
confix/branches/RB-2.3/libconfix/core/utils/const.py
confix/branches/RB-2.3/libconfix/plugins/automake/configure_ac.py
Modified: confix/branches/RB-2.3/libconfix/core/utils/const.py
===================================================================
--- confix/branches/RB-2.3/libconfix/core/utils/const.py 2011-01-14 23:53:17 UTC (rev 945)
+++ confix/branches/RB-2.3/libconfix/core/utils/const.py 2012-05-03 14:27:12 UTC (rev 946)
@@ -17,7 +17,7 @@
# USA
# Confix version
-CONFIX_VERSION = '2.3.7'
+CONFIX_VERSION = '2.3.8'
# version of persistent data, the repo.
REPO_VERSION = '2.3.0'
Modified: confix/branches/RB-2.3/libconfix/plugins/automake/configure_ac.py
===================================================================
--- confix/branches/RB-2.3/libconfix/plugins/automake/configure_ac.py 2011-01-14 23:53:17 UTC (rev 945)
+++ confix/branches/RB-2.3/libconfix/plugins/automake/configure_ac.py 2012-05-03 14:27:12 UTC (rev 946)
@@ -147,7 +147,9 @@
lines.append('AC_CANONICAL_TARGET')
- lines.append('AM_INIT_AUTOMAKE')
+ # use "foreign" so automake (and autoreconf) does not complain
+ # about missing files README, AUTHORS and whatnot.
+ lines.append('AM_INIT_AUTOMAKE([foreign])')
if len(self.ac_config_headers_):
lines.append('AC_CONFIG_HEADERS('+' '.join(self.ac_config_headers_.keys())+')')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jf...@us...> - 2011-01-14 23:53:23
|
Revision: 945
http://confix.svn.sourceforge.net/confix/?rev=945&view=rev
Author: jfasch
Date: 2011-01-14 23:53:17 +0000 (Fri, 14 Jan 2011)
Log Message:
-----------
stowing away unix-tools
Added Paths:
-----------
unix-tools.remove-it-soon/
Removed Paths:
-------------
unix-tools/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jf...@us...> - 2011-01-14 23:17:31
|
Revision: 944
http://confix.svn.sourceforge.net/confix/?rev=944&view=rev
Author: jfasch
Date: 2011-01-14 23:17:25 +0000 (Fri, 14 Jan 2011)
Log Message:
-----------
stowing away unittest subproject
Added Paths:
-----------
unittest.remove-it-soon/
Removed Paths:
-------------
unittest/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jf...@us...> - 2011-01-14 21:52:59
|
Revision: 943
http://confix.svn.sourceforge.net/confix/?rev=943&view=rev
Author: jfasch
Date: 2011-01-14 21:52:50 +0000 (Fri, 14 Jan 2011)
Log Message:
-----------
remove cleanliness-check
Modified Paths:
--------------
unittest/trunk/basics/test_case.cc
unittest/trunk/basics/test_suite.cc
unittest/trunk/basics/tests/Confix2.dir
unittest/trunk/basics/tests/assert_suite.cc
unittest/trunk/basics/tests/enter_leave.cc
unittest/trunk/basics/tests/setup_teardown.cc
unittest/trunk/basics/tests/stage2_suite.cc
unittest/trunk/include/jf/unittest/Confix2.dir
unittest/trunk/include/jf/unittest/simple_test_result.h
unittest/trunk/include/jf/unittest/test.h
unittest/trunk/include/jf/unittest/test_case.h
unittest/trunk/include/jf/unittest/test_result.h
unittest/trunk/include/jf/unittest/test_suite.h
unittest/trunk/include/jf/unittest/tree_test_result.h
unittest/trunk/include/jf/unittest/tree_test_runner.h
unittest/trunk/tests/stage1.cc
unittest/trunk/tests/stage2.cc
unittest/trunk/treerunner/tree_test_result.cc
unittest/trunk/treerunner/tree_test_runner.cc
Removed Paths:
-------------
unittest/trunk/basics/tests/cleanliness_check.cc
unittest/trunk/basics/tests/cleanliness_check.h
unittest/trunk/include/jf/unittest/cleanliness.h
unittest/trunk/include/jf/unittest/cleanliness_fwd.h
Property Changed:
----------------
unittest/trunk/
Property changes on: unittest/trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /unittest/branches/try-jfasch-cmake:722-824
+ /unittest/branches/fork-run:941-942
/unittest/branches/try-jfasch-cmake:722-824
Modified: unittest/trunk/basics/test_case.cc
===================================================================
--- unittest/trunk/basics/test_case.cc 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/basics/test_case.cc 2011-01-14 21:52:50 UTC (rev 943)
@@ -21,7 +21,6 @@
#include <jf/unittest/test_result.h>
#include <jf/unittest/failure.h>
-#include <jf/unittest/cleanliness.h>
#include <cassert>
#include <cstdio>
@@ -58,7 +57,7 @@
namespace jf {
namespace unittest {
-void TestCase::run_internal(TestResult* result, const CleanlinessCheck* cleanliness_check)
+void TestCase::run_internal(TestResult* result)
{
result_ = result;
result->enter_test(this);
@@ -119,9 +118,6 @@
result->leave_test(this);
- if (cleanliness_check && !cleanliness_check->environment_is_clean())
- result->unclean_alarm(this);
-
result_ = 0;
}
Modified: unittest/trunk/basics/test_suite.cc
===================================================================
--- unittest/trunk/basics/test_suite.cc 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/basics/test_suite.cc 2011-01-14 21:52:50 UTC (rev 943)
@@ -20,7 +20,6 @@
#include <jf/unittest/test_suite.h>
#include <jf/unittest/test_result.h>
-#include <jf/unittest/cleanliness.h>
#include <cassert>
@@ -39,16 +38,13 @@
tests_.push_back(t);
}
-void TestSuite::run_internal(TestResult* result, const CleanlinessCheck* cleanliness_check)
+void TestSuite::run_internal(TestResult* result)
{
// note that the test's run_internal() method catches all errors,
// so it is safe to not wrap the call into try/catch.
result->enter_suite(this);
- for (Tests::const_iterator i = tests_.begin(); i != tests_.end(); ++i) {
- (*i)->run_internal(result, cleanliness_check);
- if (cleanliness_check && !cleanliness_check->environment_is_clean())
- break;
- }
+ for (Tests::const_iterator i = tests_.begin(); i != tests_.end(); ++i)
+ (*i)->run_internal(result);
result->leave_suite(this);
}
Modified: unittest/trunk/basics/tests/Confix2.dir
===================================================================
--- unittest/trunk/basics/tests/Confix2.dir 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/basics/tests/Confix2.dir 2011-01-14 21:52:50 UTC (rev 943)
@@ -21,7 +21,6 @@
'assert_suite.h',
'setup_teardown.h',
'enter_leave.h',
- 'cleanliness_check.h',
]
cc = [
@@ -29,7 +28,6 @@
'stage2_suite.cc',
'setup_teardown.cc',
'enter_leave.cc',
- 'cleanliness_check.cc',
]
LIBRARY(members=[H(filename=f, install=['jf', 'unittest', 'tests']) for f in h] + [CXX(filename=f) for f in cc])
Modified: unittest/trunk/basics/tests/assert_suite.cc
===================================================================
--- unittest/trunk/basics/tests/assert_suite.cc 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/basics/tests/assert_suite.cc 2011-01-14 21:52:50 UTC (rev 943)
@@ -82,19 +82,19 @@
{
ThrowTest t;
SimpleTestResult result;
- t.run_internal(&result, NULL);
+ t.run_internal(&result);
JFUNIT_ASSERT(result.ok());
}
{
NoThrowTest t;
SimpleTestResult result;
- t.run_internal(&result, NULL);
+ t.run_internal(&result);
JFUNIT_ASSERT(result.num_failure() == 1);
}
{
WrongThrowTest t;
SimpleTestResult result;
- t.run_internal(&result, NULL);
+ t.run_internal(&result);
JFUNIT_ASSERT(result.num_failure() == 1);
}
}
Deleted: unittest/trunk/basics/tests/cleanliness_check.cc
===================================================================
--- unittest/trunk/basics/tests/cleanliness_check.cc 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/basics/tests/cleanliness_check.cc 2011-01-14 21:52:50 UTC (rev 943)
@@ -1,163 +0,0 @@
-// -*- C++ -*-
-
-// Copyright (C) 2008 Joerg Faschingbauer
-
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License
-// as published by the Free Software Foundation; either version 2.1 of
-// the License, or (at your option) any later version.
-
-// This library 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
-// Lesser General Public License for more details.
-
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-// USA
-
-#include"cleanliness_check.h"
-
-#include <jf/unittest/cleanliness.h>
-#include <jf/unittest/test_case.h>
-#include <jf/unittest/simple_test_result.h>
-
-namespace {
-
-static bool env_is_clean = true;
-
-class MyCleanTest : public jf::unittest::TestCase
-{
-public:
- MyCleanTest() : jf::unittest::TestCase("") {}
- virtual void run() {}
-};
-
-class MyUncleanTest : public jf::unittest::TestCase
-{
-public:
- MyUncleanTest() : jf::unittest::TestCase("") {}
- virtual void run() { env_is_clean = false; }
-};
-
-class MyCleanlinessCheck : public jf::unittest::CleanlinessCheck
-{
-public:
- virtual bool environment_is_clean() const { return env_is_clean; }
-};
-
-}
-
-namespace jf {
-namespace unittest {
-namespace tests {
-
-class CleanlinessTest : public jf::unittest::TestCase
-{
-public:
- CleanlinessTest() : jf::unittest::TestCase("jf::unittest::tests::CleanlinessTest") {}
- virtual void run()
- {
- env_is_clean = true;
-
- MyCleanTest clean_test;
- MyCleanlinessCheck cleanliness_check;
- SimpleTestResult result;
- clean_test.run_internal(&result, &cleanliness_check);
- JFUNIT_ASSERT(result.ok());
- }
-};
-
-class UncleanlinessTest : public jf::unittest::TestCase
-{
-public:
- UncleanlinessTest() : jf::unittest::TestCase("jf::unittest::tests::UncleanlinessTest") {}
- virtual void run()
- {
- env_is_clean = true;
-
- MyUncleanTest clean_test;
- MyCleanlinessCheck cleanliness_check;
- SimpleTestResult result;
- clean_test.run_internal(&result, &cleanliness_check);
- JFUNIT_ASSERT(!result.ok());
- JFUNIT_ASSERT(result.unclean());
- }
-};
-
-class MixedCleanlinessTest : public jf::unittest::TestCase
-{
-public:
- MixedCleanlinessTest() : jf::unittest::TestCase("jf::unittest::tests::MixedCleanlinessTest") {}
- virtual void run()
- {
- env_is_clean = true;
-
- jf::unittest::TestSuite suite("don't care about the name");
-
- suite.add_test(new MyCleanTest);
- suite.add_test(new MyUncleanTest);
- suite.add_test(new MyCleanTest);
-
- MyCleanlinessCheck cleanliness_check;
- SimpleTestResult result;
-
- suite.run_internal(&result, &cleanliness_check);
-
- // of the three tests, the first (clean) and the second
- // (unclean) tests were run. the rest of the suite was
- // abandoned.
- JFUNIT_ASSERT(result.num_tests_run() == 2);
- JFUNIT_ASSERT(result.ok() == false);
- JFUNIT_ASSERT(result.unclean() == true);
- }
-};
-
-class RecursiveMixedCleanlinessTest : public jf::unittest::TestCase
-{
-public:
- RecursiveMixedCleanlinessTest() : jf::unittest::TestCase("jf::unittest::tests::RecursiveMixedCleanlinessTest") {}
- virtual void run()
- {
- env_is_clean = true;
-
- jf::unittest::TestSuite top_suite("don't care about the name");
-
- top_suite.add_test(new MyCleanTest);
-
- jf::unittest::TestSuite* unclean_suite = new TestSuite("don't care about that name as well");
- unclean_suite->add_test(new MyCleanTest);
- unclean_suite->add_test(new MyUncleanTest);
- unclean_suite->add_test(new MyCleanTest);
-
- top_suite.add_test(unclean_suite);
- top_suite.add_test(new MyCleanTest);
-
-
- MyCleanlinessCheck cleanliness_check;
- SimpleTestResult result;
-
- top_suite.run_internal(&result, &cleanliness_check);
-
- // first (clean) test in top_suite, first (clean) in
- // unclean_suite, second (unclean) in unclean_suite.
- JFUNIT_ASSERT(result.num_tests_run() == 3);
- JFUNIT_ASSERT(result.ok() == false);
- JFUNIT_ASSERT(result.unclean() == true);
- }
-};
-
-
-CleanlinessCheckSuite::CleanlinessCheckSuite()
-: jf::unittest::TestSuite("jf::unittest::tests::CleanlinessCheckSuite")
-{
- add_test(new CleanlinessTest);
- add_test(new UncleanlinessTest);
- add_test(new MixedCleanlinessTest);
- add_test(new RecursiveMixedCleanlinessTest);
-}
-
-}
-}
-}
Deleted: unittest/trunk/basics/tests/cleanliness_check.h
===================================================================
--- unittest/trunk/basics/tests/cleanliness_check.h 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/basics/tests/cleanliness_check.h 2011-01-14 21:52:50 UTC (rev 943)
@@ -1,39 +0,0 @@
-// -*- C++ -*-
-
-// Copyright (C) 2008 Joerg Faschingbauer
-
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License
-// as published by the Free Software Foundation; either version 2.1 of
-// the License, or (at your option) any later version.
-
-// This library 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
-// Lesser General Public License for more details.
-
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-// USA
-
-#ifndef HAVE_JF_UNITTEST_TESTS_CLEANLINESS_CHECK_H
-#define HAVE_JF_UNITTEST_TESTS_CLEANLINESS_CHECK_H
-
-#include <jf/unittest/test_suite.h>
-
-namespace jf {
-namespace unittest {
-namespace tests {
-
-class CleanlinessCheckSuite : public jf::unittest::TestSuite
-{
-public:
- CleanlinessCheckSuite();
-};
-
-}
-}
-}
-
-#endif
Modified: unittest/trunk/basics/tests/enter_leave.cc
===================================================================
--- unittest/trunk/basics/tests/enter_leave.cc 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/basics/tests/enter_leave.cc 2011-01-14 21:52:50 UTC (rev 943)
@@ -200,7 +200,7 @@
{
MyTestResult result(this);
MyTestCase test(this);
- test.run_internal(&result, NULL);
+ test.run_internal(&result);
JFUNIT_ASSERT(result.num_tests_entered() == 1);
JFUNIT_ASSERT(result.num_tests_left() == 1);
}
@@ -215,7 +215,7 @@
MyTestResult result(this);
jf::unittest::TestSuite suite(/*name=*/"");
suite.add_test(new MyTestCase(this));
- suite.run_internal(&result, NULL);
+ suite.run_internal(&result);
JFUNIT_ASSERT(result.num_suites_entered() == 1);
JFUNIT_ASSERT(result.num_suites_left() == 1);
JFUNIT_ASSERT(result.num_tests_entered() == 1);
Modified: unittest/trunk/basics/tests/setup_teardown.cc
===================================================================
--- unittest/trunk/basics/tests/setup_teardown.cc 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/basics/tests/setup_teardown.cc 2011-01-14 21:52:50 UTC (rev 943)
@@ -60,7 +60,7 @@
{
SuccessTest test;
jf::unittest::SimpleTestResult result;
- test.run_internal(&result, NULL);
+ test.run_internal(&result);
JFUNIT_ASSERT(test.setup_called());
JFUNIT_ASSERT(test.run_called());
JFUNIT_ASSERT(test.teardown_called());
@@ -80,7 +80,7 @@
{
SetupFailureTest test;
jf::unittest::SimpleTestResult result;
- test.run_internal(&result, NULL);
+ test.run_internal(&result);
JFUNIT_ASSERT(test.setup_called());
JFUNIT_ASSERT(!test.run_called());
JFUNIT_ASSERT(!test.teardown_called());
@@ -108,7 +108,7 @@
{
SetupErrorTest test;
jf::unittest::SimpleTestResult result;
- test.run_internal(&result, NULL);
+ test.run_internal(&result);
JFUNIT_ASSERT(test.setup_called());
JFUNIT_ASSERT(!test.run_called());
JFUNIT_ASSERT(!test.teardown_called());
@@ -136,7 +136,7 @@
{
RunFailureTest test;
jf::unittest::SimpleTestResult result;
- test.run_internal(&result, NULL);
+ test.run_internal(&result);
JFUNIT_ASSERT(test.setup_called());
JFUNIT_ASSERT(test.run_called());
JFUNIT_ASSERT(test.teardown_called());
@@ -164,7 +164,7 @@
{
RunErrorTest test;
jf::unittest::SimpleTestResult result;
- test.run_internal(&result, NULL);
+ test.run_internal(&result);
JFUNIT_ASSERT(test.setup_called());
JFUNIT_ASSERT(test.run_called());
JFUNIT_ASSERT(test.teardown_called());
@@ -192,7 +192,7 @@
{
TeardownFailureTest test;
jf::unittest::SimpleTestResult result;
- test.run_internal(&result, NULL);
+ test.run_internal(&result);
JFUNIT_ASSERT(test.setup_called());
JFUNIT_ASSERT(test.run_called());
JFUNIT_ASSERT(test.teardown_called());
@@ -220,7 +220,7 @@
{
TeardownErrorTest test;
jf::unittest::SimpleTestResult result;
- test.run_internal(&result, NULL);
+ test.run_internal(&result);
JFUNIT_ASSERT(test.setup_called());
JFUNIT_ASSERT(test.run_called());
JFUNIT_ASSERT(test.teardown_called());
Modified: unittest/trunk/basics/tests/stage2_suite.cc
===================================================================
--- unittest/trunk/basics/tests/stage2_suite.cc 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/basics/tests/stage2_suite.cc 2011-01-14 21:52:50 UTC (rev 943)
@@ -21,7 +21,6 @@
#include "setup_teardown.h"
#include "enter_leave.h"
-#include "cleanliness_check.h"
#include "assert_suite.h"
namespace jf {
@@ -33,7 +32,6 @@
{
add_test(new SetupTeardownSuite);
add_test(new EnterLeaveSuite);
- add_test(new CleanlinessCheckSuite);
add_test(new AssertSuite);
}
Modified: unittest/trunk/include/jf/unittest/Confix2.dir
===================================================================
--- unittest/trunk/include/jf/unittest/Confix2.dir 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/include/jf/unittest/Confix2.dir 2011-01-14 21:52:50 UTC (rev 943)
@@ -29,8 +29,6 @@
for h in [
'api.h',
- 'cleanliness.h',
- 'cleanliness_fwd.h',
'failure.h',
'simple_test_result.h',
'test.h',
Deleted: unittest/trunk/include/jf/unittest/cleanliness.h
===================================================================
--- unittest/trunk/include/jf/unittest/cleanliness.h 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/include/jf/unittest/cleanliness.h 2011-01-14 21:52:50 UTC (rev 943)
@@ -1,37 +0,0 @@
-// -*- C++ -*-
-
-// Copyright (C) 2008 Joerg Faschingbauer
-
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License
-// as published by the Free Software Foundation; either version 2.1 of
-// the License, or (at your option) any later version.
-
-// This library 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
-// Lesser General Public License for more details.
-
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-// USA
-
-#ifndef HAVE_JF_UNITTEST_CLEANLINESS_H
-#define HAVE_JF_UNITTEST_CLEANLINESS_H
-
-#include <jf/unittest/api.h>
-
-namespace jf {
-namespace unittest {
-
-class JF_UNITTEST_API CleanlinessCheck {
-public:
- virtual ~CleanlinessCheck() {}
- virtual bool environment_is_clean() const = 0;
-};
-
-}
-}
-
-#endif
Deleted: unittest/trunk/include/jf/unittest/cleanliness_fwd.h
===================================================================
--- unittest/trunk/include/jf/unittest/cleanliness_fwd.h 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/include/jf/unittest/cleanliness_fwd.h 2011-01-14 21:52:50 UTC (rev 943)
@@ -1,31 +0,0 @@
-// -*- C++ -*-
-
-// Copyright (C) 2008 Joerg Faschingbauer
-
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public License
-// as published by the Free Software Foundation; either version 2.1 of
-// the License, or (at your option) any later version.
-
-// This library 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
-// Lesser General Public License for more details.
-
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-// USA
-
-#ifndef HAVE_JF_UNITTEST_CLEANLINESS_FWD_H
-#define HAVE_JF_UNITTEST_CLEANLINESS_FWD_H
-
-namespace jf {
-namespace unittest {
-
-class CleanlinessCheck;
-
-}
-}
-
-#endif
Modified: unittest/trunk/include/jf/unittest/simple_test_result.h
===================================================================
--- unittest/trunk/include/jf/unittest/simple_test_result.h 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/include/jf/unittest/simple_test_result.h 2011-01-14 21:52:50 UTC (rev 943)
@@ -36,11 +36,9 @@
num_success_(0),
num_failure_(0),
num_error_(0),
- num_assertion_(0),
- unclean_test_(NULL) {}
+ num_assertion_(0) {}
- bool ok() const { return num_failure_ + num_error_ == 0 && !unclean_test_; }
- bool unclean() const { return unclean_test_ != NULL; }
+ bool ok() const { return num_failure_ + num_error_ == 0; }
int num_tests_run() const { return num_tests_run_; }
int num_success() const { return num_success_; }
int num_failure() const { return num_failure_; }
@@ -54,7 +52,6 @@
virtual void add_failure(const TestCase*, const Failure&);
virtual void add_error(const TestCase*, const std::string&);
virtual void add_assertion(const TestCase*);
- virtual void unclean_alarm(const TestCase* t) { unclean_test_ = t; }
private:
std::ostream* ostream_;
@@ -63,7 +60,6 @@
int num_failure_;
int num_error_;
int num_assertion_;
- const TestCase* unclean_test_;
};
}
Modified: unittest/trunk/include/jf/unittest/test.h
===================================================================
--- unittest/trunk/include/jf/unittest/test.h 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/include/jf/unittest/test.h 2011-01-14 21:52:50 UTC (rev 943)
@@ -21,7 +21,6 @@
#define HAVE_JF_UNITTEST_TEST_H
#include "test_result_fwd.h"
-#include "cleanliness_fwd.h"
#include "api.h"
#include <string>
@@ -37,7 +36,7 @@
const std::string& name() const { return name_; }
- virtual void run_internal(TestResult*, const CleanlinessCheck*) = 0;
+ virtual void run_internal(TestResult*) = 0;
private:
std::string name_;
Modified: unittest/trunk/include/jf/unittest/test_case.h
===================================================================
--- unittest/trunk/include/jf/unittest/test_case.h 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/include/jf/unittest/test_case.h 2011-01-14 21:52:50 UTC (rev 943)
@@ -36,7 +36,7 @@
virtual void teardown() {}
public:
- virtual void run_internal(TestResult*, const CleanlinessCheck*);
+ virtual void run_internal(TestResult*);
# define JFUNIT_OBJECT_ASSERT(testcase, condition) \
do { \
Modified: unittest/trunk/include/jf/unittest/test_result.h
===================================================================
--- unittest/trunk/include/jf/unittest/test_result.h 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/include/jf/unittest/test_result.h 2011-01-14 21:52:50 UTC (rev 943)
@@ -40,7 +40,6 @@
virtual void add_failure(const TestCase*, const Failure&) = 0;
virtual void add_error(const TestCase*, const std::string& message) = 0;
virtual void add_assertion(const TestCase*) = 0;
- virtual void unclean_alarm(const TestCase*) = 0;
};
}
Modified: unittest/trunk/include/jf/unittest/test_suite.h
===================================================================
--- unittest/trunk/include/jf/unittest/test_suite.h 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/include/jf/unittest/test_suite.h 2011-01-14 21:52:50 UTC (rev 943)
@@ -40,7 +40,7 @@
const Tests& tests() const { return tests_; }
public:
- virtual void run_internal(TestResult*, const CleanlinessCheck*);
+ virtual void run_internal(TestResult*);
private:
Tests tests_;
Modified: unittest/trunk/include/jf/unittest/tree_test_result.h
===================================================================
--- unittest/trunk/include/jf/unittest/tree_test_result.h 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/include/jf/unittest/tree_test_result.h 2011-01-14 21:52:50 UTC (rev 943)
@@ -41,7 +41,6 @@
virtual void add_failure(const TestCase*, const Failure&);
virtual void add_error(const TestCase*, const std::string& message);
virtual void add_assertion(const TestCase*);
- virtual void unclean_alarm(const TestCase*);
void print_summary() const;
bool ok() const { return num_success_ == num_tests_run_; }
@@ -92,9 +91,6 @@
int num_error_;
int num_assertion_;
- // the one who made the environmental-cleanliness-check fail.
- const TestCase* unclean_test_;
-
TreeTestResult(const TreeTestResult&);
TreeTestResult& operator=(const TreeTestResult&);
};
Modified: unittest/trunk/include/jf/unittest/tree_test_runner.h
===================================================================
--- unittest/trunk/include/jf/unittest/tree_test_runner.h 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/include/jf/unittest/tree_test_runner.h 2011-01-14 21:52:50 UTC (rev 943)
@@ -22,7 +22,6 @@
#include <jf/unittest/api.h>
#include <jf/unittest/test_fwd.h>
-#include <jf/unittest/cleanliness_fwd.h>
namespace jf {
namespace unittest {
@@ -30,7 +29,7 @@
class JF_UNITTEST_API TreeTestRunner
{
public:
- bool run(Test*, CleanlinessCheck* = 0);
+ bool run(Test*);
};
}
Modified: unittest/trunk/tests/stage1.cc
===================================================================
--- unittest/trunk/tests/stage1.cc 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/tests/stage1.cc 2011-01-14 21:52:50 UTC (rev 943)
@@ -90,7 +90,7 @@
{
TestTestSuite s;
BootstrapTestResult r;
- s.run_internal(&r, NULL);
+ s.run_internal(&r);
JFUNIT_ASSERT(r.num_success() == 2);
JFUNIT_ASSERT(r.num_failure() == 2);
JFUNIT_ASSERT(r.num_error() == 3);
@@ -126,7 +126,7 @@
{
OkTest t;
BootstrapTestResult r;
- t.run_internal(&r, NULL);
+ t.run_internal(&r);
BOOTSTRAP_ASSERT(r.num_success() == 1);
BOOTSTRAP_ASSERT(r.num_failure() == 0);
BOOTSTRAP_ASSERT(r.num_error() == 0);
@@ -134,7 +134,7 @@
{
FailureTest t;
BootstrapTestResult r;
- t.run_internal(&r, NULL);
+ t.run_internal(&r);
BOOTSTRAP_ASSERT(r.num_success() == 0);
BOOTSTRAP_ASSERT(r.num_failure() == 1);
BOOTSTRAP_ASSERT(r.num_error() == 0);
@@ -142,7 +142,7 @@
{
ErrorTest t;
BootstrapTestResult r;
- t.run_internal(&r, NULL);
+ t.run_internal(&r);
BOOTSTRAP_ASSERT(r.num_success() == 0);
BOOTSTRAP_ASSERT(r.num_failure() == 0);
BOOTSTRAP_ASSERT(r.num_error() == 1);
@@ -150,7 +150,7 @@
{
SuiteTest t;
BootstrapTestResult r;
- t.run_internal(&r, NULL);
+ t.run_internal(&r);
BOOTSTRAP_ASSERT(r.num_success() == 1);
}
Modified: unittest/trunk/tests/stage2.cc
===================================================================
--- unittest/trunk/tests/stage2.cc 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/tests/stage2.cc 2011-01-14 21:52:50 UTC (rev 943)
@@ -25,7 +25,7 @@
jf::unittest::tests::Stage2Suite suite;
jf::unittest::SimpleTestResult result(&std::cerr);
- suite.run_internal(&result, NULL);
+ suite.run_internal(&result);
return result.ok()? 0: 1;
}
Modified: unittest/trunk/treerunner/tree_test_result.cc
===================================================================
--- unittest/trunk/treerunner/tree_test_result.cc 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/treerunner/tree_test_result.cc 2011-01-14 21:52:50 UTC (rev 943)
@@ -75,8 +75,7 @@
num_success_(0),
num_failure_(0),
num_error_(0),
- num_assertion_(0),
- unclean_test_(NULL) {}
+ num_assertion_(0) {}
void TreeTestResult::enter_suite(const TestSuite* s)
{
@@ -133,21 +132,9 @@
p_cur_error = &cur_error;
}
-void TreeTestResult::unclean_alarm(const TestCase* t)
-{
- unclean_test_ = t;
-}
-
-
void TreeTestResult::print_summary() const
{
ostream_ << "------------------------\n";
-
- if (unclean_test_) {
- ostream_ << "ALARM: environment has not been cleared\n";
- ostream_ << " " << unclean_test_->name() << '\n';
- ostream_ << "------------------------\n";
- }
ostream_ << "#Success: " << num_success_ << '\n';
ostream_ << "#Failures: " << num_failure_ << '\n';
Modified: unittest/trunk/treerunner/tree_test_runner.cc
===================================================================
--- unittest/trunk/treerunner/tree_test_runner.cc 2011-01-07 11:13:28 UTC (rev 942)
+++ unittest/trunk/treerunner/tree_test_runner.cc 2011-01-14 21:52:50 UTC (rev 943)
@@ -28,10 +28,10 @@
namespace jf {
namespace unittest {
-bool TreeTestRunner::run(Test* test, CleanlinessCheck* cleanliness_check)
+bool TreeTestRunner::run(Test* test)
{
TreeTestResult result(std::cerr);
- test->run_internal(&result, cleanliness_check);
+ test->run_internal(&result);
result.print_summary();
return result.ok();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jf...@us...> - 2011-01-07 11:13:35
|
Revision: 942
http://confix.svn.sourceforge.net/confix/?rev=942&view=rev
Author: jfasch
Date: 2011-01-07 11:13:28 +0000 (Fri, 07 Jan 2011)
Log Message:
-----------
Modified Paths:
--------------
unix-tools/trunk/demo/dynamic_prio.cc
unix-tools/trunk/pthread/joinable_thread.h
unix-tools/trunk/pthread/mutex.h
unix-tools/trunk/pthread/tests/tsd_suite.cc
Modified: unix-tools/trunk/demo/dynamic_prio.cc
===================================================================
--- unix-tools/trunk/demo/dynamic_prio.cc 2010-12-20 22:12:23 UTC (rev 941)
+++ unix-tools/trunk/demo/dynamic_prio.cc 2011-01-07 11:13:28 UTC (rev 942)
@@ -8,7 +8,7 @@
namespace {
-class Sleeper : public JoinableThreadStarter::Worker
+class SleeperWorker : public JoinableThreadStarter::Worker
{
public:
virtual void run()
@@ -17,7 +17,7 @@
}
};
-class Spinner : public JoinableThreadStarter::Worker
+class SpinnerWorker : public JoinableThreadStarter::Worker
{
public:
virtual void run()
@@ -30,8 +30,8 @@
int main()
{
- JoinableThreadStarter sleeper(JoinableThreadStarter::Args().worker(new Sleeper));
- JoinableThreadStarter spinner(JoinableThreadStarter::Args().worker(new Spinner));
+ JoinableThreadStarter sleeper(JoinableThreadStarter::Args().worker(new SleeperWorker));
+ JoinableThreadStarter spinner(JoinableThreadStarter::Args().worker(new SpinnerWorker));
sleeper.start();
spinner.start();
return 0;
Modified: unix-tools/trunk/pthread/joinable_thread.h
===================================================================
--- unix-tools/trunk/pthread/joinable_thread.h 2010-12-20 22:12:23 UTC (rev 941)
+++ unix-tools/trunk/pthread/joinable_thread.h 2011-01-07 11:13:28 UTC (rev 942)
@@ -85,8 +85,7 @@
};
public:
- /** Take ownership of the worker (delete it in the dtor). Do
- nothing else but wait until you are started. */
+ /** Constructor, passing in a worker object. */
JoinableThreadStarter(Worker*);
/** Enhanced version of the constructor, accepting "named"
parameters. */
Modified: unix-tools/trunk/pthread/mutex.h
===================================================================
--- unix-tools/trunk/pthread/mutex.h 2010-12-20 22:12:23 UTC (rev 941)
+++ unix-tools/trunk/pthread/mutex.h 2011-01-07 11:13:28 UTC (rev 942)
@@ -43,7 +43,6 @@
void lock();
void unlock();
- bool try_lock();
private:
pthread_mutex_t mutex_;
Modified: unix-tools/trunk/pthread/tests/tsd_suite.cc
===================================================================
--- unix-tools/trunk/pthread/tests/tsd_suite.cc 2010-12-20 22:12:23 UTC (rev 941)
+++ unix-tools/trunk/pthread/tests/tsd_suite.cc 2011-01-07 11:13:28 UTC (rev 942)
@@ -91,7 +91,8 @@
SeparateValuesWorker::the_semi_global_thing.set(new int(1));
jf::linuxtools::Future<bool> result;
- jf::linuxtools::JoinableThreadStarter starter(new SeparateValuesWorker(&result));
+ SeparateValuesWorker worker(&result);
+ jf::linuxtools::JoinableThreadStarter starter(&worker);
starter.start();
// our slave thread hasn't seen anything particularly bad.
@@ -113,8 +114,9 @@
virtual void run()
{
DestructorWorker::the_semi_global_thing.set(new int(1));
-
- jf::linuxtools::JoinableThreadStarter starter(new DestructorWorker);
+
+ DestructorWorker worker;
+ jf::linuxtools::JoinableThreadStarter starter(&worker);
starter.start();
// synchronize with the dtor call. NOTE thaht we cannot simply
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|