Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / dom / canvas / test / webgl-conf / import.py
blobdbf49cb15488e1d7e6a1694343e8c242e194aa03
1 #! /usr/bin/env python3
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 assert __name__ == "__main__"
9 import shutil
10 import sys
11 from pathlib import Path
13 REL_PATH = "/dom/canvas/test/webgl-conf"
14 REPO_DIR = Path.cwd()
15 DIR_IN_GECKO = Path(__file__).parent
16 assert not REPO_DIR.samefile(
17 DIR_IN_GECKO
18 ), "Run this script from the source git checkout."
19 assert DIR_IN_GECKO.as_posix().endswith(REL_PATH) # Be paranoid with rm -rf.
21 gecko_base_dir = DIR_IN_GECKO.as_posix()[: -len(REL_PATH)]
22 angle_dir = Path(gecko_base_dir, "gfx/angle").as_posix()
23 sys.path.append(angle_dir)
24 from vendor_from_git import print_now, record_cherry_picks
26 # --
28 (MERGE_BASE_ORIGIN,) = sys.argv[1:] # Not always 'origin'!
29 record_cherry_picks(DIR_IN_GECKO, MERGE_BASE_ORIGIN)
31 # --
33 src_dir = Path(REPO_DIR, "sdk/tests")
34 dest_dir = Path(DIR_IN_GECKO, "checkout")
35 print_now("Nuking old checkout...")
36 shutil.rmtree(dest_dir, True)
37 print_now("Writing new checkout...")
38 shutil.copytree(src_dir, dest_dir, copy_function=shutil.copy)
40 print_now("Done!")