Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

Commit

Permalink
Bug 1201061 - Autophone - adapt runtestsremote.py to use test's mozba…
Browse files Browse the repository at this point in the history
…se, r=gbrown.
  • Loading branch information
bclary committed Sep 8, 2015
1 parent 5bded5c commit a36b322
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/runtestsremote.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# You can obtain one at http://mozilla.org/MPL/2.0/.

import ConfigParser
import glob
import json
import logging
import os
Expand Down Expand Up @@ -336,6 +337,16 @@ def runtest(self):

self.parms['port_manager'] = PortManager(self.parms['host_ip_address'])

# Create the env dictionary to pass to the test runner.
env = dict(os.environ)
env['MOZ_UPLOAD_DIR'] = self.upload_dir

# Create PYTHONPATH to point the test runner to the test's mozbase packages.
python_path = ':'.join(
[pkg for pkg in
glob.glob('%s/tests/mozbase/*' % self.parms['build_dir'])
if os.path.isdir(pkg)])
env['PYTHONPATH'] = python_path
try:
is_test_completed = True
logfilehandle = None
Expand Down Expand Up @@ -372,6 +383,7 @@ def runtest(self):
args,
cwd=os.path.join(self.parms['build_dir'],
'tests'),
env=env,
preexec_fn=lambda: os.setpgid(0, 0),
stdout=logfilehandle,
stderr=subprocess.STDOUT,
Expand Down

0 comments on commit a36b322

Please sign in to comment.