Bug 1377007 - autospider.py,runcppunittests.py export the path to directory js/src,r=Yoric

Some tests need to find out js/src to locate their test
data. Exporting this information as part of the environment.

MozReview-Commit-ID: JAefL2arhJL
This commit is contained in:
David Teller
2017-12-08 11:14:12 +01:00
parent 0590b0a5da
commit 9f3c725867
2 changed files with 5 additions and 0 deletions

View File

@@ -32,6 +32,7 @@ def directories(pathmodule, cwd, fixup=lambda s: s):
DIR = directories(os.path, os.getcwd()) DIR = directories(os.path, os.getcwd())
PDIR = directories(posixpath, os.environ["PWD"], PDIR = directories(posixpath, os.environ["PWD"],
fixup=lambda s: re.sub(r'^(\w):', r'/\1', s)) fixup=lambda s: re.sub(r'^(\w):', r'/\1', s))
env['CPP_UNIT_TESTS_DIR_JS_SRC'] = DIR.js_src
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
description='Run a spidermonkey shell build job') description='Run a spidermonkey shell build job')

View File

@@ -8,6 +8,7 @@ from __future__ import with_statement
import sys import sys
import os import os
from optparse import OptionParser from optparse import OptionParser
from os import environ as env
import manifestparser import manifestparser
import mozprocess import mozprocess
import mozinfo import mozinfo
@@ -17,6 +18,9 @@ import mozlog
SCRIPT_DIR = os.path.abspath(os.path.realpath(os.path.dirname(__file__))) 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): class CPPUnitTests(object):
# Time (seconds) to wait for test process to complete # Time (seconds) to wait for test process to complete