Bug 1417051 - Reorganize Firefox UI tests in test package for full path names in log files.
The Firefox UI tests were packaged wrongly, and as such didn't use
the real path as in tree. This patch fixes that by separating the
packaging logic for the harness, and the tests.
Also it updates the mozharness script to run the Firefox UI tests
command by using the test folder as current working directory. This
will make sure that the relative path to the tests is reported.
It's identical to the location in the tree.
MozReview-Commit-ID: 3YVfCw4RWfV
--- a/python/mozbuild/mozbuild/action/test_archive.py
+++ b/python/mozbuild/mozbuild/action/test_archive.py
@@ -147,16 +147,25 @@ ARCHIVE_FILES = {
'source': buildconfig.topobjdir,
'base': '_tests',
'pattern': 'mozbase/**',
},
{
'source': buildconfig.topsrcdir,
'base': 'testing',
'pattern': 'firefox-ui/**',
+ 'ignore': [
+ 'firefox-ui/tests',
+ ]
+ },
+ {
+ 'source': buildconfig.topsrcdir,
+ 'base': '',
+ 'pattern': 'testing/firefox-ui/tests',
+ 'dest': 'firefox-ui/tests',
},
{
'source': buildconfig.topsrcdir,
'base': 'js/src',
'pattern': 'jit-test/**',
'dest': 'jit-test',
},
{
--- a/testing/mozharness/mozharness/mozilla/testing/firefox_ui_tests.py
+++ b/testing/mozharness/mozharness/mozilla/testing/firefox_ui_tests.py
@@ -157,19 +157,23 @@ class FirefoxUITests(TestingMixin, VCSTo
def query_abs_dirs(self):
if self.abs_dirs:
return self.abs_dirs
abs_dirs = super(FirefoxUITests, self).query_abs_dirs()
abs_tests_install_dir = os.path.join(abs_dirs['abs_work_dir'], 'tests')
dirs = {
- 'abs_blob_upload_dir': os.path.join(abs_dirs['abs_work_dir'], 'blobber_upload_dir'),
+ 'abs_blob_upload_dir': os.path.join(
+ abs_dirs['abs_work_dir'], 'blobber_upload_dir'),
+ 'abs_fxui_dir': os.path.join(
+ abs_tests_install_dir, 'firefox-ui'),
+ 'abs_fxui_manifest_dir': os.path.join(
+ abs_tests_install_dir, 'firefox-ui', 'tests', 'testing', 'firefox-ui', 'tests'),
'abs_test_install_dir': abs_tests_install_dir,
- 'abs_fxui_dir': os.path.join(abs_tests_install_dir, 'firefox-ui'),
}
for key in dirs:
if key not in abs_dirs:
abs_dirs[key] = dirs[key]
self.abs_dirs = abs_dirs
return self.abs_dirs
@@ -239,17 +243,17 @@ class FirefoxUITests(TestingMixin, VCSTo
if self.config.get('tag'):
cmd.extend(['--tag', self.config['tag']])
parser = StructuredOutputParser(config=self.config,
log_obj=self.log_obj,
strict=False)
# Add the default tests to run
- tests = [os.path.join(dirs['abs_fxui_dir'], 'tests', test) for test in self.default_tests]
+ tests = [os.path.join(dirs['abs_fxui_manifest_dir'], t) for t in self.default_tests]
cmd.extend(tests)
# Set further environment settings
env = env or self.query_env()
env.update({'MINIDUMP_SAVE_PATH': dirs['abs_blob_upload_dir']})
if self.query_minidump_stackwalk():
env.update({'MINIDUMP_STACKWALK': self.minidump_stackwalk_path})
env['RUST_BACKTRACE'] = 'full'
@@ -261,17 +265,17 @@ class FirefoxUITests(TestingMixin, VCSTo
if self.config['allow_software_gl_layers']:
env['MOZ_LAYERS_ALLOW_SOFTWARE_GL'] = '1'
if self.config['enable_webrender']:
env['MOZ_WEBRENDER'] = '1'
env['MOZ_ACCELERATED'] = '1'
return_code = self.run_command(cmd,
- cwd=dirs['abs_work_dir'],
+ cwd=dirs['abs_fxui_dir'],
output_timeout=1000,
output_parser=parser,
env=env)
tbpl_status, log_level = parser.evaluate_parser(return_code)
self.buildbot_status(tbpl_status, level=log_level)
return return_code