dom/imptests/updateTestharness.py

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/imptests/updateTestharness.py	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,25 @@
     1.4 +#!/usr/bin/env python
     1.5 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.6 +# License, v. 2.0. If a copy of the MPL was not distributed with this file,
     1.7 +# You can obtain one at http://mozilla.org/MPL/2.0/.
     1.8 +
     1.9 +from __future__ import unicode_literals
    1.10 +
    1.11 +import subprocess
    1.12 +
    1.13 +repo = "https://github.com/w3c/testharness.js"
    1.14 +dest = "resources-upstream"
    1.15 +files = [{"f":"testharness.js"},
    1.16 +         {"f":"testharness.css"},
    1.17 +         {"f":"idlharness.js"},
    1.18 +         {"d":"webidl2/lib/webidl2.js", "f":"WebIDLParser.js"}]
    1.19 +
    1.20 +subprocess.check_call(["git", "clone", repo, dest])
    1.21 +subprocess.check_call(["git", "submodule", "init"], cwd=dest)
    1.22 +subprocess.check_call(["git", "submodule", "update"], cwd=dest)
    1.23 +for f in files:
    1.24 +    path = f["d"] if "d" in f else f["f"]
    1.25 +    subprocess.check_call(["cp", "%s/%s" % (dest, path), f["f"]])
    1.26 +    subprocess.check_call(["hg", "add", f["f"]])
    1.27 +subprocess.check_call(["rm", "-rf", dest])
    1.28 +

mercurial