diff --git a/js/src/devtools/automation/autospider.py b/js/src/devtools/automation/autospider.py index 03081738d2e4..a50e368f62d5 100755 --- a/js/src/devtools/automation/autospider.py +++ b/js/src/devtools/automation/autospider.py @@ -32,6 +32,7 @@ def directories(pathmodule, cwd, fixup=lambda s: s): DIR = directories(os.path, os.getcwd()) PDIR = directories(posixpath, os.environ["PWD"], fixup=lambda s: re.sub(r'^(\w):', r'/\1', s)) +env['CPP_UNIT_TESTS_DIR_JS_SRC'] = DIR.js_src parser = argparse.ArgumentParser( description='Run a spidermonkey shell build job') diff --git a/testing/runcppunittests.py b/testing/runcppunittests.py index d9e4f01c4a58..573da30d24a5 100755 --- a/testing/runcppunittests.py +++ b/testing/runcppunittests.py @@ -8,6 +8,7 @@ from __future__ import with_statement import sys import os from optparse import OptionParser +from os import environ as env import manifestparser import mozprocess import mozinfo @@ -17,6 +18,9 @@ import mozlog SCRIPT_DIR = os.path.abspath(os.path.realpath(os.path.dirname(__file__))) +# Export directory js/src for tests that need it. +env['CPP_UNIT_TESTS_DIR_JS_SRC'] = os.path.abspath(os.path.join(SCRIPT_DIR, "..", "..")) + class CPPUnitTests(object): # Time (seconds) to wait for test process to complete