Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(603)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py

Issue 2016953002: update-w3c-deps: Do not rewrite links to /resources and /common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 1 # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions 4 # modification, are permitted provided that the following conditions
5 # are met: 5 # are met:
6 # 6 #
7 # 1. Redistributions of source code must retain the above 7 # 1. Redistributions of source code must retain the above
8 # copyright notice, this list of conditions and the following 8 # copyright notice, this list of conditions and the following
9 # disclaimer. 9 # disclaimer.
10 # 2. Redistributions in binary form must reproduce the above 10 # 2. Redistributions in binary form must reproduce the above
11 # copyright notice, this list of conditions and the following 11 # copyright notice, this list of conditions and the following
12 # disclaimer in the documentation and/or other materials 12 # disclaimer in the documentation and/or other materials
13 # provided with the distribution. 13 # provided with the distribution.
14 # 14 #
15 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY 15 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
16 # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 17 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE 18 # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
19 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 19 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
20 # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 20 # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 21 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22 # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 23 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
24 # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 24 # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
25 # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 # SUCH DAMAGE. 26 # SUCH DAMAGE.
27 27
28 """ 28 """
29 This script imports a directory of W3C tests into WebKit. 29 This script imports a directory of W3C tests into Blink.
30 30
31 This script will import the tests into WebKit following these rules: 31 This script will import the tests into WebKit following these rules:
32 32
33 - By default, all tests are imported under LayoutTests/w3c/[repo-name]. 33 - By default, all tests are imported under LayoutTests/imported/[repo-name].
qyearsley 2016/05/27 00:19:36 Technically, the default destination dir of import
tkent 2016/05/27 00:29:06 ok, I'll revert to "w3c"
34 34
35 - By default, only reftests and jstest are imported. This can be overridden 35 - By default, only reftests and jstest are imported. This can be overridden
36 with a -a or --all argument 36 with a -a or --all argument
37 37
38 - Also by default, if test files by the same name already exist in the 38 - Also by default, if test files by the same name already exist in the
39 destination directory, they are overwritten with the idea that running 39 destination directory, they are overwritten with the idea that running
40 this script would refresh files periodically. This can also be 40 this script would refresh files periodically. This can also be
41 overridden by a -n or --no-overwrite flag 41 overridden by a -n or --no-overwrite flag
42 42
43 - All files are converted to work in WebKit: 43 - All files are converted to work in Blink:
44 1. Paths to testharness.js scripts and vendor-prefix.js files are 44 1. All CSS properties requiring the -webkit- vendor prefix are prefixed
45 modified to point to Webkit's copy of them in LayoutTests/resources, 45 (the list of what needs prefixes is read from Source/core/css/CSSPro perties.in).
46 using the correct relative path from the new location. 46 2. Each reftest has its own copy of its reference file following
47 2. All CSS properties requiring the -webkit-vendor prefix are prefixed
48 (the list of what needs prefixes is read from Source/WebCore/CSS/CSS Properties.in).
49 3. Each reftest has its own copy of its reference file following
50 the naming conventions new-run-webkit-tests expects. 47 the naming conventions new-run-webkit-tests expects.
51 4. If a reference files lives outside the directory of the test that 48 3. If a reference files lives outside the directory of the test that
52 uses it, it is checked for paths to support files as it will be 49 uses it, it is checked for paths to support files as it will be
53 imported into a different relative position to the test file 50 imported into a different relative position to the test file
54 (in the same directory). 51 (in the same directory).
55 5. Any tags with the class "instructions" have style="display:none" add ed 52 4. Any tags with the class "instructions" have style="display:none" add ed
56 to them. Some w3c tests contain instructions to manual testers which we 53 to them. Some w3c tests contain instructions to manual testers which we
57 want to strip out (the test result parser only recognizes pure testh arness.js 54 want to strip out (the test result parser only recognizes pure testh arness.js
58 output and not those instructions). 55 output and not those instructions).
59 56
60 - Upon completion, script outputs the total number tests imported, broken 57 - Upon completion, script outputs the total number tests imported, broken
61 down by test type 58 down by test type
62 59
63 - Also upon completion, if we are not importing the files in place, each 60 - Also upon completion, if we are not importing the files in place, each
64 directory where files are imported will have a w3c-import.log file writte n with 61 directory where files are imported will have a w3c-import.log file writte n with
65 a timestamp, the list of CSS properties used that require prefixes, the l ist 62 a timestamp, the list of CSS properties used that require prefixes, the l ist
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 """ Creates a destination directory that mirrors that of the source dire ctory """ 415 """ Creates a destination directory that mirrors that of the source dire ctory """
419 416
420 new_subpath = self.dir_to_import[len(self.top_of_repo):] 417 new_subpath = self.dir_to_import[len(self.top_of_repo):]
421 418
422 destination_directory = self.filesystem.join(self.destination_directory, new_subpath) 419 destination_directory = self.filesystem.join(self.destination_directory, new_subpath)
423 420
424 if not self.filesystem.exists(destination_directory): 421 if not self.filesystem.exists(destination_directory):
425 self.filesystem.maybe_make_directory(destination_directory) 422 self.filesystem.maybe_make_directory(destination_directory)
426 423
427 _log.info('Tests will be imported into: %s', destination_directory) 424 _log.info('Tests will be imported into: %s', destination_directory)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698