1[
2  {
3    "cmd": [
4      "python",
5      "-u",
6      "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n  if os.path.exists(path):\n    print \"%s exists but is not a dir\" % path\n    sys.exit(1)\n  os.makedirs(path, mode)\n",
7      "[CUSTOM_C:\\_B_WORK]",
8      "511"
9    ],
10    "infra_step": true,
11    "name": "makedirs checkout_path",
12    "~followup_annotations": [
13      "@@@STEP_LOG_LINE@python.inline@@@@",
14      "@@@STEP_LOG_LINE@python.inline@import sys, os@@@",
15      "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@",
16      "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@",
17      "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@",
18      "@@@STEP_LOG_LINE@python.inline@  if os.path.exists(path):@@@",
19      "@@@STEP_LOG_LINE@python.inline@    print \"%s exists but is not a dir\" % path@@@",
20      "@@@STEP_LOG_LINE@python.inline@    sys.exit(1)@@@",
21      "@@@STEP_LOG_LINE@python.inline@  os.makedirs(path, mode)@@@",
22      "@@@STEP_LOG_END@python.inline@@@"
23    ]
24  },
25  {
26    "cmd": [
27      "python",
28      "-u",
29      "RECIPE_MODULE[depot_tools::bot_update]\\resources\\bot_update.py",
30      "--spec",
31      "cache_dir = '[CUSTOM_C:\\\\_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]",
32      "--patch_root",
33      "skia",
34      "--revision_mapping_file",
35      "{\"skia\": \"got_revision\"}",
36      "--git-cache-dir",
37      "[CUSTOM_C:\\_B_CACHE]",
38      "--gerrit_repo",
39      "https://skia.googlesource.com/skia.git",
40      "--gerrit_ref",
41      "refs/changes/89/456789/12",
42      "--output_json",
43      "/path/to/tmp/json",
44      "--revision",
45      "skia@abc123",
46      "--output_manifest"
47    ],
48    "cwd": "[CUSTOM_C:\\_B_WORK]",
49    "env": {
50      "GIT_HTTP_LOW_SPEED_LIMIT": "1000",
51      "GIT_HTTP_LOW_SPEED_TIME": "300",
52      "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]"
53    },
54    "infra_step": true,
55    "name": "bot_update",
56    "~followup_annotations": [
57      "@@@STEP_TEXT@Some step text@@@",
58      "@@@STEP_LOG_LINE@json.output@{@@@",
59      "@@@STEP_LOG_LINE@json.output@  \"did_run\": true, @@@",
60      "@@@STEP_LOG_LINE@json.output@  \"fixed_revisions\": {@@@",
61      "@@@STEP_LOG_LINE@json.output@    \"skia\": \"abc123\"@@@",
62      "@@@STEP_LOG_LINE@json.output@  }, @@@",
63      "@@@STEP_LOG_LINE@json.output@  \"manifest\": {@@@",
64      "@@@STEP_LOG_LINE@json.output@    \"skia\": {@@@",
65      "@@@STEP_LOG_LINE@json.output@      \"repository\": \"https://fake.org/skia.git\", @@@",
66      "@@@STEP_LOG_LINE@json.output@      \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@",
67      "@@@STEP_LOG_LINE@json.output@    }@@@",
68      "@@@STEP_LOG_LINE@json.output@  }, @@@",
69      "@@@STEP_LOG_LINE@json.output@  \"patch_failure\": false, @@@",
70      "@@@STEP_LOG_LINE@json.output@  \"patch_root\": \"skia\", @@@",
71      "@@@STEP_LOG_LINE@json.output@  \"properties\": {@@@",
72      "@@@STEP_LOG_LINE@json.output@    \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@",
73      "@@@STEP_LOG_LINE@json.output@    \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@",
74      "@@@STEP_LOG_LINE@json.output@  }, @@@",
75      "@@@STEP_LOG_LINE@json.output@  \"root\": \"skia\", @@@",
76      "@@@STEP_LOG_LINE@json.output@  \"step_text\": \"Some step text\"@@@",
77      "@@@STEP_LOG_LINE@json.output@}@@@",
78      "@@@STEP_LOG_END@json.output@@@",
79      "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@",
80      "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@"
81    ]
82  },
83  {
84    "cmd": [
85      "python",
86      "-u",
87      "\nimport sys, os\npath = sys.argv[1]\nmode = int(sys.argv[2])\nif not os.path.isdir(path):\n  if os.path.exists(path):\n    print \"%s exists but is not a dir\" % path\n    sys.exit(1)\n  os.makedirs(path, mode)\n",
88      "[START_DIR]\\tmp",
89      "511"
90    ],
91    "infra_step": true,
92    "name": "makedirs tmp_dir",
93    "~followup_annotations": [
94      "@@@STEP_LOG_LINE@python.inline@@@@",
95      "@@@STEP_LOG_LINE@python.inline@import sys, os@@@",
96      "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@",
97      "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@",
98      "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@",
99      "@@@STEP_LOG_LINE@python.inline@  if os.path.exists(path):@@@",
100      "@@@STEP_LOG_LINE@python.inline@    print \"%s exists but is not a dir\" % path@@@",
101      "@@@STEP_LOG_LINE@python.inline@    sys.exit(1)@@@",
102      "@@@STEP_LOG_LINE@python.inline@  os.makedirs(path, mode)@@@",
103      "@@@STEP_LOG_END@python.inline@@@"
104    ]
105  },
106  {
107    "cmd": [
108      "python",
109      "-u",
110      "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\fetch-gn"
111    ],
112    "cwd": "[CUSTOM_C:\\_B_WORK]\\skia",
113    "env": {
114      "BUILDTYPE": "Debug",
115      "CHROME_HEADLESS": "1",
116      "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]",
117      "SKIA_OUT": "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug"
118    },
119    "infra_step": true,
120    "name": "fetch-gn"
121  },
122  {
123    "cmd": [
124      "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\gn.exe",
125      "gen",
126      "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug\\Debug",
127      "--args=target_cpu=\"x86\" windk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\d3cb0e37bdd120ad0ac4650b674b09e81be45616\""
128    ],
129    "cwd": "[CUSTOM_C:\\_B_WORK]\\skia",
130    "env": {
131      "BUILDTYPE": "Debug",
132      "CHROME_HEADLESS": "1",
133      "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]",
134      "SKIA_OUT": "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug"
135    },
136    "name": "gn gen"
137  },
138  {
139    "cmd": [
140      "ninja.exe",
141      "-C",
142      "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug\\Debug"
143    ],
144    "cwd": "[CUSTOM_C:\\_B_WORK]\\skia",
145    "env": {
146      "BUILDTYPE": "Debug",
147      "CHROME_HEADLESS": "1",
148      "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]",
149      "SKIA_OUT": "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug"
150    },
151    "name": "ninja"
152  },
153  {
154    "cmd": [
155      "python",
156      "-u",
157      "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n  os.makedirs(dst)\nexcept OSError as e:\n  if e.errno != errno.EEXIST:\n    raise\n\nfor pattern in build_products_whitelist:\n  path = os.path.join(src, pattern)\n  for f in glob.glob(path):\n    dst_path = os.path.join(dst, os.path.relpath(f, src))\n    if not os.path.isdir(os.path.dirname(dst_path)):\n      os.makedirs(os.path.dirname(dst_path))\n    print 'Copying build product %s to %s' % (f, dst_path)\n    shutil.move(f, dst_path)\n",
158      "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug\\Debug",
159      "[CUSTOM_[SWARM_OUT_DIR]]\\out\\Debug"
160    ],
161    "infra_step": true,
162    "name": "copy build products",
163    "~followup_annotations": [
164      "@@@STEP_LOG_LINE@python.inline@import errno@@@",
165      "@@@STEP_LOG_LINE@python.inline@import glob@@@",
166      "@@@STEP_LOG_LINE@python.inline@import os@@@",
167      "@@@STEP_LOG_LINE@python.inline@import shutil@@@",
168      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
169      "@@@STEP_LOG_LINE@python.inline@@@@",
170      "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@",
171      "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@",
172      "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@",
173      "@@@STEP_LOG_LINE@python.inline@@@@",
174      "@@@STEP_LOG_LINE@python.inline@try:@@@",
175      "@@@STEP_LOG_LINE@python.inline@  os.makedirs(dst)@@@",
176      "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@",
177      "@@@STEP_LOG_LINE@python.inline@  if e.errno != errno.EEXIST:@@@",
178      "@@@STEP_LOG_LINE@python.inline@    raise@@@",
179      "@@@STEP_LOG_LINE@python.inline@@@@",
180      "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@",
181      "@@@STEP_LOG_LINE@python.inline@  path = os.path.join(src, pattern)@@@",
182      "@@@STEP_LOG_LINE@python.inline@  for f in glob.glob(path):@@@",
183      "@@@STEP_LOG_LINE@python.inline@    dst_path = os.path.join(dst, os.path.relpath(f, src))@@@",
184      "@@@STEP_LOG_LINE@python.inline@    if not os.path.isdir(os.path.dirname(dst_path)):@@@",
185      "@@@STEP_LOG_LINE@python.inline@      os.makedirs(os.path.dirname(dst_path))@@@",
186      "@@@STEP_LOG_LINE@python.inline@    print 'Copying build product %s to %s' % (f, dst_path)@@@",
187      "@@@STEP_LOG_LINE@python.inline@    shutil.move(f, dst_path)@@@",
188      "@@@STEP_LOG_END@python.inline@@@"
189    ]
190  },
191  {
192    "cmd": [
193      "python",
194      "-u",
195      "import psutil\nfor p in psutil.process_iter():\n  try:\n    if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):\n      p.kill()\n  except psutil._error.AccessDenied:\n    pass\n"
196    ],
197    "infra_step": true,
198    "name": "cleanup",
199    "~followup_annotations": [
200      "@@@STEP_LOG_LINE@python.inline@import psutil@@@",
201      "@@@STEP_LOG_LINE@python.inline@for p in psutil.process_iter():@@@",
202      "@@@STEP_LOG_LINE@python.inline@  try:@@@",
203      "@@@STEP_LOG_LINE@python.inline@    if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):@@@",
204      "@@@STEP_LOG_LINE@python.inline@      p.kill()@@@",
205      "@@@STEP_LOG_LINE@python.inline@  except psutil._error.AccessDenied:@@@",
206      "@@@STEP_LOG_LINE@python.inline@    pass@@@",
207      "@@@STEP_LOG_END@python.inline@@@"
208    ]
209  },
210  {
211    "name": "$result",
212    "recipe_result": null,
213    "status_code": 0
214  }
215]