tests/AMBuild.tests
changeset 11 cfe800908837
child 12 cebfc7eeafa5
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tests/AMBuild.tests	Mon Aug 26 23:18:03 2013 -0700
     1.3 @@ -0,0 +1,42 @@
     1.4 +# vim: set ts=2 sw=2 tw=99 noet ft=python: 
     1.5 +# 
     1.6 +# Copyright (C) 2004-2012 David Anderson
     1.7 +# 
     1.8 +# This file is part of SourcePawn.
     1.9 +# 
    1.10 +# SourcePawn is free software: you can redistribute it and/or modify it under
    1.11 +# the terms of the GNU General Public License as published by the Free
    1.12 +# Software Foundation, either version 3 of the License, or (at your option)
    1.13 +# any later version.
    1.14 +# 
    1.15 +# SourcePawn is distributed in the hope that it will be useful, but WITHOUT ANY
    1.16 +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    1.17 +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
    1.18 +# 
    1.19 +# You should have received a copy of the GNU General Public License along with
    1.20 +# SourcePawn. If not, see http://www.gnu.org/licenses/.
    1.21 +#
    1.22 +import os
    1.23 +import os.path
    1.24 +import ambuild.osutil as osutil
    1.25 +
    1.26 +compiler = KE.DefaultCompiler()
    1.27 +compiler.AddToListVar('CXXINCLUDES', os.path.join(AMBuild.sourceFolder, 'include'))
    1.28 +
    1.29 +if compiler.cc.name == 'msvc':
    1.30 +	compiler.AddToListVar('POSTLINKFLAGS', '/SUBSYSTEM:CONSOLE')
    1.31 +
    1.32 +job = AMBuild.AddJob('testrun')
    1.33 +binary = Cpp.ExecutableBuilder('testrun', AMBuild, job, compiler)
    1.34 +files = [
    1.35 +	'main.cpp',
    1.36 +	'test-inlinelist.cpp',
    1.37 +	'test-linkedlist.cpp',
    1.38 +	'test-vector.cpp',
    1.39 +	'test-refcounting.cpp',
    1.40 +	'test-threadutils.cpp',
    1.41 +]
    1.42 +
    1.43 +binary.AddSourceFiles('tests', files)
    1.44 +binary.SendToJob()
    1.45 +