Skip to content

Commit 454b173

Browse files
committed
Merge pull request #18 from w3c/jgraham/license_copy
Add BSD license to tests when doing an update to indicate that's what's ...
2 parents 6f3a8a1 + ff57d82 commit 454b173

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

wptrunner/update.py

+36
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,36 @@
1717

1818
base_path = os.path.abspath(os.path.split(__file__)[0])
1919

20+
bsd_license = """W3C 3-clause BSD License
21+
22+
Redistribution and use in source and binary forms, with or without
23+
modification, are permitted provided that the following conditions are
24+
met:
25+
26+
* Redistributions of works must retain the original copyright notice, this
27+
list of conditions and the following disclaimer.
28+
29+
* Redistributions in binary form must reproduce the original copyright
30+
notice, this list of conditions and the following disclaimer in the
31+
documentation and/or other materials provided with the distribution.
32+
33+
* Neither the name of the W3C nor the names of its contributors may be
34+
used to endorse or promote products derived from this work without
35+
specific prior written permission.
36+
37+
38+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
39+
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
40+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
41+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
42+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
43+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
44+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
45+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
46+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
47+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
48+
POSSIBILITY OF SUCH DAMAGE.
49+
"""
2050

2151
def do_test_relative_imports(test_root):
2252
global manifest
@@ -119,6 +149,12 @@ def copy_work_tree(self, dest):
119149
dest_path = os.path.join(dest, destination, os.path.split(source)[1])
120150
shutil.copy2(source_path, dest_path)
121151

152+
self.add_license(dest)
153+
154+
def add_license(self, dest):
155+
with open(os.path.join(dest, "LICENSE"), "w") as f:
156+
f.write(bsd_license)
157+
122158

123159
class NoVCSTree(object):
124160
name = "non-vcs"

0 commit comments

Comments
 (0)