W3C test importer should not import reference files as regular tests
authoryouenn.fablet@crf.canon.fr <youenn.fablet@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Oct 2015 07:53:37 +0000 (07:53 +0000)
committeryouenn.fablet@crf.canon.fr <youenn.fablet@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Oct 2015 07:53:37 +0000 (07:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=150331

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* resources/ImportExpectations: Removed some Skip expectations as test importer no longer will handle these files as tests, but as reference files.

Tools:

Updated test_parser to return information that a file can be a referencefile or a manual test.
Updated test importer to skip those files.
Updated/Added test parser unit tests accordingly.

Updated test importer to import all not-test files, as they are usually used by tests and lead to test failing or timing out.
Updated test importer to log these 'resource' files that are not in a resources folder, and suggest to import script user
to mark these files as Skip, since they are not direct tests.

* Scripts/webkitpy/w3c/test_importer.py:
(TestImporter.__init__):
(TestImporter.find_importable_tests):
(TestImporter.import_tests):
* Scripts/webkitpy/w3c/test_parser.py:
(TestParser.analyze_test):
* Scripts/webkitpy/w3c/test_parser_unittest.py:
(test_analyze_non_html_file):
(test_reference_test):

LayoutTests:

* TestExpectations: Adding Skip expectations for web-platform-test resource files (currently commented out as not all are yet imported).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191380 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/resources/ImportExpectations
Tools/ChangeLog
Tools/Scripts/webkitpy/w3c/test_importer.py
Tools/Scripts/webkitpy/w3c/test_parser.py
Tools/Scripts/webkitpy/w3c/test_parser_unittest.py

index f6bb30bdea3561f6c806a80ba8469c3c244ddae4..08c3fcd6536d8d7099a08aa72f0bca6e3e0cb27c 100644 (file)
@@ -1,3 +1,12 @@
+2015-10-21  Youenn Fablet  <youenn.fablet@crf.canon.fr>
+
+        W3C test importer should not import reference files as regular tests
+        https://bugs.webkit.org/show_bug.cgi?id=150331
+
+        Reviewed by Darin Adler.
+
+        * TestExpectations: Adding Skip expectations for web-platform-test resource files (currently commented out as not all are yet imported).
+
 2015-10-21  Youenn Fablet  <youenn.fablet@crf.canon.fr>
 
         Update web-platform-tests tests to the same revision as tools
index 21854ed90ab476e969f7c4d590a91a81b05dcad0..adffd2f49c31da6167dc4db779bde0855c53b371 100644 (file)
@@ -266,6 +266,68 @@ imported/w3c/web-platform-tests/html/semantics/grouping-content/the-ol-element/r
 imported/w3c/web-platform-tests/html/semantics/grouping-content/the-ol-element/reversed-1c.html [ Skip ]
 imported/w3c/web-platform-tests/html/semantics/selectors/pseudo-classes/focus-iframe.html [ Skip ]
 
+# Resource files not in resources folder
+#imported/w3c/web-platform-tests/common/blank.html [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/bare_mathml.html [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/bare_mathml.xhtml [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/bare_mathml.xml [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/bare_svg.html [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/bare_svg.xhtml [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/bare_svg.xml [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.html [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.xhtml [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.xml [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.html [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.xhtml [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.xml [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/mathml.html [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/mathml.xhtml [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/mathml.xml [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/minimal_html.html [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/minimal_html.xhtml [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/minimal_html.xml [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/svg.html [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/svg.xhtml [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/svg.xml [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/xhtml.html [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/xhtml.xhtml [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/xhtml.xml [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.html [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.xhtml [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.xml [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.html [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.xhtml [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.xml [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/Node-parentNode-iframe.html [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/ParentNode-querySelector-All-content.html [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/ParentNode-querySelector-All-content.xht [ Skip ]
+#imported/w3c/web-platform-tests/dom/nodes/getElementsByClassNameFrame.htm [ Skip ]
+#imported/w3c/web-platform-tests/dom/ranges/Range-test-iframe.html [ Skip ]
+#imported/w3c/web-platform-tests/html/dom/dynamic-markup-insertion/document-write/nested-document-write-1.html [ Skip ]
+#imported/w3c/web-platform-tests/html/dom/dynamic-markup-insertion/document-write/nested-document-write-2.html [ Skip ]
+#imported/w3c/web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/004-1.html [ Skip ]
+#imported/w3c/web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/010-1.html [ Skip ]
+#imported/w3c/web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/010-2.html [ Skip ]
+#imported/w3c/web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/011-1.html [ Skip ]
+#imported/w3c/web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/012-1.html [ Skip ]
+#imported/w3c/web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/013-1.html [ Skip ]
+#imported/w3c/web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/014-1.html [ Skip ]
+#imported/w3c/web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/015-1.html [ Skip ]
+#imported/w3c/web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/016-1.html [ Skip ]
+#imported/w3c/web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/document.open-03-frame.html [ Skip ]
+#imported/w3c/web-platform-tests/html/semantics/document-metadata/the-base-element/example.html [ Skip ]
+#imported/w3c/web-platform-tests/html/semantics/document-metadata/the-base-element/example2.html [ Skip ]
+#imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/environment-changes/iframed.sub.html [ Skip ]
+#imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-iframed.sub.html [ Skip ]
+#imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/test0.html [ Skip ]
+#imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/test1.html [ Skip ]
+#imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/test2.html [ Skip ]
+#imported/w3c/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/dirname-ltr-iframe.html [ Skip ]
+#imported/w3c/web-platform-tests/html/semantics/grouping-content/the-ol-element/reversed-1a.html [ Skip ]
+#imported/w3c/web-platform-tests/html/semantics/grouping-content/the-ol-element/reversed-1b.html [ Skip ]
+#imported/w3c/web-platform-tests/html/semantics/grouping-content/the-ol-element/reversed-1c.html [ Skip ]
+#imported/w3c/web-platform-tests/html/semantics/selectors/pseudo-classes/focus-iframe.html [ Skip ]
+
 # Skip W3C tests that are too slow in debug builds.
 webkit.org/b/148546 [ Debug ] imported/w3c/web-platform-tests/dom/interfaces.html [ Skip ]
 webkit.org/b/148546 [ Debug ] imported/w3c/web-platform-tests/dom/ranges/Range-compareBoundaryPoints.html [ Skip ]
index a19d0de404ac211fbafc86e55ec869df85059048..c3d539f8a46347681d042903d6bcecde89aa0d5a 100644 (file)
@@ -1,3 +1,12 @@
+2015-10-21  Youenn Fablet  <youenn.fablet@crf.canon.fr>
+
+        W3C test importer should not import reference files as regular tests
+        https://bugs.webkit.org/show_bug.cgi?id=150331
+
+        Reviewed by Darin Adler.
+
+        * resources/ImportExpectations: Removed some Skip expectations as test importer no longer will handle these files as tests, but as reference files.
+
 2015-10-21  Youenn Fablet  <youenn.fablet@crf.canon.fr>
 
         Update web-platform-tests tests to the same revision as tools
index e48013eaa5bb68c752404113ca7d2af8d076382b..72ce62fd30dee0a05a33fa18d66d29a91d5e1ad2 100644 (file)
@@ -61,7 +61,6 @@ web-platform-tests/cors [ Skip ]
 web-platform-tests/custom-elements [ Skip ]
 #web-platform-tests/dom [ Pass ]
 web-platform-tests/dom/events/Event-dispatch-propagation-stopped.html [ Skip ]
-web-platform-tests/dom/nodes/Document-createElement-namespace-tests [ Skip ]
 web-platform-tests/dom/nodes/Document-createProcessingInstruction.xhtml [ Skip ]
 web-platform-tests/dom/nodes/Document-getElementsByTagName.xhtml [ Skip ]
 web-platform-tests/dom/nodes/Element-childElement-null.svg [ Skip ]
@@ -102,99 +101,13 @@ web-platform-tests/hr-time [ Skip ]
 #web-platform-tests/html [ Pass ]
 web-platform-tests/html/browsers [ Skip ]
 web-platform-tests/html/dom/documents/dom-tree-accessors/Document.currentScript.sub.html [ Skip ]
-web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/010.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-EN-L-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-EN-L-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-EN-R-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-EN-R-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-L-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-L-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-N-EN-L-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-N-EN-L-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-N-EN-R-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-N-EN-R-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-N-EN-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-N-EN-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-N-L-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-N-L-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-N-R-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-N-R-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-R-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-R-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-L-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-L-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-R-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-R-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-bdi-L-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-bdi-L-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-bdi-R-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-bdi-R-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-dir-L-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-dir-L-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-dir-R-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-dir-R-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-L-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-L-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-R-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-R-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-script-L-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-script-L-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-script-R-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-script-R-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-style-L-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-style-L-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-style-R-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-style-R-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-textarea-L-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-textarea-L-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-textarea-R-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-textarea-R-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-EN-L-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-EN-L-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-EN-R-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-EN-R-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-L-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-L-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-N-EN-L-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-N-EN-L-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-N-EN-R-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-N-EN-R-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-N-EN-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-N-EN-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-N-L-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-N-L-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-N-R-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-N-R-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-R-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-R-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-EN-L-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-EN-L-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-EN-R-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-EN-R-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-L-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-L-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-L-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-L-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-R-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-R-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-N-L-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-N-L-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-N-R-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-N-R-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-R-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-R-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-isolate-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-isolate-ref.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs-ref-expected.html [ Skip ]
-web-platform-tests/html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs-ref.html [ Skip ]
 web-platform-tests/html/dom/reflection-embedded.html [ Skip ]
 web-platform-tests/html/dom/reflection-forms.html [ Skip ]
 web-platform-tests/html/dom/reflection-grouping.html [ Skip ]
 web-platform-tests/html/dom/reflection-metadata.html [ Skip ]
 web-platform-tests/html/dom/reflection-misc.html [ Skip ]
 web-platform-tests/html/dom/reflection-obsolete.html [ Skip ]
+web-platform-tests/html/dom/reflection-original.html [ Skip ]
 web-platform-tests/html/dom/reflection-sections.html [ Skip ]
 web-platform-tests/html/dom/reflection-tabular.html [ Skip ]
 web-platform-tests/html/dom/reflection-text.html [ Skip ]
@@ -203,50 +116,15 @@ web-platform-tests/html/iana [ Skip ]
 web-platform-tests/html/infrastructure [ Skip ]
 web-platform-tests/html/obsolete [ Skip ]
 web-platform-tests/html/rendering [ Skip ]
+
 web-platform-tests/html/semantics/document-metadata/styling/LinkStyle.html [ Skip ]
+web-platform-tests/html/semantics/embedded-content/media-elements/error-codes [ Skip ]
+web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource [ Skip ]
+web-platform-tests/html/semantics/embedded-content/the-iframe-element [ Skip ]
+web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/cors [ Skip ]
+web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-04.html [ Skip ]
 web-platform-tests/html/semantics/embedded-content/media-elements/audio_loop_base.html [ Skip ]
 web-platform-tests/html/semantics/embedded-content/media-elements/error-codes [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/autoplay-overrides-preload.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/load-events-networkState.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/load-removes-queued-error-event.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-candidate-insert-before.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-candidate-moved.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-candidate-remove-addEventListener.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-candidate-remove-no-listener.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-candidate-remove-onerror.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-audio-constructor-no-src.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-audio-constructor.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-in-sync-event.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-insert-fragment-into-document.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-insert-into-document.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-insert-into-iframe.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-insert-parent-into-document.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-insert-source-in-div.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-insert-source-in-namespace.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-insert-source-networkState.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-insert-source-not-in-document.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-insert-source.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-load.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-pause-networkState.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-pause.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-play.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-remove-from-document-networkState.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-remove-from-document.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-remove-src.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-set-src-in-namespace.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-set-src-networkState.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-set-src-not-in-document.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-set-src.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-pointer-control.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-pointer-insert-br.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-pointer-insert-source.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-pointer-insert-text.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-pointer-remove-source-after.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-pointer-remove-source.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-pointer-remove-text.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-remove-source.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-remove-src.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-source-media.html [ Skip ]
 web-platform-tests/html/semantics/embedded-content/media-elements/location-of-the-media-resource/currentSrc.html [ Skip ]
 web-platform-tests/html/semantics/embedded-content/media-elements/networkState_during_progress.html [ Skip ]
 web-platform-tests/html/semantics/embedded-content/media-elements/offsets-into-the-media-resource/currentTime.html [ Skip ]
@@ -260,8 +138,8 @@ web-platform-tests/html/semantics/embedded-content/media-elements/synchronising-
 web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/cloneNode.html [ Skip ]
 web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/cors [ Skip ]
 web-platform-tests/html/semantics/embedded-content/media-elements/video_loop_base.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-04-expected.html [ Skip ]
-web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-04.html [ Skip ]
+web-platform-tests/html/semantics/embedded-content/the-area-element/area_nohref.xhtml [ Skip ]
+web-platform-tests/html/semantics/embedded-content/the-area-element/test-area.xhtml [ Skip ]
 web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html [ Skip ]
 web-platform-tests/html/semantics/embedded-content/the-object-element/object-events.html [ Skip ]
 web-platform-tests/html/semantics/forms/textfieldselection/select-event.html [ Skip ]
@@ -330,3 +208,5 @@ web-platform-tests/websockets [ Skip ]
 web-platform-tests/webstorage [ Skip ]
 web-platform-tests/webvtt [ Skip ]
 web-platform-tests/workers [ Skip ]
+
+web-platform-tests/testharness_runner.html [ Skip ]
index edd24e49667d849a2737bffbfbbe3d5677ffc9ff..43ed5da6fef85284abeab28b349578fa52e58281 100644 (file)
@@ -1,3 +1,28 @@
+2015-10-21  Youenn Fablet  <youenn.fablet@crf.canon.fr>
+
+        W3C test importer should not import reference files as regular tests
+        https://bugs.webkit.org/show_bug.cgi?id=150331
+
+        Reviewed by Darin Adler.
+
+        Updated test_parser to return information that a file can be a referencefile or a manual test.
+        Updated test importer to skip those files.
+        Updated/Added test parser unit tests accordingly.
+
+        Updated test importer to import all not-test files, as they are usually used by tests and lead to test failing or timing out.
+        Updated test importer to log these 'resource' files that are not in a resources folder, and suggest to import script user
+        to mark these files as Skip, since they are not direct tests. 
+
+        * Scripts/webkitpy/w3c/test_importer.py:
+        (TestImporter.__init__):
+        (TestImporter.find_importable_tests):
+        (TestImporter.import_tests):
+        * Scripts/webkitpy/w3c/test_parser.py:
+        (TestParser.analyze_test):
+        * Scripts/webkitpy/w3c/test_parser_unittest.py:
+        (test_analyze_non_html_file):
+        (test_reference_test):
+
 2015-10-20  Aakash Jain  <aakash_jain@apple.com>
 
         run-webkit-tests does not copy all crash logs for layout test failures on iOS
index 67673630c3d249f1f4f6d40eea7eaa51e5be51a3..4a26ff781c6718eda33e52dcb032adc692c09a12 100644 (file)
@@ -166,11 +166,14 @@ class TestImporter(object):
         self._webkit_root = webkit_finder.webkit_base()
 
         self.destination_directory = webkit_finder.path_from_webkit_base("LayoutTests", options.destination)
-        self.layout_tests_w3c_path = webkit_finder.path_from_webkit_base('LayoutTests', 'imported', 'w3c')
+        self.tests_w3c_relative_path = self.filesystem.join('imported', 'w3c')
+        self.layout_tests_w3c_path = webkit_finder.path_from_webkit_base('LayoutTests', self.tests_w3c_relative_path)
         self.tests_download_path = webkit_finder.path_from_webkit_base('WebKitBuild', 'w3c-tests')
 
         self._test_downloader = None
 
+        self._potential_test_resource_files = []
+
         self.import_list = []
         self._importing_downloaded_tests = source_directory is None
 
@@ -253,9 +256,17 @@ class TestImporter(object):
                 test_parser = TestParser(vars(self.options), filename=fullpath, host=self.host)
                 test_info = test_parser.analyze_test()
                 if test_info is None:
-                    # If html file is in a "resources" folder, it should be copied anyway
-                    if self.filesystem.basename(self.filesystem.dirname(fullpath)) == "resources":
-                        copy_list.append({'src': fullpath, 'dest': filename})
+                    # This is probably a resource file.
+                    if self.filesystem.basename(self.filesystem.dirname(fullpath)) != "resources":
+                        self._potential_test_resource_files.append({'src': fullpath, 'dest': filename})
+                    copy_list.append({'src': fullpath, 'dest': filename})
+                    continue
+
+                if 'manualtest' in test_info.keys():
+                    continue
+
+                if 'referencefile' in test_info.keys():
+                    # Skip it since, the corresponding reference test should have a link to this file
                     continue
 
                 if 'reference' in test_info.keys():
@@ -413,6 +424,11 @@ class TestImporter(object):
         for prefixed_value in sorted(total_prefixed_property_values, key=lambda p: total_prefixed_property_values[p]):
             _log.info('  %s: %s', prefixed_value, total_prefixed_property_values[prefixed_value])
 
+        if self._potential_test_resource_files:
+            _log.info('The following files may be resource files and should be marked as skipped in the TestExpectations:')
+            for filename in sorted([test['src'] for test in self._potential_test_resource_files]):
+                _log.info(filename.replace(self.source_directory, self.tests_w3c_relative_path) + ' [ Skip ]')
+
     def remove_deleted_files(self, import_directory, new_file_list):
         """ Reads an import log in |import_directory|, compares it to the |new_file_list|, and removes files not in the new list."""
 
index b88ff486713138bb0151651651430ada5cc3359a..4272d303235620c800deff24b36f4566fb7502f8 100644 (file)
@@ -95,6 +95,9 @@ class TestParser(object):
                 _log.error('%s has a reference link but is missing the "href"', self.filesystem)
                 return None
 
+            if (ref_file == self.filename):
+                return {'referencefile': self.filename}
+
             if self.ref_doc is None:
                 self.load_file(ref_file, True)
 
@@ -114,10 +117,12 @@ class TestParser(object):
             test_info['reference_support_info'] = {}
         # we check for wpt manual test before checking for jstest, as some WPT manual tests can be classified as CSS JS tests
         elif self.is_wpt_manualtest():
-            test_info = None
+            test_info = {'test': self.filename, 'manualtest': True}
         elif self.is_jstest():
             test_info = {'test': self.filename, 'jstest': True}
-        elif self.options['all'] is True and not('-ref' in self.filename) and not('reference' in self.filename):
+        elif '-ref' in self.filename or 'reference' in self.filename:
+            test_info = {'referencefile': self.filename}
+        elif self.options['all'] is True:
             test_info = {'test': self.filename}
 
         return test_info
index f557abd454631085742c8f0ca68d30a52a14002b..580a991d5490d9580da0d55fff90b720ec0886d1 100644 (file)
@@ -166,7 +166,7 @@ class TestParserTest(unittest.TestCase):
         parser = TestParser(options, os.path.join(test_path, 'somefile-manual.html'))
         test_info = parser.analyze_test(test_contents=test_html)
 
-        self.assertEqual(test_info, None, 'test_info is None')
+        self.assertTrue(test_info['manualtest'], 'test_info is None')
 
     def test_analyze_pixel_test_all_true(self):
         """ Tests analyze_test() using a test that is neither a reftest or jstest with all=False """
@@ -228,3 +228,26 @@ CONTENT OF TEST
         parser = TestParser(options, os.path.join(os.path.dirname(__file__), 'test_parser.py'))
         test_info = parser.analyze_test()
         self.assertEqual(test_info, None, 'no tests should have been found in this file')
+
+    def test_reference_test(self):
+        """ Tests analyze_test() using a test that is a reference file having a <link rel="match"> tag"""
+
+        test_html = """<html>
+<head>
+<title>CSS Test: DESCRIPTION OF TEST</title>
+<link rel="match" href="test-ref.html" />
+<link rel="author" title="NAME_OF_AUTHOR" />
+<style type="text/css"><![CDATA[
+CSS FOR TEST
+]]></style>
+</head>
+<body>
+CONTENT OF TEST
+</body>
+</html>
+"""
+        test_path = os.path.join(os.path.sep, 'some', 'madeup', 'path')
+        parser = TestParser(options, os.path.join(test_path, 'test-ref.html'))
+        test_info = parser.analyze_test(test_contents=test_html)
+
+        self.assertTrue('referencefile' in test_info, 'test should be detected as reference file')