| 1 |
import os,sys |
| 2 |
from utils.util_scripts.path import path as upath |
| 3 |
|
| 4 |
Import('env', 'opts') |
| 5 |
|
| 6 |
if env.has_key('LIBS'): |
| 7 |
libs = list(env['LIBS']) |
| 8 |
libs.append(opts['TESTLIBS']) |
| 9 |
else: |
| 10 |
libs = "" |
| 11 |
|
| 12 |
if env.has_key('LIBPATH'): |
| 13 |
lib_path = list(env['LIBPATH']) |
| 14 |
lib_path.append(opts['LIBPATH']) |
| 15 |
else: |
| 16 |
lib_path = "" |
| 17 |
|
| 18 |
source_path = opts['SRC'] |
| 19 |
|
| 20 |
if env.has_key('CPPPATH'): |
| 21 |
core_path = list(env['CPPPATH']) |
| 22 |
core_path.append(os.path.join(source_path, 'core')) |
| 23 |
else: |
| 24 |
core_path = "" |
| 25 |
|
| 26 |
Alias('test_dat1', |
| 27 |
env.Program('test_dat1', |
| 28 |
'test_dat1.cpp', |
| 29 |
CPPPATH=core_path, |
| 30 |
LIBS=libs, |
| 31 |
LIBPATH=lib_path)) |
| 32 |
|
| 33 |
Alias('test_dat2', |
| 34 |
env.Program('test_dat2', |
| 35 |
'test_dat2.cpp', |
| 36 |
CPPPATH=core_path, |
| 37 |
LIBS=libs, |
| 38 |
LIBPATH=lib_path)) |
| 39 |
|
| 40 |
Alias('test_gui', |
| 41 |
env.Program('test_gui', |
| 42 |
'test_gui.cpp', |
| 43 |
CPPPATH=core_path, |
| 44 |
LIBS=libs, |
| 45 |
LIBPATH=lib_path)) |
| 46 |
|
| 47 |
Alias('test_imagepool', |
| 48 |
env.Program('test_imagepool', |
| 49 |
'test_imagepool.cpp', |
| 50 |
CPPPATH=core_path, |
| 51 |
LIBS=libs, |
| 52 |
LIBPATH=lib_path)) |
| 53 |
|
| 54 |
Alias('test_images', |
| 55 |
env.Program('test_images', |
| 56 |
'test_images.cpp', |
| 57 |
CPPPATH=core_path, |
| 58 |
LIBS=libs, |
| 59 |
LIBPATH=lib_path)) |
| 60 |
|
| 61 |
Alias('test_rect', |
| 62 |
env.Program('test_rect', |
| 63 |
'test_rect.cpp', |
| 64 |
CPPPATH=core_path, |
| 65 |
LIBS=libs, |
| 66 |
LIBPATH=lib_path)) |
| 67 |
|
| 68 |
Alias('test_vgs', |
| 69 |
env.Program('test_vfs', |
| 70 |
'test_vfs.cpp', |
| 71 |
CPPPATH=core_path, |
| 72 |
LIBS=libs, |
| 73 |
LIBPATH=lib_path)) |
| 74 |
|
| 75 |
Alias('test_zip', |
| 76 |
env.Program('test_zip', |
| 77 |
'test_zip.cpp', |
| 78 |
CPPPATH=core_path, |
| 79 |
LIBS=libs, |
| 80 |
LIBPATH=lib_path)) |
| 81 |
|
| 82 |
Alias('test_sharedptr', |
| 83 |
env.Program('test_sharedptr', |
| 84 |
'test_sharedptr.cpp', |
| 85 |
CPPPATH=core_path, |
| 86 |
LIBS=libs, |
| 87 |
LIBPATH=lib_path)) |
| 88 |
|
| 89 |
Alias('tests', ['test_dat1','test_dat2','test_gui','test_imagepool','test_images','test_rect','test_vfs','test_zip', 'test_sharedptr']) |