Skip to content

Commit

Permalink
Bug 979640 - Make build system error on missing test files; r=ted
Browse files Browse the repository at this point in the history
Previously, the build system may silently missing test files defined in
manifests. This patch makes missing test files a fatal error, detected
when reading test manifests.

The test_bug872273.html XBL test appeared to be orphaned in
content/xbl/test. It has been reunited with its family.

dom/tests/mochitest/notification referenced a single test file which was
recently deleted. That manifest has been removed.

Missing test files related to the Python unit tests for the build system
have been added. (They are a bunch of empty files.)

--HG--
extra : amend_source : cb6b9bf91e57569c8be312d3c16fef69b2b0b950
  • Loading branch information
indygreg committed Mar 5, 2014
1 parent c35a66e commit dd337c3
Show file tree
Hide file tree
Showing 16 changed files with 78 additions and 61 deletions.
6 changes: 4 additions & 2 deletions accessible/tests/mochitest/hittest/a11y.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
support-files = zoom_tree.xul

[test_browser.html]
[text_canvas_hitregion.html]
skip-if = os == "android" || appname == "b2g"
[test_canvas_hitregion.html]
# Disabled everywhere because of failures. It appears this test has
# never executed since its inception.
skip-if = true || (os == "android" || appname == "b2g")
[test_general.html]
[test_menu.xul]
[test_zoom.html]
Expand Down
1 change: 0 additions & 1 deletion browser/components/sessionstore/test/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ support-files =
skip-if = true
[browser_339445.js]
[browser_345898.js]
[browser_346337.js]
[browser_350525.js]
[browser_354894_perwindowpb.js]
[browser_367052.js]
Expand Down
6 changes: 4 additions & 2 deletions browser/devtools/commandline/test/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ support-files =
[browser_cmd_settings.js]
[browser_gcli_async.js]
[browser_gcli_canon.js]
[browser_gcli_cli.js]
[browser_gcli_completion.js]
[browser_gcli_cli1.js]
[browser_gcli_cli2.js]
[browser_gcli_completion1.js]
[browser_gcli_completion2.js]
[browser_gcli_date.js]
skip-if = true # Disabled until TZ bug is fixed
[browser_gcli_exec.js]
Expand Down
1 change: 0 additions & 1 deletion browser/devtools/sourceeditor/test/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ support-files =
[browser_css_autocompletion.js]
[browser_css_statemachine.js]
[browser_vimemacs.js]
[browser_sourceeditor_initialization.js]
1 change: 0 additions & 1 deletion dom/encoding/test/unit/mochitest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@
[test_hz-gb-2312.js]
[test_iso-2022-jp.js]
[test_shift_jis.js]
[test_singlebytes.js]
82 changes: 41 additions & 41 deletions dom/imptests/html/mochitest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -172,41 +172,41 @@ support-files =
skip-if = true # bug 859075
[html/browsers/the-window-object/test_window-properties.html]
[html/browsers/the-window-object/test_window-prototype-chain.html]
[html/dom/documents/dom-tree-accessors/document.getElementsByName/test_document.getElementsByName-case.html]
[html/dom/documents/dom-tree-accessors/document.getElementsByName/test_document.getElementsByName-case.xhtml]
[html/dom/documents/dom-tree-accessors/document.getElementsByName/test_document.getElementsByName-id.html]
[html/dom/documents/dom-tree-accessors/document.getElementsByName/test_document.getElementsByName-id.xhtml]
[html/dom/documents/dom-tree-accessors/document.getElementsByName/test_document.getElementsByName-namespace.html]
[html/dom/documents/dom-tree-accessors/document.getElementsByName/test_document.getElementsByName-namespace.xhtml]
[html/dom/documents/dom-tree-accessors/document.getElementsByName/test_document.getElementsByName-newelements.html]
[html/dom/documents/dom-tree-accessors/document.getElementsByName/test_document.getElementsByName-newelements.xhtml]
[html/dom/documents/dom-tree-accessors/document.getElementsByName/test_document.getElementsByName-null-undef.html]
[html/dom/documents/dom-tree-accessors/document.getElementsByName/test_document.getElementsByName-null-undef.xhtml]
[html/dom/documents/dom-tree-accessors/document.getElementsByName/test_document.getElementsByName-param.html]
[html/dom/documents/dom-tree-accessors/document.getElementsByName/test_document.getElementsByName-param.xhtml]
[html/dom/documents/dom-tree-accessors/document.getElementsByName/test_document.getElementsByName-same.html]
[html/dom/documents/dom-tree-accessors/test_Document.getElementsByClassName-null-undef.html]
[html/dom/documents/dom-tree-accessors/test_Element.getElementsByClassName-null-undef.html]
[html/dom/documents/dom-tree-accessors/test_document.body-getter.html]
[html/dom/documents/dom-tree-accessors/test_document.body-setter-01.html]
[html/dom/documents/dom-tree-accessors/test_document.embeds-document.plugins-01.html]
[html/dom/documents/dom-tree-accessors/test_document.getElementsByClassName-same.html]
[html/dom/documents/dom-tree-accessors/test_document.head-01.html]
[html/dom/documents/dom-tree-accessors/test_document.head-02.html]
[html/dom/documents/dom-tree-accessors/test_document.images.html]
[html/dom/documents/dom-tree-accessors/test_document.title-01.html]
[html/dom/documents/dom-tree-accessors/test_document.title-02.xhtml]
[html/dom/documents/dom-tree-accessors/test_document.title-03.html]
[html/dom/documents/dom-tree-accessors/test_document.title-04.xhtml]
[html/dom/documents/dom-tree-accessors/test_document.title-05.html]
[html/dom/documents/dom-tree-accessors/test_document.title-06.html]
[html/dom/documents/dom-tree-accessors/test_document.title-07.html]
[html/dom/documents/dom-tree-accessors/test_nameditem-01.html]
[html/dom/documents/dom-tree-accessors/test_nameditem-02.html]
[html/dom/documents/dom-tree-accessors/test_nameditem-03.html]
[html/dom/documents/dom-tree-accessors/test_nameditem-04.html]
[html/dom/documents/dom-tree-accessors/test_nameditem-05.html]
[html/dom/documents/dom-tree-accessors/test_nameditem-06.html]
[html/dom/documents/dta/doc.gEBN/test_document.getElementsByName-case.html]
[html/dom/documents/dta/doc.gEBN/test_document.getElementsByName-case.xhtml]
[html/dom/documents/dta/doc.gEBN/test_document.getElementsByName-id.html]
[html/dom/documents/dta/doc.gEBN/test_document.getElementsByName-id.xhtml]
[html/dom/documents/dta/doc.gEBN/test_document.getElementsByName-namespace.html]
[html/dom/documents/dta/doc.gEBN/test_document.getElementsByName-namespace.xhtml]
[html/dom/documents/dta/doc.gEBN/test_document.getElementsByName-newelements.html]
[html/dom/documents/dta/doc.gEBN/test_document.getElementsByName-newelements.xhtml]
[html/dom/documents/dta/doc.gEBN/test_document.getElementsByName-null-undef.html]
[html/dom/documents/dta/doc.gEBN/test_document.getElementsByName-null-undef.xhtml]
[html/dom/documents/dta/doc.gEBN/test_document.getElementsByName-param.html]
[html/dom/documents/dta/doc.gEBN/test_document.getElementsByName-param.xhtml]
[html/dom/documents/dta/doc.gEBN/test_document.getElementsByName-same.html]
[html/dom/documents/dta/test_Document.getElementsByClassName-null-undef.html]
[html/dom/documents/dta/test_Element.getElementsByClassName-null-undef.html]
[html/dom/documents/dta/test_document.body-getter.html]
[html/dom/documents/dta/test_document.body-setter-01.html]
[html/dom/documents/dta/test_document.embeds-document.plugins-01.html]
[html/dom/documents/dta/test_document.getElementsByClassName-same.html]
[html/dom/documents/dta/test_document.head-01.html]
[html/dom/documents/dta/test_document.head-02.html]
[html/dom/documents/dta/test_document.images.html]
[html/dom/documents/dta/test_document.title-01.html]
[html/dom/documents/dta/test_document.title-02.xhtml]
[html/dom/documents/dta/test_document.title-03.html]
[html/dom/documents/dta/test_document.title-04.xhtml]
[html/dom/documents/dta/test_document.title-05.html]
[html/dom/documents/dta/test_document.title-06.html]
[html/dom/documents/dta/test_document.title-07.html]
[html/dom/documents/dta/test_nameditem-01.html]
[html/dom/documents/dta/test_nameditem-02.html]
[html/dom/documents/dta/test_nameditem-03.html]
[html/dom/documents/dta/test_nameditem-04.html]
[html/dom/documents/dta/test_nameditem-05.html]
[html/dom/documents/dta/test_nameditem-06.html]
[html/dom/elements/global-attributes/test_classlist-nonstring.html]
[html/dom/elements/global-attributes/test_dataset-delete.html]
[html/dom/elements/global-attributes/test_dataset-enumeration.html]
Expand All @@ -217,12 +217,12 @@ skip-if = true # bug 859075
[html/dom/elements/global-attributes/test_document-dir.html]
[html/dom/elements/global-attributes/test_id-attribute.html]
[html/dom/elements/global-attributes/test_id-name.html]
[html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/test_document-color-01.html]
[html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/test_document-color-02.html]
[html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/test_document-color-03.html]
[html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/test_document-color-04.html]
[html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/test_heading-obsolete-attributes-01.html]
[html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/test_script-IDL-event-htmlfor.html]
[html/obsolete/implreq/oeaaa/test_document-color-01.html]
[html/obsolete/implreq/oeaaa/test_document-color-02.html]
[html/obsolete/implreq/oeaaa/test_document-color-03.html]
[html/obsolete/implreq/oeaaa/test_document-color-04.html]
[html/obsolete/implreq/oeaaa/test_heading-obsolete-attributes-01.html]
[html/obsolete/implreq/oeaaa/test_script-IDL-event-htmlfor.html]
[html/semantics/document-metadata/the-title-element/test_title.text-01.html]
[html/semantics/document-metadata/the-title-element/test_title.text-02.xhtml]
[html/semantics/document-metadata/the-title-element/test_title.text-03.html]
Expand Down
3 changes: 0 additions & 3 deletions dom/tests/mochitest/notification/chrome.ini

This file was deleted.

3 changes: 0 additions & 3 deletions dom/tests/mochitest/notification/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,3 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

MOCHITEST_MANIFESTS += ['mochitest.ini']

MOCHITEST_CHROME_MANIFESTS += ['chrome.ini']

12 changes: 6 additions & 6 deletions dom/tests/mochitest/webcomponents/mochitest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ support-files =
[test_bug900724.html]
[test_content_element.html]
[test_nested_content_element.html]
[test_dyanmic_content_element_matching.html]
[test_dynamic_content_element_matching.html]
[test_document_register.html]
[test_document_register_base_queue.html]
[test_document_register_lifecycle.html]
[test_document_register_parser.html]
[test_document_register_stack.html]
[test_template.html]
[test_shadow_root.html]
[test_shadow_root_inert_element.html]
[test_shadow_root_style.html]
[test_shadow_root_style_multiple_shadow.html]
[test_shadow_root_style_order.html]
[test_shadowroot.html]
[test_shadowroot_inert_element.html]
[test_shadowroot_style.html]
[test_shadowroot_style_multiple_shadow.html]
[test_shadowroot_style_order.html]
[test_style_fallback_content.html]
11 changes: 10 additions & 1 deletion python/mozbuild/mozbuild/frontend/emitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,16 @@ def _process_test_manifest(self, sandbox, info, manifest_path):
filtered = m.tests

if filter_inactive:
filtered = m.active_tests(disabled=False, **self.mozinfo)
# We return tests that don't exist because we want manifests
# defining tests that don't exist to result in error.
filtered = m.active_tests(exists=False, disabled=False,
**self.mozinfo)

missing = [t['name'] for t in filtered if not os.path.exists(t['path'])]
if missing:
raise SandboxValidationError('Test manifest (%s) lists '
'test that does not exist: %s' % (
path, ', '.join(missing)))

out_dir = mozpath.join(install_prefix, manifest_reldir)

Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[test_missing.html]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/

MOCHITEST_MANIFESTS += ['mochitest.ini']
Empty file.
8 changes: 8 additions & 0 deletions python/mozbuild/mozbuild/test/frontend/test_emitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,14 @@ def test_test_manifest_parent_support_files_dir(self):
self.assertEqual(o.installs[expected],
('testing/mochitest/tests/child/support-file.txt', False))

def test_test_manifest_missing_test_error(self):
"""Missing test files should result in error."""
reader = self.reader('test-manifest-missing-test-file')

with self.assertRaisesRegexp(SandboxValidationError,
'lists test that does not exist: test_missing.html'):
self.read_topsrcdir(reader)

def test_ipdl_sources(self):
reader = self.reader('ipdl_sources')
objs = self.read_topsrcdir(reader)
Expand Down

0 comments on commit dd337c3

Please sign in to comment.