Bug 1477870 - Talos fails to find module 'util' when run locally in moziila-build environment. r=rwood
authorflorin.strugariu <bebe@mozilla.ro>
Wed, 03 Oct 2018 11:03:04 +0300
changeset 489555 04692d253f940cc8a82948867b85234eea7d9233
parent 489554 9c535988954c0b2afacafe47597cfc5c884d3e20
child 489556 b434eb7d318a4e4137de89b13cc06fea47398f9b
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersrwood
bugs1477870
milestone64.0a1
Bug 1477870 - Talos fails to find module 'util' when run locally in moziila-build environment. r=rwood
testing/talos/requirements.txt
testing/talos/talos/cmanager_mac.py
testing/talos/talos/cmanager_win32.py
testing/talos/talos/mainthreadio.py
testing/talos/talos/output.py
testing/talos/talos/run_tests.py
testing/talos/talos/talos_process.py
testing/talos/talos/ttest.py
testing/talos/talos/whitelist.py
--- a/testing/talos/requirements.txt
+++ b/testing/talos/requirements.txt
@@ -2,11 +2,12 @@ jsonschema>=2.5.1
 mozlog>=3.1
 mozcrash>=0.15
 mozfile>=1.2
 mozhttpd>=0.7
 mozinfo>=0.8
 mozprocess>=0.22
 mozversion>=1.3
 mozprofile>=0.25
+mozrunner>=7.1.0
 psutil>=3.1.1
 simplejson>=2.1.1
 requests>=2.9.1
--- a/testing/talos/talos/cmanager_mac.py
+++ b/testing/talos/talos/cmanager_mac.py
@@ -3,17 +3,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 """CounterManager for Mac OSX"""
 from __future__ import absolute_import, print_function
 
 import subprocess
 import sys
 
-from cmanager_base import CounterManager
+from talos.cmanager_base import CounterManager
 
 
 def GetProcessData(pid):
     """Runs a ps on the process identified by pid and returns the output line
       as a list (pid, vsz, rss)
     """
     command = ['ps -o pid,vsize,rss -p'+str(pid)]
     try:
--- a/testing/talos/talos/cmanager_win32.py
+++ b/testing/talos/talos/cmanager_win32.py
@@ -5,18 +5,18 @@ from __future__ import absolute_import
 
 import struct
 from ctypes import byref, create_string_buffer, memmove, Union, c_double, \
     c_longlong
 from ctypes import windll
 from ctypes.wintypes import DWORD, HANDLE, LPSTR, LPCSTR, LPCWSTR, Structure, \
     pointer, LONG
 
-from cmanager_base import CounterManager
-from utils import TalosError
+from talos.cmanager_base import CounterManager
+from talos.utils import TalosError
 
 pdh = windll.pdh
 
 _LONGLONG = c_longlong
 
 
 class _PDH_COUNTER_PATH_ELEMENTS_A(Structure):
     _fields_ = [("szMachineName", LPSTR),
--- a/testing/talos/talos/mainthreadio.py
+++ b/testing/talos/talos/mainthreadio.py
@@ -2,18 +2,18 @@
 # vim: set ts=8 sts=4 et sw=4 tw=80:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 from __future__ import absolute_import, print_function
 
 import os
 import re
-import utils
-import whitelist
+from talos import utils
+from talos import whitelist
 
 from collections import OrderedDict
 
 SCRIPT_DIR = os.path.abspath(os.path.realpath(os.path.dirname(__file__)))
 
 STAGE_STARTUP = 0
 STAGE_STRINGS = ('startup', 'normal', 'shutdown')
 
--- a/testing/talos/talos/output.py
+++ b/testing/talos/talos/output.py
@@ -1,20 +1,20 @@
 
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 """output formats for Talos"""
 from __future__ import absolute_import
 
-import filter
+from talos import filter
 # NOTE: we have a circular dependency with output.py when we import results
 import simplejson as json
-import utils
+from talos import utils
 from mozlog import get_proxy_logger
 
 LOG = get_proxy_logger()
 
 
 class Output(object):
     """abstract base class for Talos output"""
 
--- a/testing/talos/talos/run_tests.py
+++ b/testing/talos/talos/run_tests.py
@@ -11,17 +11,18 @@ import subprocess
 import sys
 import time
 import traceback
 import urllib
 
 import mozhttpd
 import mozinfo
 import mozversion
-import utils
+
+from talos import utils
 from mozlog import get_proxy_logger
 from talos.config import get_configs, ConfigurationError
 from talos.mitmproxy import mitmproxy
 from talos.results import TalosResults
 from talos.ttest import TTest
 from talos.utils import TalosError, TalosRegression
 
 # directory of this file
--- a/testing/talos/talos/talos_process.py
+++ b/testing/talos/talos/talos_process.py
@@ -9,17 +9,17 @@ import time
 import traceback
 import subprocess
 from threading import Event
 
 import mozcrash
 import psutil
 from mozlog import get_proxy_logger
 from mozprocess import ProcessHandler
-from utils import TalosError
+from talos.utils import TalosError
 
 LOG = get_proxy_logger()
 
 
 class ProcessContext(object):
     """
     Store useful results of the browser execution.
     """
--- a/testing/talos/talos/ttest.py
+++ b/testing/talos/talos/ttest.py
@@ -18,23 +18,24 @@ import os
 import platform
 import shutil
 import subprocess
 import sys
 import time
 
 import mozcrash
 import mozfile
-import results
-import talosconfig
-import utils
+
 from mozlog import get_proxy_logger
 from talos.cmanager import CounterManagement
 from talos.ffsetup import FFSetup
 from talos.talos_process import run_browser
+from talos import utils
+from talos import results
+from talos import talosconfig
 from talos.utils import TalosCrash, TalosError, TalosRegression, run_in_debug_mode
 
 LOG = get_proxy_logger()
 
 
 class TTest(object):
     def check_for_crashes(self, browser_config, minidump_dir, test_name):
         # check for minidumps
--- a/testing/talos/talos/whitelist.py
+++ b/testing/talos/talos/whitelist.py
@@ -3,17 +3,17 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 from __future__ import absolute_import, print_function
 
 import json
 import os
 import re
-import utils
+from talos import utils
 
 KEY_XRE = '{xre}'
 DEFAULT_DURATION = 100.0
 
 
 class Whitelist:
     # we need to find the root dir of the profile at runtime
     PRE_PROFILE = ''