--- ray/test/SConscript 2008/12/26 17:00:32 1.1 +++ ray/test/SConscript 2018/01/08 13:38:37 1.5 @@ -1,28 +1,22 @@ -# -*- coding: latin-1 -*- +from __future__ import division, print_function, unicode_literals + import os import sys -import run_all +import run_tests + Import('env') -def run_tests(target=None,source=None,env=None): - try: - oldenv = env['ENV'] - ray = os.getcwd() - up, cur = os.path.split(ray) - bin = os.path.join(up, 'bin') - lib = os.path.join(up, 'lib') - test = os.path.join(ray, 'test') - if not test in sys.path: - sys.path.append(test) - oldpath = oldenv.get('PATH') - print oldpath - newpath = os.pathsep.join((bin, oldpath)) - newenv = {'PATH' : newpath, 'RAYPATH':lib } - env['ENV'] = newenv - run_all.main() - finally: - env['ENV'] = oldenv +def do_run_tests(target=None,source=None,env=None): + bindir = Dir(env['RAD_BUILDBIN']).get_abspath() + radlib = [Dir(env['RAD_BUILDRLIB']).get_abspath(), + Dir('#/src/gen').get_abspath(), + Dir('#/src/rt').get_abspath(), + ] + run_tests.RadianceTests(bindir=[bindir], radlib=radlib, V=True) +env.Command(None,'run_tests.py',action=Action(do_run_tests)) -env.Command(None,'run_all.py',action=Action(run_tests)) +# vim: set syntax=python: +# vi: set ts=4 sw=4 : +