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      "--issue",
39      "500",
40      "--patchset",
41      "1",
42      "--rietveld_server",
43      "https://codereview.chromium.org",
44      "--output_json",
45      "/path/to/tmp/json",
46      "--revision",
47      "skia@abc123",
48      "--output_manifest"
49    ],
50    "cwd": "[CUSTOM_C:\\_B_WORK]",
51    "env": {
52      "GIT_HTTP_LOW_SPEED_LIMIT": "1000",
53      "GIT_HTTP_LOW_SPEED_TIME": "300",
54      "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]"
55    },
56    "infra_step": true,
57    "name": "bot_update",
58    "~followup_annotations": [
59      "@@@STEP_TEXT@Some step text@@@",
60      "@@@STEP_LOG_LINE@json.output@{@@@",
61      "@@@STEP_LOG_LINE@json.output@  \"did_run\": true, @@@",
62      "@@@STEP_LOG_LINE@json.output@  \"fixed_revisions\": {@@@",
63      "@@@STEP_LOG_LINE@json.output@    \"skia\": \"abc123\"@@@",
64      "@@@STEP_LOG_LINE@json.output@  }, @@@",
65      "@@@STEP_LOG_LINE@json.output@  \"manifest\": {@@@",
66      "@@@STEP_LOG_LINE@json.output@    \"skia\": {@@@",
67      "@@@STEP_LOG_LINE@json.output@      \"repository\": \"https://fake.org/skia.git\", @@@",
68      "@@@STEP_LOG_LINE@json.output@      \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@",
69      "@@@STEP_LOG_LINE@json.output@    }@@@",
70      "@@@STEP_LOG_LINE@json.output@  }, @@@",
71      "@@@STEP_LOG_LINE@json.output@  \"patch_failure\": false, @@@",
72      "@@@STEP_LOG_LINE@json.output@  \"patch_root\": \"skia\", @@@",
73      "@@@STEP_LOG_LINE@json.output@  \"properties\": {@@@",
74      "@@@STEP_LOG_LINE@json.output@    \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@",
75      "@@@STEP_LOG_LINE@json.output@    \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@",
76      "@@@STEP_LOG_LINE@json.output@  }, @@@",
77      "@@@STEP_LOG_LINE@json.output@  \"root\": \"skia\", @@@",
78      "@@@STEP_LOG_LINE@json.output@  \"step_text\": \"Some step text\"@@@",
79      "@@@STEP_LOG_LINE@json.output@}@@@",
80      "@@@STEP_LOG_END@json.output@@@",
81      "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@",
82      "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@"
83    ]
84  },
85  {
86    "cmd": [
87      "python",
88      "-u",
89      "\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",
90      "[START_DIR]\\tmp",
91      "511"
92    ],
93    "infra_step": true,
94    "name": "makedirs tmp_dir",
95    "~followup_annotations": [
96      "@@@STEP_LOG_LINE@python.inline@@@@",
97      "@@@STEP_LOG_LINE@python.inline@import sys, os@@@",
98      "@@@STEP_LOG_LINE@python.inline@path = sys.argv[1]@@@",
99      "@@@STEP_LOG_LINE@python.inline@mode = int(sys.argv[2])@@@",
100      "@@@STEP_LOG_LINE@python.inline@if not os.path.isdir(path):@@@",
101      "@@@STEP_LOG_LINE@python.inline@  if os.path.exists(path):@@@",
102      "@@@STEP_LOG_LINE@python.inline@    print \"%s exists but is not a dir\" % path@@@",
103      "@@@STEP_LOG_LINE@python.inline@    sys.exit(1)@@@",
104      "@@@STEP_LOG_LINE@python.inline@  os.makedirs(path, mode)@@@",
105      "@@@STEP_LOG_END@python.inline@@@"
106    ]
107  },
108  {
109    "cmd": [
110      "python",
111      "-u",
112      "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\fetch-gn"
113    ],
114    "cwd": "[CUSTOM_C:\\_B_WORK]\\skia",
115    "env": {
116      "BUILDTYPE": "Debug",
117      "CHROME_HEADLESS": "1",
118      "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]",
119      "SKIA_OUT": "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug"
120    },
121    "infra_step": true,
122    "name": "fetch-gn"
123  },
124  {
125    "cmd": [
126      "[CUSTOM_C:\\_B_WORK]\\skia\\bin\\gn.exe",
127      "gen",
128      "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug\\Debug",
129      "--args=target_cpu=\"x86\" windk=\"[START_DIR]\\t\\depot_tools\\win_toolchain\\vs_files\\d3cb0e37bdd120ad0ac4650b674b09e81be45616\""
130    ],
131    "cwd": "[CUSTOM_C:\\_B_WORK]\\skia",
132    "env": {
133      "BUILDTYPE": "Debug",
134      "CHROME_HEADLESS": "1",
135      "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]",
136      "SKIA_OUT": "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug"
137    },
138    "name": "gn gen"
139  },
140  {
141    "cmd": [
142      "ninja.exe",
143      "-C",
144      "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug\\Debug"
145    ],
146    "cwd": "[CUSTOM_C:\\_B_WORK]\\skia",
147    "env": {
148      "BUILDTYPE": "Debug",
149      "CHROME_HEADLESS": "1",
150      "PATH": "%(PATH)s;RECIPE_PACKAGE_REPO[depot_tools]",
151      "SKIA_OUT": "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug"
152    },
153    "name": "ninja"
154  },
155  {
156    "cmd": [
157      "python",
158      "-u",
159      "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",
160      "[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Debug\\Debug",
161      "[CUSTOM_[SWARM_OUT_DIR]]\\out\\Debug"
162    ],
163    "infra_step": true,
164    "name": "copy build products",
165    "~followup_annotations": [
166      "@@@STEP_LOG_LINE@python.inline@import errno@@@",
167      "@@@STEP_LOG_LINE@python.inline@import glob@@@",
168      "@@@STEP_LOG_LINE@python.inline@import os@@@",
169      "@@@STEP_LOG_LINE@python.inline@import shutil@@@",
170      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
171      "@@@STEP_LOG_LINE@python.inline@@@@",
172      "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@",
173      "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@",
174      "@@@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']@@@",
175      "@@@STEP_LOG_LINE@python.inline@@@@",
176      "@@@STEP_LOG_LINE@python.inline@try:@@@",
177      "@@@STEP_LOG_LINE@python.inline@  os.makedirs(dst)@@@",
178      "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@",
179      "@@@STEP_LOG_LINE@python.inline@  if e.errno != errno.EEXIST:@@@",
180      "@@@STEP_LOG_LINE@python.inline@    raise@@@",
181      "@@@STEP_LOG_LINE@python.inline@@@@",
182      "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@",
183      "@@@STEP_LOG_LINE@python.inline@  path = os.path.join(src, pattern)@@@",
184      "@@@STEP_LOG_LINE@python.inline@  for f in glob.glob(path):@@@",
185      "@@@STEP_LOG_LINE@python.inline@    dst_path = os.path.join(dst, os.path.relpath(f, src))@@@",
186      "@@@STEP_LOG_LINE@python.inline@    if not os.path.isdir(os.path.dirname(dst_path)):@@@",
187      "@@@STEP_LOG_LINE@python.inline@      os.makedirs(os.path.dirname(dst_path))@@@",
188      "@@@STEP_LOG_LINE@python.inline@    print 'Copying build product %s to %s' % (f, dst_path)@@@",
189      "@@@STEP_LOG_LINE@python.inline@    shutil.move(f, dst_path)@@@",
190      "@@@STEP_LOG_END@python.inline@@@"
191    ]
192  },
193  {
194    "cmd": [
195      "python",
196      "-u",
197      "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"
198    ],
199    "infra_step": true,
200    "name": "cleanup",
201    "~followup_annotations": [
202      "@@@STEP_LOG_LINE@python.inline@import psutil@@@",
203      "@@@STEP_LOG_LINE@python.inline@for p in psutil.process_iter():@@@",
204      "@@@STEP_LOG_LINE@python.inline@  try:@@@",
205      "@@@STEP_LOG_LINE@python.inline@    if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):@@@",
206      "@@@STEP_LOG_LINE@python.inline@      p.kill()@@@",
207      "@@@STEP_LOG_LINE@python.inline@  except psutil._error.AccessDenied:@@@",
208      "@@@STEP_LOG_LINE@python.inline@    pass@@@",
209      "@@@STEP_LOG_END@python.inline@@@"
210    ]
211  },
212  {
213    "name": "$result",
214    "recipe_result": null,
215    "status_code": 0
216  }
217]