1 |
|
# -*- coding: latin-1 -*- |
2 |
+ |
from __future__ import division, print_function, unicode_literals |
3 |
+ |
|
4 |
|
import os |
5 |
|
import sys |
4 |
– |
import run_all |
6 |
|
|
7 |
+ |
import run_tests |
8 |
+ |
|
9 |
|
Import('env') |
10 |
|
|
11 |
|
def run_tests(target=None,source=None,env=None): |
12 |
< |
try: |
13 |
< |
oldenv = env['ENV'] |
14 |
< |
ray = os.getcwd() |
12 |
< |
up, cur = os.path.split(ray) |
13 |
< |
bin = os.path.join(up, 'bin') |
14 |
< |
lib = os.path.join(up, 'lib') |
15 |
< |
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() |
24 |
< |
finally: |
25 |
< |
env['ENV'] = oldenv |
12 |
> |
bindir = Dir(env['RAD_BUILDBIN']).get_abspath() |
13 |
> |
radlib = Dir(env['RAD_BUILDRLIB']).get_abspath() |
14 |
> |
run_tests.RadianceTests(bindir=[bindir], radlib=[radlib], V=True) |
15 |
|
|
16 |
< |
|
28 |
< |
env.Command(None,'run_all.py',action=Action(run_tests)) |
16 |
> |
env.Command(None,'run_tests.py',action=Action(run_tests)) |