Bug 1429687 - Fix import issues draft
authorIonut Goldan <igoldan@mozilla.com>
Tue, 05 Jun 2018 14:27:19 +0300
changeset 805280 5d1f7243b2f7284e081965ff05c1ef3fbc9760d5
parent 805277 2ec272df45f2d88b2897c2dda2577bc3052d044d
push id112616
push userbmo:igoldan@mozilla.com
push dateThu, 07 Jun 2018 16:13:21 +0000
bugs1429687
milestone62.0a1
Bug 1429687 - Fix import issues MozReview-Commit-ID: Lgi1AbiY29J
testing/talos/talos/unittests/python.ini
testing/talos/talos/unittests/test_config.py
testing/talos/talos/xtalos/__init__.py
testing/talos/talos/xtalos/etlparser.py
testing/talos/talos/xtalos/start_xperf.py
--- a/testing/talos/talos/unittests/python.ini
+++ b/testing/talos/talos/unittests/python.ini
@@ -1,6 +1,7 @@
 [DEFAULT]
 subsuite = talos
 
 [test_config.py]
 [test_ffsetup.py]
 [test_test.py]
+[test_xtalos/test_etlparser.py]
--- a/testing/talos/talos/unittests/test_config.py
+++ b/testing/talos/talos/unittests/test_config.py
@@ -132,17 +132,18 @@ class Test_get_browser_config(object):
                 'repository',
                 'sourcestamp',
                 'symbols_path',
                 'test_timeout',
                 'xperf_path',
                 'error_filename',
                 'no_upload_results',
                 'stylothreads',
-                'subtests']
+                'subtests',
+                'preferences']
 
     def test_that_contains_title(self):
         config_no_optionals = dict.fromkeys(self.required, '')
         config_no_optionals.update(title='is_mandatory')
 
         browser_config = get_browser_config(config_no_optionals)
         assert browser_config['title'] == 'is_mandatory'
 
--- a/testing/talos/talos/xtalos/__init__.py
+++ b/testing/talos/talos/xtalos/__init__.py
@@ -1,6 +1,5 @@
 # xtalos: talos + xperf
 from __future__ import absolute_import
 
-from start_xperf import start  # noqa
-from start_xperf import start_from_config  # noqa
-import etlparser  # noqa
+from .start_xperf import start, start_from_config  # noqa
+from . import etlparser  # noqa
--- a/testing/talos/talos/xtalos/etlparser.py
+++ b/testing/talos/talos/xtalos/etlparser.py
@@ -9,17 +9,17 @@ import csv
 import json
 import os
 import re
 import shutil
 import subprocess
 import sys
 
 import mozfile
-import xtalos
+from . import xtalos
 
 EVENTNAME_INDEX = 0
 PROCESS_INDEX = 2
 THREAD_ID_INDEX = 3
 DISKBYTES_COL = "Size"
 FNAME_COL = "FileName"
 IMAGEFUNC_COL = "Image!Function"
 EVENTGUID_COL = "EventGuid"
--- a/testing/talos/talos/xtalos/start_xperf.py
+++ b/testing/talos/talos/xtalos/start_xperf.py
@@ -4,17 +4,17 @@
 # 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 subprocess
 import sys
 
-import xtalos
+from . import xtalos
 
 
 def start(xperf_path, xperf_providers, xperf_stackwalk, xperf_user_providers,
           etl_filename, debug=False):
 
     xperf_cmd = [xperf_path,
                  '-on', '+'.join(xperf_providers),
                  '-stackwalk', '+'.join(xperf_stackwalk),