tests/AMBuild.tests
author David Anderson <danderson@mozilla.com>
Tue Aug 27 00:49:33 2013 -0700 (2013-08-27)
changeset 12 cebfc7eeafa5
parent 11 cfe800908837
permissions -rw-r--r--
Added hash table tests.
danderson@11
     1
# vim: set ts=2 sw=2 tw=99 noet ft=python: 
danderson@11
     2
# 
danderson@11
     3
# Copyright (C) 2004-2012 David Anderson
danderson@11
     4
# 
danderson@11
     5
# This file is part of SourcePawn.
danderson@11
     6
# 
danderson@11
     7
# SourcePawn is free software: you can redistribute it and/or modify it under
danderson@11
     8
# the terms of the GNU General Public License as published by the Free
danderson@11
     9
# Software Foundation, either version 3 of the License, or (at your option)
danderson@11
    10
# any later version.
danderson@11
    11
# 
danderson@11
    12
# SourcePawn is distributed in the hope that it will be useful, but WITHOUT ANY
danderson@11
    13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
danderson@11
    14
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
danderson@11
    15
# 
danderson@11
    16
# You should have received a copy of the GNU General Public License along with
danderson@11
    17
# SourcePawn. If not, see http://www.gnu.org/licenses/.
danderson@11
    18
#
danderson@11
    19
import os
danderson@11
    20
import os.path
danderson@11
    21
import ambuild.osutil as osutil
danderson@11
    22
danderson@11
    23
compiler = KE.DefaultCompiler()
danderson@11
    24
compiler.AddToListVar('CXXINCLUDES', os.path.join(AMBuild.sourceFolder, 'include'))
danderson@11
    25
danderson@11
    26
if compiler.cc.name == 'msvc':
danderson@11
    27
	compiler.AddToListVar('POSTLINKFLAGS', '/SUBSYSTEM:CONSOLE')
danderson@11
    28
danderson@11
    29
job = AMBuild.AddJob('testrun')
danderson@11
    30
binary = Cpp.ExecutableBuilder('testrun', AMBuild, job, compiler)
danderson@11
    31
files = [
danderson@11
    32
	'main.cpp',
danderson@12
    33
	'test-hashmap.cpp',
danderson@11
    34
	'test-inlinelist.cpp',
danderson@11
    35
	'test-linkedlist.cpp',
danderson@11
    36
	'test-vector.cpp',
danderson@11
    37
	'test-refcounting.cpp',
danderson@11
    38
	'test-threadutils.cpp',
danderson@11
    39
]
danderson@11
    40
danderson@11
    41
binary.AddSourceFiles('tests', files)
danderson@11
    42
binary.SendToJob()
danderson@11
    43