[pygccxml-commit] SF.net SVN: pygccxml:[1545] pygccxml_dev/unittests
Brought to you by:
mbaas,
roman_yakovenko
From: <rom...@us...> - 2009-01-07 11:01:02
|
Revision: 1545 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1545&view=rev Author: roman_yakovenko Date: 2009-01-07 11:00:58 +0000 (Wed, 07 Jan 2009) Log Message: ----------- making tester to be cross platform Modified Paths: -------------- pygccxml_dev/unittests/autoconfig.py pygccxml_dev/unittests/undname_creator_tester.py Property Changed: ---------------- pygccxml_dev/unittests/data/binary_parsers/ Modified: pygccxml_dev/unittests/autoconfig.py =================================================================== --- pygccxml_dev/unittests/autoconfig.py 2009-01-07 09:57:28 UTC (rev 1544) +++ pygccxml_dev/unittests/autoconfig.py 2009-01-07 11:00:58 UTC (rev 1545) @@ -28,6 +28,7 @@ print 'unittests will run on DEVELOPMENT version' compiler = pygccxml.utils.native_compiler.get_gccxml_compiler() +compiler = "msvc71" print 'GCCXML configured to simulate compiler ', compiler pygccxml.declarations.class_t.USE_DEMANGLED_AS_NAME = True Property changes on: pygccxml_dev/unittests/data/binary_parsers ___________________________________________________________________ Modified: svn:ignore - Release Debug *.suo + Release Debug *.suo binaries Modified: pygccxml_dev/unittests/undname_creator_tester.py =================================================================== --- pygccxml_dev/unittests/undname_creator_tester.py 2009-01-07 09:57:28 UTC (rev 1544) +++ pygccxml_dev/unittests/undname_creator_tester.py 2009-01-07 11:00:58 UTC (rev 1545) @@ -9,7 +9,7 @@ import autoconfig import parser_test_case -import pprint +import subprocess from pygccxml import binary_parsers from pygccxml import utils from pygccxml import parser @@ -33,17 +33,34 @@ def __init__(self, *args ): parser_test_case.parser_test_case_t.__init__( self, *args ) - self.header = r'msvc\mydll.h' + self.binary_parsers_dir = os.path.join( autoconfig.data_directory, 'binary_parsers' ) + self.header = os.path.join( self.binary_parsers_dir, r'mydll.h' ) + self.map_file = os.path.join( self.binary_parsers_dir, 'binaries', 'mydll.map' ) + self.dll_file = os.path.join( self.binary_parsers_dir, 'binaries', 'mydll.dll' ) - self.map_file = os.path.join( autoconfig.data_directory, 'msvc', 'release', 'mydll.map' ) - self.dll_file = os.path.join( autoconfig.data_directory, 'msvc', 'release', 'mydll.dll' ) - def setUp(self): if not tester_t.global_ns: decls = parser.parse( [self.header], self.config ) tester_t.global_ns = declarations.get_global_namespace( decls ) tester_t.global_ns.init_optimizer() + + process = subprocess.Popen( args='scons msvc_compiler=%s' % autoconfig.compiler + , shell=True + , stdin=subprocess.PIPE + , stdout=subprocess.PIPE + , stderr=subprocess.STDOUT + , cwd=self.binary_parsers_dir ) + process.stdin.close() + + while process.poll() is None: + line = process.stdout.readline() + print line.rstrip() + for line in process.stdout.readlines(): + print line.rstrip() + if process.returncode: + raise RuntimeError( "unable to compile binary parser module. See output for the errors." ) + def is_included( self, decl ): if not isinstance( decl, ( declarations.calldef_t, declarations.variable_t) ): return False This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |