1 |
< |
# -*- coding: latin-1 -*- |
1 |
> |
from __future__ import division, print_function, unicode_literals |
2 |
> |
|
3 |
|
import os |
4 |
|
import sys |
4 |
– |
import run_all |
5 |
|
|
6 |
+ |
import run_tests |
7 |
+ |
|
8 |
|
Import('env') |
9 |
|
|
10 |
< |
def run_tests(target=None,source=None,env=None): |
11 |
< |
try: |
12 |
< |
oldenv = env['ENV'] |
13 |
< |
ray = os.getcwd() |
14 |
< |
bin = Dir(env['RAD_BUILDBIN']).get_abspath() |
15 |
< |
lib = Dir(env['RAD_BUILDLIB']).get_abspath() |
10 |
> |
def do_run_tests(target=None,source=None,env=None): |
11 |
> |
bindir = Dir(env['RAD_BUILDBIN']).get_abspath() |
12 |
> |
radlib = [Dir(env['RAD_BUILDRLIB']).get_abspath(), |
13 |
> |
Dir('#/src/gen').get_abspath(), |
14 |
> |
Dir('#/src/rt').get_abspath(), |
15 |
> |
] |
16 |
> |
run_tests.RadianceTests(bindir=[bindir], radlib=radlib, V=True) |
17 |
|
|
18 |
< |
test = os.path.join(ray, 'test') |
16 |
< |
if not test in sys.path: |
17 |
< |
sys.path.append(test) |
18 |
< |
oldpath = oldenv.get('PATH') |
19 |
< |
#print oldpath |
20 |
< |
newpath = os.pathsep.join((bin, oldpath)) |
21 |
< |
newenv = {'PATH' : newpath, 'RAYPATH':lib } |
22 |
< |
env['ENV'] = newenv |
23 |
< |
run_all.main(bindir=bin) |
24 |
< |
finally: |
25 |
< |
env['ENV'] = oldenv |
18 |
> |
env.Command(None,'run_tests.py',action=Action(do_run_tests)) |
19 |
|
|
20 |
+ |
# vim: set syntax=python: |
21 |
+ |
# vi: set ts=4 sw=4 : |
22 |
|
|
28 |
– |
env.Command(None,'run_all.py',action=Action(run_tests)) |