Home | History | Annotate | Download | only in full.expected
      1 [
      2   {
      3     "cmd": [
      4       "python",
      5       "-u",
      6       "[START_DIR]/skia/bin/fetch-gn"
      7     ],
      8     "cwd": "[START_DIR]/skia",
      9     "env": {
     10       "BUILDTYPE": "Debug",
     11       "CHROME_HEADLESS": "1",
     12       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
     13       "SKIA_OUT": "[START_DIR]/out"
     14     },
     15     "infra_step": true,
     16     "name": "fetch-gn"
     17   },
     18   {
     19     "cmd": [
     20       "[START_DIR]/skia/bin/gn",
     21       "gen",
     22       "[START_DIR]/out/Debug",
     23       "--args=extra_cflags=[\"-O1\"] ndk=\"[START_DIR]/android_ndk_linux\" target_cpu=\"None\""
     24     ],
     25     "cwd": "[START_DIR]/skia",
     26     "env": {
     27       "BUILDTYPE": "Debug",
     28       "CHROME_HEADLESS": "1",
     29       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
     30       "SKIA_OUT": "[START_DIR]/out"
     31     },
     32     "name": "gn gen"
     33   },
     34   {
     35     "cmd": [
     36       "ninja",
     37       "-k",
     38       "0",
     39       "-C",
     40       "[START_DIR]/out/Debug"
     41     ],
     42     "cwd": "[START_DIR]/skia",
     43     "env": {
     44       "BUILDTYPE": "Debug",
     45       "CHROME_HEADLESS": "1",
     46       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
     47       "SKIA_OUT": "[START_DIR]/out"
     48     },
     49     "name": "ninja"
     50   },
     51   {
     52     "cmd": [
     53       "/opt/infra-android/tools/adb",
     54       "push",
     55       "file.txt",
     56       "file.txt"
     57     ],
     58     "cwd": "[START_DIR]/skia",
     59     "env": {
     60       "BUILDTYPE": "Debug",
     61       "CHROME_HEADLESS": "1",
     62       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
     63       "SKIA_OUT": "[START_DIR]/out"
     64     },
     65     "infra_step": true,
     66     "name": "push file.txt file.txt"
     67   },
     68   {
     69     "cmd": [
     70       "python",
     71       "-u",
     72       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
     73       "--json-output",
     74       "/path/to/tmp/json",
     75       "rmtree",
     76       "results_dir"
     77     ],
     78     "infra_step": true,
     79     "name": "rmtree results_dir"
     80   },
     81   {
     82     "cmd": [
     83       "python",
     84       "-u",
     85       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
     86       "--json-output",
     87       "/path/to/tmp/json",
     88       "ensure-directory",
     89       "--mode",
     90       "0777",
     91       "results_dir"
     92     ],
     93     "infra_step": true,
     94     "name": "makedirs results_dir"
     95   },
     96   {
     97     "cmd": [
     98       "/opt/infra-android/tools/adb",
     99       "shell",
    100       "rm",
    101       "-rf",
    102       "device_results_dir"
    103     ],
    104     "cwd": "[START_DIR]/skia",
    105     "env": {
    106       "BUILDTYPE": "Debug",
    107       "CHROME_HEADLESS": "1",
    108       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    109       "SKIA_OUT": "[START_DIR]/out"
    110     },
    111     "infra_step": true,
    112     "name": "rm device_results_dir"
    113   },
    114   {
    115     "cmd": [
    116       "/opt/infra-android/tools/adb",
    117       "shell",
    118       "mkdir",
    119       "-p",
    120       "device_results_dir"
    121     ],
    122     "cwd": "[START_DIR]/skia",
    123     "env": {
    124       "BUILDTYPE": "Debug",
    125       "CHROME_HEADLESS": "1",
    126       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    127       "SKIA_OUT": "[START_DIR]/out"
    128     },
    129     "infra_step": true,
    130     "name": "mkdir device_results_dir"
    131   },
    132   {
    133     "cmd": [
    134       "/opt/infra-android/tools/adb",
    135       "shell",
    136       "mkdir",
    137       "-p",
    138       "/sdcard/revenge_of_the_skiabot/resources"
    139     ],
    140     "cwd": "[START_DIR]/skia",
    141     "env": {
    142       "BUILDTYPE": "Debug",
    143       "CHROME_HEADLESS": "1",
    144       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    145       "SKIA_OUT": "[START_DIR]/out"
    146     },
    147     "infra_step": true,
    148     "name": "mkdir /sdcard/revenge_of_the_skiabot/resources"
    149   },
    150   {
    151     "cmd": [
    152       "python",
    153       "-u",
    154       "\nimport os\nimport subprocess\nimport sys\nhost   = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n  p = os.path.relpath(d, host)\n  if p != '.' and p.startswith('.'):\n    continue\n  for f in fs:\n    print os.path.join(p,f)\n    subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n                           os.path.realpath(os.path.join(host, p, f)),\n                           os.path.join(device, p, f)])\n",
    155       "[START_DIR]/skia/resources",
    156       "/sdcard/revenge_of_the_skiabot/resources"
    157     ],
    158     "env": {
    159       "BUILDTYPE": "Debug",
    160       "CHROME_HEADLESS": "1",
    161       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    162       "SKIA_OUT": "[START_DIR]/out"
    163     },
    164     "infra_step": true,
    165     "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources",
    166     "~followup_annotations": [
    167       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    168       "@@@STEP_LOG_LINE (a] python.inline@import os@@@",
    169       "@@@STEP_LOG_LINE (a] python.inline@import subprocess@@@",
    170       "@@@STEP_LOG_LINE (a] python.inline@import sys@@@",
    171       "@@@STEP_LOG_LINE (a] python.inline@host   = sys.argv[1]@@@",
    172       "@@@STEP_LOG_LINE (a] python.inline@device = sys.argv[2]@@@",
    173       "@@@STEP_LOG_LINE (a] python.inline@for d, _, fs in os.walk(host):@@@",
    174       "@@@STEP_LOG_LINE (a] python.inline@  p = os.path.relpath(d, host)@@@",
    175       "@@@STEP_LOG_LINE (a] python.inline@  if p != '.' and p.startswith('.'):@@@",
    176       "@@@STEP_LOG_LINE (a] python.inline@    continue@@@",
    177       "@@@STEP_LOG_LINE (a] python.inline@  for f in fs:@@@",
    178       "@@@STEP_LOG_LINE (a] python.inline@    print os.path.join(p,f)@@@",
    179       "@@@STEP_LOG_LINE (a] python.inline@    subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@",
    180       "@@@STEP_LOG_LINE (a] python.inline@                           os.path.realpath(os.path.join(host, p, f)),@@@",
    181       "@@@STEP_LOG_LINE (a] python.inline@                           os.path.join(device, p, f)])@@@",
    182       "@@@STEP_LOG_END (a] python.inline@@@"
    183     ]
    184   },
    185   {
    186     "cmd": [
    187       "python",
    188       "-u",
    189       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
    190       "--json-output",
    191       "/path/to/tmp/json",
    192       "copy",
    193       "[START_DIR]/skia/infra/bots/assets/skp/VERSION",
    194       "/path/to/tmp/"
    195     ],
    196     "infra_step": true,
    197     "name": "Get downloaded SKP VERSION"
    198   },
    199   {
    200     "cmd": [
    201       "python",
    202       "-u",
    203       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
    204       "--json-output",
    205       "/path/to/tmp/json",
    206       "copy",
    207       "42",
    208       "[START_DIR]/tmp/SKP_VERSION"
    209     ],
    210     "infra_step": true,
    211     "name": "write SKP_VERSION"
    212   },
    213   {
    214     "cmd": [
    215       "/opt/infra-android/tools/adb",
    216       "shell",
    217       "cat",
    218       "/sdcard/revenge_of_the_skiabot/SKP_VERSION"
    219     ],
    220     "cwd": "[START_DIR]/skia",
    221     "env": {
    222       "BUILDTYPE": "Debug",
    223       "CHROME_HEADLESS": "1",
    224       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    225       "SKIA_OUT": "[START_DIR]/out"
    226     },
    227     "infra_step": true,
    228     "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION",
    229     "stdout": "/path/to/tmp/"
    230   },
    231   {
    232     "cmd": [
    233       "/opt/infra-android/tools/adb",
    234       "shell",
    235       "rm",
    236       "-f",
    237       "/sdcard/revenge_of_the_skiabot/SKP_VERSION"
    238     ],
    239     "cwd": "[START_DIR]/skia",
    240     "env": {
    241       "BUILDTYPE": "Debug",
    242       "CHROME_HEADLESS": "1",
    243       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    244       "SKIA_OUT": "[START_DIR]/out"
    245     },
    246     "infra_step": true,
    247     "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION"
    248   },
    249   {
    250     "cmd": [
    251       "/opt/infra-android/tools/adb",
    252       "shell",
    253       "rm",
    254       "-rf",
    255       "/sdcard/revenge_of_the_skiabot/skps"
    256     ],
    257     "cwd": "[START_DIR]/skia",
    258     "env": {
    259       "BUILDTYPE": "Debug",
    260       "CHROME_HEADLESS": "1",
    261       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    262       "SKIA_OUT": "[START_DIR]/out"
    263     },
    264     "infra_step": true,
    265     "name": "rm /sdcard/revenge_of_the_skiabot/skps"
    266   },
    267   {
    268     "cmd": [
    269       "/opt/infra-android/tools/adb",
    270       "shell",
    271       "mkdir",
    272       "-p",
    273       "/sdcard/revenge_of_the_skiabot/skps"
    274     ],
    275     "cwd": "[START_DIR]/skia",
    276     "env": {
    277       "BUILDTYPE": "Debug",
    278       "CHROME_HEADLESS": "1",
    279       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    280       "SKIA_OUT": "[START_DIR]/out"
    281     },
    282     "infra_step": true,
    283     "name": "mkdir /sdcard/revenge_of_the_skiabot/skps"
    284   },
    285   {
    286     "cmd": [
    287       "python",
    288       "-u",
    289       "\nimport os\nimport subprocess\nimport sys\nhost   = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n  p = os.path.relpath(d, host)\n  if p != '.' and p.startswith('.'):\n    continue\n  for f in fs:\n    print os.path.join(p,f)\n    subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n                           os.path.realpath(os.path.join(host, p, f)),\n                           os.path.join(device, p, f)])\n",
    290       "[START_DIR]/skp",
    291       "/sdcard/revenge_of_the_skiabot/skps"
    292     ],
    293     "env": {
    294       "BUILDTYPE": "Debug",
    295       "CHROME_HEADLESS": "1",
    296       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    297       "SKIA_OUT": "[START_DIR]/out"
    298     },
    299     "infra_step": true,
    300     "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps",
    301     "~followup_annotations": [
    302       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    303       "@@@STEP_LOG_LINE (a] python.inline@import os@@@",
    304       "@@@STEP_LOG_LINE (a] python.inline@import subprocess@@@",
    305       "@@@STEP_LOG_LINE (a] python.inline@import sys@@@",
    306       "@@@STEP_LOG_LINE (a] python.inline@host   = sys.argv[1]@@@",
    307       "@@@STEP_LOG_LINE (a] python.inline@device = sys.argv[2]@@@",
    308       "@@@STEP_LOG_LINE (a] python.inline@for d, _, fs in os.walk(host):@@@",
    309       "@@@STEP_LOG_LINE (a] python.inline@  p = os.path.relpath(d, host)@@@",
    310       "@@@STEP_LOG_LINE (a] python.inline@  if p != '.' and p.startswith('.'):@@@",
    311       "@@@STEP_LOG_LINE (a] python.inline@    continue@@@",
    312       "@@@STEP_LOG_LINE (a] python.inline@  for f in fs:@@@",
    313       "@@@STEP_LOG_LINE (a] python.inline@    print os.path.join(p,f)@@@",
    314       "@@@STEP_LOG_LINE (a] python.inline@    subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@",
    315       "@@@STEP_LOG_LINE (a] python.inline@                           os.path.realpath(os.path.join(host, p, f)),@@@",
    316       "@@@STEP_LOG_LINE (a] python.inline@                           os.path.join(device, p, f)])@@@",
    317       "@@@STEP_LOG_END (a] python.inline@@@"
    318     ]
    319   },
    320   {
    321     "cmd": [
    322       "/opt/infra-android/tools/adb",
    323       "push",
    324       "[START_DIR]/tmp/SKP_VERSION",
    325       "/sdcard/revenge_of_the_skiabot/SKP_VERSION"
    326     ],
    327     "cwd": "[START_DIR]/skia",
    328     "env": {
    329       "BUILDTYPE": "Debug",
    330       "CHROME_HEADLESS": "1",
    331       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    332       "SKIA_OUT": "[START_DIR]/out"
    333     },
    334     "infra_step": true,
    335     "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION"
    336   },
    337   {
    338     "cmd": [
    339       "python",
    340       "-u",
    341       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
    342       "--json-output",
    343       "/path/to/tmp/json",
    344       "copy",
    345       "[START_DIR]/skia/infra/bots/assets/skimage/VERSION",
    346       "/path/to/tmp/"
    347     ],
    348     "infra_step": true,
    349     "name": "Get downloaded skimage VERSION"
    350   },
    351   {
    352     "cmd": [
    353       "python",
    354       "-u",
    355       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
    356       "--json-output",
    357       "/path/to/tmp/json",
    358       "copy",
    359       "42",
    360       "[START_DIR]/tmp/SK_IMAGE_VERSION"
    361     ],
    362     "infra_step": true,
    363     "name": "write SK_IMAGE_VERSION"
    364   },
    365   {
    366     "cmd": [
    367       "/opt/infra-android/tools/adb",
    368       "shell",
    369       "cat",
    370       "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION"
    371     ],
    372     "cwd": "[START_DIR]/skia",
    373     "env": {
    374       "BUILDTYPE": "Debug",
    375       "CHROME_HEADLESS": "1",
    376       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    377       "SKIA_OUT": "[START_DIR]/out"
    378     },
    379     "infra_step": true,
    380     "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION",
    381     "stdout": "/path/to/tmp/"
    382   },
    383   {
    384     "cmd": [
    385       "/opt/infra-android/tools/adb",
    386       "shell",
    387       "rm",
    388       "-f",
    389       "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION"
    390     ],
    391     "cwd": "[START_DIR]/skia",
    392     "env": {
    393       "BUILDTYPE": "Debug",
    394       "CHROME_HEADLESS": "1",
    395       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    396       "SKIA_OUT": "[START_DIR]/out"
    397     },
    398     "infra_step": true,
    399     "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION"
    400   },
    401   {
    402     "cmd": [
    403       "/opt/infra-android/tools/adb",
    404       "shell",
    405       "rm",
    406       "-rf",
    407       "/sdcard/revenge_of_the_skiabot/images"
    408     ],
    409     "cwd": "[START_DIR]/skia",
    410     "env": {
    411       "BUILDTYPE": "Debug",
    412       "CHROME_HEADLESS": "1",
    413       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    414       "SKIA_OUT": "[START_DIR]/out"
    415     },
    416     "infra_step": true,
    417     "name": "rm /sdcard/revenge_of_the_skiabot/images"
    418   },
    419   {
    420     "cmd": [
    421       "/opt/infra-android/tools/adb",
    422       "shell",
    423       "mkdir",
    424       "-p",
    425       "/sdcard/revenge_of_the_skiabot/images"
    426     ],
    427     "cwd": "[START_DIR]/skia",
    428     "env": {
    429       "BUILDTYPE": "Debug",
    430       "CHROME_HEADLESS": "1",
    431       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    432       "SKIA_OUT": "[START_DIR]/out"
    433     },
    434     "infra_step": true,
    435     "name": "mkdir /sdcard/revenge_of_the_skiabot/images"
    436   },
    437   {
    438     "cmd": [
    439       "python",
    440       "-u",
    441       "\nimport os\nimport subprocess\nimport sys\nhost   = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n  p = os.path.relpath(d, host)\n  if p != '.' and p.startswith('.'):\n    continue\n  for f in fs:\n    print os.path.join(p,f)\n    subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n                           os.path.realpath(os.path.join(host, p, f)),\n                           os.path.join(device, p, f)])\n",
    442       "[START_DIR]/skimage",
    443       "/sdcard/revenge_of_the_skiabot/images"
    444     ],
    445     "env": {
    446       "BUILDTYPE": "Debug",
    447       "CHROME_HEADLESS": "1",
    448       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    449       "SKIA_OUT": "[START_DIR]/out"
    450     },
    451     "infra_step": true,
    452     "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images",
    453     "~followup_annotations": [
    454       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    455       "@@@STEP_LOG_LINE (a] python.inline@import os@@@",
    456       "@@@STEP_LOG_LINE (a] python.inline@import subprocess@@@",
    457       "@@@STEP_LOG_LINE (a] python.inline@import sys@@@",
    458       "@@@STEP_LOG_LINE (a] python.inline@host   = sys.argv[1]@@@",
    459       "@@@STEP_LOG_LINE (a] python.inline@device = sys.argv[2]@@@",
    460       "@@@STEP_LOG_LINE (a] python.inline@for d, _, fs in os.walk(host):@@@",
    461       "@@@STEP_LOG_LINE (a] python.inline@  p = os.path.relpath(d, host)@@@",
    462       "@@@STEP_LOG_LINE (a] python.inline@  if p != '.' and p.startswith('.'):@@@",
    463       "@@@STEP_LOG_LINE (a] python.inline@    continue@@@",
    464       "@@@STEP_LOG_LINE (a] python.inline@  for f in fs:@@@",
    465       "@@@STEP_LOG_LINE (a] python.inline@    print os.path.join(p,f)@@@",
    466       "@@@STEP_LOG_LINE (a] python.inline@    subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@",
    467       "@@@STEP_LOG_LINE (a] python.inline@                           os.path.realpath(os.path.join(host, p, f)),@@@",
    468       "@@@STEP_LOG_LINE (a] python.inline@                           os.path.join(device, p, f)])@@@",
    469       "@@@STEP_LOG_END (a] python.inline@@@"
    470     ]
    471   },
    472   {
    473     "cmd": [
    474       "/opt/infra-android/tools/adb",
    475       "push",
    476       "[START_DIR]/tmp/SK_IMAGE_VERSION",
    477       "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION"
    478     ],
    479     "cwd": "[START_DIR]/skia",
    480     "env": {
    481       "BUILDTYPE": "Debug",
    482       "CHROME_HEADLESS": "1",
    483       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    484       "SKIA_OUT": "[START_DIR]/out"
    485     },
    486     "infra_step": true,
    487     "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION"
    488   },
    489   {
    490     "cmd": [
    491       "python",
    492       "-u",
    493       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
    494       "--json-output",
    495       "/path/to/tmp/json",
    496       "copy",
    497       "[START_DIR]/skia/infra/bots/assets/svg/VERSION",
    498       "/path/to/tmp/"
    499     ],
    500     "infra_step": true,
    501     "name": "Get downloaded SVG VERSION"
    502   },
    503   {
    504     "cmd": [
    505       "python",
    506       "-u",
    507       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
    508       "--json-output",
    509       "/path/to/tmp/json",
    510       "copy",
    511       "42",
    512       "[START_DIR]/tmp/SVG_VERSION"
    513     ],
    514     "infra_step": true,
    515     "name": "write SVG_VERSION"
    516   },
    517   {
    518     "cmd": [
    519       "/opt/infra-android/tools/adb",
    520       "shell",
    521       "cat",
    522       "/sdcard/revenge_of_the_skiabot/SVG_VERSION"
    523     ],
    524     "cwd": "[START_DIR]/skia",
    525     "env": {
    526       "BUILDTYPE": "Debug",
    527       "CHROME_HEADLESS": "1",
    528       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    529       "SKIA_OUT": "[START_DIR]/out"
    530     },
    531     "infra_step": true,
    532     "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION",
    533     "stdout": "/path/to/tmp/"
    534   },
    535   {
    536     "cmd": [
    537       "/opt/infra-android/tools/adb",
    538       "shell",
    539       "rm",
    540       "-f",
    541       "/sdcard/revenge_of_the_skiabot/SVG_VERSION"
    542     ],
    543     "cwd": "[START_DIR]/skia",
    544     "env": {
    545       "BUILDTYPE": "Debug",
    546       "CHROME_HEADLESS": "1",
    547       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    548       "SKIA_OUT": "[START_DIR]/out"
    549     },
    550     "infra_step": true,
    551     "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION"
    552   },
    553   {
    554     "cmd": [
    555       "/opt/infra-android/tools/adb",
    556       "shell",
    557       "rm",
    558       "-rf",
    559       "/sdcard/revenge_of_the_skiabot/svgs"
    560     ],
    561     "cwd": "[START_DIR]/skia",
    562     "env": {
    563       "BUILDTYPE": "Debug",
    564       "CHROME_HEADLESS": "1",
    565       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    566       "SKIA_OUT": "[START_DIR]/out"
    567     },
    568     "infra_step": true,
    569     "name": "rm /sdcard/revenge_of_the_skiabot/svgs"
    570   },
    571   {
    572     "cmd": [
    573       "/opt/infra-android/tools/adb",
    574       "shell",
    575       "mkdir",
    576       "-p",
    577       "/sdcard/revenge_of_the_skiabot/svgs"
    578     ],
    579     "cwd": "[START_DIR]/skia",
    580     "env": {
    581       "BUILDTYPE": "Debug",
    582       "CHROME_HEADLESS": "1",
    583       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    584       "SKIA_OUT": "[START_DIR]/out"
    585     },
    586     "infra_step": true,
    587     "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs"
    588   },
    589   {
    590     "cmd": [
    591       "python",
    592       "-u",
    593       "\nimport os\nimport subprocess\nimport sys\nhost   = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n  p = os.path.relpath(d, host)\n  if p != '.' and p.startswith('.'):\n    continue\n  for f in fs:\n    print os.path.join(p,f)\n    subprocess.check_call(['/opt/infra-android/tools/adb', 'push',\n                           os.path.realpath(os.path.join(host, p, f)),\n                           os.path.join(device, p, f)])\n",
    594       "[START_DIR]/svg",
    595       "/sdcard/revenge_of_the_skiabot/svgs"
    596     ],
    597     "env": {
    598       "BUILDTYPE": "Debug",
    599       "CHROME_HEADLESS": "1",
    600       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    601       "SKIA_OUT": "[START_DIR]/out"
    602     },
    603     "infra_step": true,
    604     "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs",
    605     "~followup_annotations": [
    606       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    607       "@@@STEP_LOG_LINE (a] python.inline@import os@@@",
    608       "@@@STEP_LOG_LINE (a] python.inline@import subprocess@@@",
    609       "@@@STEP_LOG_LINE (a] python.inline@import sys@@@",
    610       "@@@STEP_LOG_LINE (a] python.inline@host   = sys.argv[1]@@@",
    611       "@@@STEP_LOG_LINE (a] python.inline@device = sys.argv[2]@@@",
    612       "@@@STEP_LOG_LINE (a] python.inline@for d, _, fs in os.walk(host):@@@",
    613       "@@@STEP_LOG_LINE (a] python.inline@  p = os.path.relpath(d, host)@@@",
    614       "@@@STEP_LOG_LINE (a] python.inline@  if p != '.' and p.startswith('.'):@@@",
    615       "@@@STEP_LOG_LINE (a] python.inline@    continue@@@",
    616       "@@@STEP_LOG_LINE (a] python.inline@  for f in fs:@@@",
    617       "@@@STEP_LOG_LINE (a] python.inline@    print os.path.join(p,f)@@@",
    618       "@@@STEP_LOG_LINE (a] python.inline@    subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@",
    619       "@@@STEP_LOG_LINE (a] python.inline@                           os.path.realpath(os.path.join(host, p, f)),@@@",
    620       "@@@STEP_LOG_LINE (a] python.inline@                           os.path.join(device, p, f)])@@@",
    621       "@@@STEP_LOG_END (a] python.inline@@@"
    622     ]
    623   },
    624   {
    625     "cmd": [
    626       "/opt/infra-android/tools/adb",
    627       "push",
    628       "[START_DIR]/tmp/SVG_VERSION",
    629       "/sdcard/revenge_of_the_skiabot/SVG_VERSION"
    630     ],
    631     "cwd": "[START_DIR]/skia",
    632     "env": {
    633       "BUILDTYPE": "Debug",
    634       "CHROME_HEADLESS": "1",
    635       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    636       "SKIA_OUT": "[START_DIR]/out"
    637     },
    638     "infra_step": true,
    639     "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION"
    640   },
    641   {
    642     "cmd": [
    643       "python",
    644       "-u",
    645       "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n  raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n    '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n    '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n  raise Exception('(actual, expected) (%s, %s)'\n                  % (actual_gov, gov))\n",
    646       "/opt/infra-android/tools/adb",
    647       "4",
    648       "userspace"
    649     ],
    650     "env": {
    651       "BUILDTYPE": "Debug",
    652       "CHROME_HEADLESS": "1",
    653       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    654       "SKIA_OUT": "[START_DIR]/out"
    655     },
    656     "infra_step": true,
    657     "name": "Set CPU 4's governor to userspace",
    658     "timeout": 30,
    659     "~followup_annotations": [
    660       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    661       "@@@STEP_LOG_LINE (a] python.inline@import os@@@",
    662       "@@@STEP_LOG_LINE (a] python.inline@import subprocess@@@",
    663       "@@@STEP_LOG_LINE (a] python.inline@import sys@@@",
    664       "@@@STEP_LOG_LINE (a] python.inline@import time@@@",
    665       "@@@STEP_LOG_LINE (a] python.inline@ADB = sys.argv[1]@@@",
    666       "@@@STEP_LOG_LINE (a] python.inline@cpu = int(sys.argv[2])@@@",
    667       "@@@STEP_LOG_LINE (a] python.inline@gov = sys.argv[3]@@@",
    668       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    669       "@@@STEP_LOG_LINE (a] python.inline@log = subprocess.check_output([ADB, 'root'])@@@",
    670       "@@@STEP_LOG_LINE (a] python.inline@# check for message like 'adbd cannot run as root in production builds'@@@",
    671       "@@@STEP_LOG_LINE (a] python.inline@print log@@@",
    672       "@@@STEP_LOG_LINE (a] python.inline@if 'cannot' in log:@@@",
    673       "@@@STEP_LOG_LINE (a] python.inline@  raise Exception('adb root failed')@@@",
    674       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    675       "@@@STEP_LOG_LINE (a] python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@",
    676       "@@@STEP_LOG_LINE (a] python.inline@    '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])@@@",
    677       "@@@STEP_LOG_LINE (a] python.inline@actual_gov = subprocess.check_output([ADB, 'shell', 'cat '@@@",
    678       "@@@STEP_LOG_LINE (a] python.inline@    '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()@@@",
    679       "@@@STEP_LOG_LINE (a] python.inline@if actual_gov != gov:@@@",
    680       "@@@STEP_LOG_LINE (a] python.inline@  raise Exception('(actual, expected) (%s, %s)'@@@",
    681       "@@@STEP_LOG_LINE (a] python.inline@                  % (actual_gov, gov))@@@",
    682       "@@@STEP_LOG_END (a] python.inline@@@"
    683     ]
    684   },
    685   {
    686     "cmd": [
    687       "python",
    688       "-u",
    689       "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n  raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n    'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n  available_freqs = sorted(\n      int(i) for i in available_freqs.strip().split())\nelse:\n  raise Exception('Could not get list of available frequencies: %s' %\n                  available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n  if f <= target:\n    freq = f\n    break\n\nprint 'Setting frequency to %d' % freq\n\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n    '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n    '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n    '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n    '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n  raise Exception('(actual, expected) (%s, %d)'\n                  % (actual_freq, freq))\n",
    690       "/opt/infra-android/tools/adb",
    691       "0.6",
    692       "4"
    693     ],
    694     "env": {
    695       "BUILDTYPE": "Debug",
    696       "CHROME_HEADLESS": "1",
    697       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    698       "SKIA_OUT": "[START_DIR]/out"
    699     },
    700     "infra_step": true,
    701     "name": "Scale CPU 4 to 0.600000",
    702     "timeout": 30,
    703     "~followup_annotations": [
    704       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    705       "@@@STEP_LOG_LINE (a] python.inline@import os@@@",
    706       "@@@STEP_LOG_LINE (a] python.inline@import subprocess@@@",
    707       "@@@STEP_LOG_LINE (a] python.inline@import sys@@@",
    708       "@@@STEP_LOG_LINE (a] python.inline@import time@@@",
    709       "@@@STEP_LOG_LINE (a] python.inline@ADB = sys.argv[1]@@@",
    710       "@@@STEP_LOG_LINE (a] python.inline@target_percent = float(sys.argv[2])@@@",
    711       "@@@STEP_LOG_LINE (a] python.inline@cpu = int(sys.argv[3])@@@",
    712       "@@@STEP_LOG_LINE (a] python.inline@log = subprocess.check_output([ADB, 'root'])@@@",
    713       "@@@STEP_LOG_LINE (a] python.inline@# check for message like 'adbd cannot run as root in production builds'@@@",
    714       "@@@STEP_LOG_LINE (a] python.inline@print log@@@",
    715       "@@@STEP_LOG_LINE (a] python.inline@if 'cannot' in log:@@@",
    716       "@@@STEP_LOG_LINE (a] python.inline@  raise Exception('adb root failed')@@@",
    717       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    718       "@@@STEP_LOG_LINE (a] python.inline@root = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu@@@",
    719       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    720       "@@@STEP_LOG_LINE (a] python.inline@# All devices we test on give a list of their available frequencies.@@@",
    721       "@@@STEP_LOG_LINE (a] python.inline@available_freqs = subprocess.check_output([ADB, 'shell',@@@",
    722       "@@@STEP_LOG_LINE (a] python.inline@    'cat %s/scaling_available_frequencies' % root])@@@",
    723       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    724       "@@@STEP_LOG_LINE (a] python.inline@# Check for message like '/system/bin/sh: file not found'@@@",
    725       "@@@STEP_LOG_LINE (a] python.inline@if available_freqs and '/system/bin/sh' not in available_freqs:@@@",
    726       "@@@STEP_LOG_LINE (a] python.inline@  available_freqs = sorted(@@@",
    727       "@@@STEP_LOG_LINE (a] python.inline@      int(i) for i in available_freqs.strip().split())@@@",
    728       "@@@STEP_LOG_LINE (a] python.inline@else:@@@",
    729       "@@@STEP_LOG_LINE (a] python.inline@  raise Exception('Could not get list of available frequencies: %s' %@@@",
    730       "@@@STEP_LOG_LINE (a] python.inline@                  available_freqs)@@@",
    731       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    732       "@@@STEP_LOG_LINE (a] python.inline@maxfreq = available_freqs[-1]@@@",
    733       "@@@STEP_LOG_LINE (a] python.inline@target = int(round(maxfreq * target_percent))@@@",
    734       "@@@STEP_LOG_LINE (a] python.inline@freq = maxfreq@@@",
    735       "@@@STEP_LOG_LINE (a] python.inline@for f in reversed(available_freqs):@@@",
    736       "@@@STEP_LOG_LINE (a] python.inline@  if f <= target:@@@",
    737       "@@@STEP_LOG_LINE (a] python.inline@    freq = f@@@",
    738       "@@@STEP_LOG_LINE (a] python.inline@    break@@@",
    739       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    740       "@@@STEP_LOG_LINE (a] python.inline@print 'Setting frequency to %d' % freq@@@",
    741       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    742       "@@@STEP_LOG_LINE (a] python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
    743       "@@@STEP_LOG_LINE (a] python.inline@# We must set min first, because if we try to set max to be less than min@@@",
    744       "@@@STEP_LOG_LINE (a] python.inline@# (which sometimes happens after certain devices reboot) it returns a@@@",
    745       "@@@STEP_LOG_LINE (a] python.inline@# perplexing permissions error.@@@",
    746       "@@@STEP_LOG_LINE (a] python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
    747       "@@@STEP_LOG_LINE (a] python.inline@    '%s/scaling_min_freq' % root])@@@",
    748       "@@@STEP_LOG_LINE (a] python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
    749       "@@@STEP_LOG_LINE (a] python.inline@    '%s/scaling_max_freq' % (freq, root)])@@@",
    750       "@@@STEP_LOG_LINE (a] python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
    751       "@@@STEP_LOG_LINE (a] python.inline@    '%s/scaling_setspeed' % (freq, root)])@@@",
    752       "@@@STEP_LOG_LINE (a] python.inline@time.sleep(5)@@@",
    753       "@@@STEP_LOG_LINE (a] python.inline@actual_freq = subprocess.check_output([ADB, 'shell', 'cat '@@@",
    754       "@@@STEP_LOG_LINE (a] python.inline@    '%s/scaling_cur_freq' % root]).strip()@@@",
    755       "@@@STEP_LOG_LINE (a] python.inline@if actual_freq != str(freq):@@@",
    756       "@@@STEP_LOG_LINE (a] python.inline@  raise Exception('(actual, expected) (%s, %d)'@@@",
    757       "@@@STEP_LOG_LINE (a] python.inline@                  % (actual_freq, freq))@@@",
    758       "@@@STEP_LOG_END (a] python.inline@@@"
    759     ]
    760   },
    761   {
    762     "cmd": [
    763       "python",
    764       "-u",
    765       "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n  raise Exception('adb root failed')\n\n# If we try to echo 1 to an already online cpu, adb returns exit code 1.\n# So, check the value before trying to write it.\nprior_status = subprocess.check_output([ADB, 'shell', 'cat '\n    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif prior_status == str(value):\n  print 'CPU %d online already %d' % (cpu, value)\n  sys.exit()\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n    '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(value):\n  raise Exception('(actual, expected) (%s, %d)'\n                  % (actual_status, value))\n",
    766       "/opt/infra-android/tools/adb",
    767       "0",
    768       "0"
    769     ],
    770     "env": {
    771       "BUILDTYPE": "Debug",
    772       "CHROME_HEADLESS": "1",
    773       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    774       "SKIA_OUT": "[START_DIR]/out"
    775     },
    776     "infra_step": true,
    777     "name": "Disabling CPU 0",
    778     "timeout": 30,
    779     "~followup_annotations": [
    780       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    781       "@@@STEP_LOG_LINE (a] python.inline@import os@@@",
    782       "@@@STEP_LOG_LINE (a] python.inline@import subprocess@@@",
    783       "@@@STEP_LOG_LINE (a] python.inline@import sys@@@",
    784       "@@@STEP_LOG_LINE (a] python.inline@import time@@@",
    785       "@@@STEP_LOG_LINE (a] python.inline@ADB = sys.argv[1]@@@",
    786       "@@@STEP_LOG_LINE (a] python.inline@cpu = int(sys.argv[2])@@@",
    787       "@@@STEP_LOG_LINE (a] python.inline@value = int(sys.argv[3])@@@",
    788       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    789       "@@@STEP_LOG_LINE (a] python.inline@log = subprocess.check_output([ADB, 'root'])@@@",
    790       "@@@STEP_LOG_LINE (a] python.inline@# check for message like 'adbd cannot run as root in production builds'@@@",
    791       "@@@STEP_LOG_LINE (a] python.inline@print log@@@",
    792       "@@@STEP_LOG_LINE (a] python.inline@if 'cannot' in log:@@@",
    793       "@@@STEP_LOG_LINE (a] python.inline@  raise Exception('adb root failed')@@@",
    794       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    795       "@@@STEP_LOG_LINE (a] python.inline@# If we try to echo 1 to an already online cpu, adb returns exit code 1.@@@",
    796       "@@@STEP_LOG_LINE (a] python.inline@# So, check the value before trying to write it.@@@",
    797       "@@@STEP_LOG_LINE (a] python.inline@prior_status = subprocess.check_output([ADB, 'shell', 'cat '@@@",
    798       "@@@STEP_LOG_LINE (a] python.inline@    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@",
    799       "@@@STEP_LOG_LINE (a] python.inline@if prior_status == str(value):@@@",
    800       "@@@STEP_LOG_LINE (a] python.inline@  print 'CPU %d online already %d' % (cpu, value)@@@",
    801       "@@@STEP_LOG_LINE (a] python.inline@  sys.exit()@@@",
    802       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    803       "@@@STEP_LOG_LINE (a] python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@",
    804       "@@@STEP_LOG_LINE (a] python.inline@    '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@",
    805       "@@@STEP_LOG_LINE (a] python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@",
    806       "@@@STEP_LOG_LINE (a] python.inline@    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@",
    807       "@@@STEP_LOG_LINE (a] python.inline@if actual_status != str(value):@@@",
    808       "@@@STEP_LOG_LINE (a] python.inline@  raise Exception('(actual, expected) (%s, %d)'@@@",
    809       "@@@STEP_LOG_LINE (a] python.inline@                  % (actual_status, value))@@@",
    810       "@@@STEP_LOG_END (a] python.inline@@@"
    811     ]
    812   },
    813   {
    814     "cmd": [
    815       "python",
    816       "-u",
    817       "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n  raise Exception('adb root failed')\n\n# If we try to echo 1 to an already online cpu, adb returns exit code 1.\n# So, check the value before trying to write it.\nprior_status = subprocess.check_output([ADB, 'shell', 'cat '\n    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif prior_status == str(value):\n  print 'CPU %d online already %d' % (cpu, value)\n  sys.exit()\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n    '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(value):\n  raise Exception('(actual, expected) (%s, %d)'\n                  % (actual_status, value))\n",
    818       "/opt/infra-android/tools/adb",
    819       "1",
    820       "0"
    821     ],
    822     "env": {
    823       "BUILDTYPE": "Debug",
    824       "CHROME_HEADLESS": "1",
    825       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    826       "SKIA_OUT": "[START_DIR]/out"
    827     },
    828     "infra_step": true,
    829     "name": "Disabling CPU 1",
    830     "timeout": 30,
    831     "~followup_annotations": [
    832       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    833       "@@@STEP_LOG_LINE (a] python.inline@import os@@@",
    834       "@@@STEP_LOG_LINE (a] python.inline@import subprocess@@@",
    835       "@@@STEP_LOG_LINE (a] python.inline@import sys@@@",
    836       "@@@STEP_LOG_LINE (a] python.inline@import time@@@",
    837       "@@@STEP_LOG_LINE (a] python.inline@ADB = sys.argv[1]@@@",
    838       "@@@STEP_LOG_LINE (a] python.inline@cpu = int(sys.argv[2])@@@",
    839       "@@@STEP_LOG_LINE (a] python.inline@value = int(sys.argv[3])@@@",
    840       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    841       "@@@STEP_LOG_LINE (a] python.inline@log = subprocess.check_output([ADB, 'root'])@@@",
    842       "@@@STEP_LOG_LINE (a] python.inline@# check for message like 'adbd cannot run as root in production builds'@@@",
    843       "@@@STEP_LOG_LINE (a] python.inline@print log@@@",
    844       "@@@STEP_LOG_LINE (a] python.inline@if 'cannot' in log:@@@",
    845       "@@@STEP_LOG_LINE (a] python.inline@  raise Exception('adb root failed')@@@",
    846       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    847       "@@@STEP_LOG_LINE (a] python.inline@# If we try to echo 1 to an already online cpu, adb returns exit code 1.@@@",
    848       "@@@STEP_LOG_LINE (a] python.inline@# So, check the value before trying to write it.@@@",
    849       "@@@STEP_LOG_LINE (a] python.inline@prior_status = subprocess.check_output([ADB, 'shell', 'cat '@@@",
    850       "@@@STEP_LOG_LINE (a] python.inline@    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@",
    851       "@@@STEP_LOG_LINE (a] python.inline@if prior_status == str(value):@@@",
    852       "@@@STEP_LOG_LINE (a] python.inline@  print 'CPU %d online already %d' % (cpu, value)@@@",
    853       "@@@STEP_LOG_LINE (a] python.inline@  sys.exit()@@@",
    854       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    855       "@@@STEP_LOG_LINE (a] python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@",
    856       "@@@STEP_LOG_LINE (a] python.inline@    '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@",
    857       "@@@STEP_LOG_LINE (a] python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@",
    858       "@@@STEP_LOG_LINE (a] python.inline@    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@",
    859       "@@@STEP_LOG_LINE (a] python.inline@if actual_status != str(value):@@@",
    860       "@@@STEP_LOG_LINE (a] python.inline@  raise Exception('(actual, expected) (%s, %d)'@@@",
    861       "@@@STEP_LOG_LINE (a] python.inline@                  % (actual_status, value))@@@",
    862       "@@@STEP_LOG_END (a] python.inline@@@"
    863     ]
    864   },
    865   {
    866     "cmd": [
    867       "python",
    868       "-u",
    869       "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n  raise Exception('adb root failed')\n\n# If we try to echo 1 to an already online cpu, adb returns exit code 1.\n# So, check the value before trying to write it.\nprior_status = subprocess.check_output([ADB, 'shell', 'cat '\n    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif prior_status == str(value):\n  print 'CPU %d online already %d' % (cpu, value)\n  sys.exit()\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n    '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(value):\n  raise Exception('(actual, expected) (%s, %d)'\n                  % (actual_status, value))\n",
    870       "/opt/infra-android/tools/adb",
    871       "2",
    872       "0"
    873     ],
    874     "env": {
    875       "BUILDTYPE": "Debug",
    876       "CHROME_HEADLESS": "1",
    877       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    878       "SKIA_OUT": "[START_DIR]/out"
    879     },
    880     "infra_step": true,
    881     "name": "Disabling CPU 2",
    882     "timeout": 30,
    883     "~followup_annotations": [
    884       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    885       "@@@STEP_LOG_LINE (a] python.inline@import os@@@",
    886       "@@@STEP_LOG_LINE (a] python.inline@import subprocess@@@",
    887       "@@@STEP_LOG_LINE (a] python.inline@import sys@@@",
    888       "@@@STEP_LOG_LINE (a] python.inline@import time@@@",
    889       "@@@STEP_LOG_LINE (a] python.inline@ADB = sys.argv[1]@@@",
    890       "@@@STEP_LOG_LINE (a] python.inline@cpu = int(sys.argv[2])@@@",
    891       "@@@STEP_LOG_LINE (a] python.inline@value = int(sys.argv[3])@@@",
    892       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    893       "@@@STEP_LOG_LINE (a] python.inline@log = subprocess.check_output([ADB, 'root'])@@@",
    894       "@@@STEP_LOG_LINE (a] python.inline@# check for message like 'adbd cannot run as root in production builds'@@@",
    895       "@@@STEP_LOG_LINE (a] python.inline@print log@@@",
    896       "@@@STEP_LOG_LINE (a] python.inline@if 'cannot' in log:@@@",
    897       "@@@STEP_LOG_LINE (a] python.inline@  raise Exception('adb root failed')@@@",
    898       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    899       "@@@STEP_LOG_LINE (a] python.inline@# If we try to echo 1 to an already online cpu, adb returns exit code 1.@@@",
    900       "@@@STEP_LOG_LINE (a] python.inline@# So, check the value before trying to write it.@@@",
    901       "@@@STEP_LOG_LINE (a] python.inline@prior_status = subprocess.check_output([ADB, 'shell', 'cat '@@@",
    902       "@@@STEP_LOG_LINE (a] python.inline@    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@",
    903       "@@@STEP_LOG_LINE (a] python.inline@if prior_status == str(value):@@@",
    904       "@@@STEP_LOG_LINE (a] python.inline@  print 'CPU %d online already %d' % (cpu, value)@@@",
    905       "@@@STEP_LOG_LINE (a] python.inline@  sys.exit()@@@",
    906       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    907       "@@@STEP_LOG_LINE (a] python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@",
    908       "@@@STEP_LOG_LINE (a] python.inline@    '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@",
    909       "@@@STEP_LOG_LINE (a] python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@",
    910       "@@@STEP_LOG_LINE (a] python.inline@    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@",
    911       "@@@STEP_LOG_LINE (a] python.inline@if actual_status != str(value):@@@",
    912       "@@@STEP_LOG_LINE (a] python.inline@  raise Exception('(actual, expected) (%s, %d)'@@@",
    913       "@@@STEP_LOG_LINE (a] python.inline@                  % (actual_status, value))@@@",
    914       "@@@STEP_LOG_END (a] python.inline@@@"
    915     ]
    916   },
    917   {
    918     "cmd": [
    919       "python",
    920       "-u",
    921       "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\nvalue = int(sys.argv[3])\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n  raise Exception('adb root failed')\n\n# If we try to echo 1 to an already online cpu, adb returns exit code 1.\n# So, check the value before trying to write it.\nprior_status = subprocess.check_output([ADB, 'shell', 'cat '\n    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif prior_status == str(value):\n  print 'CPU %d online already %d' % (cpu, value)\n  sys.exit()\n\nsubprocess.check_output([ADB, 'shell', 'echo %s > '\n    '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])\nactual_status = subprocess.check_output([ADB, 'shell', 'cat '\n    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()\nif actual_status != str(value):\n  raise Exception('(actual, expected) (%s, %d)'\n                  % (actual_status, value))\n",
    922       "/opt/infra-android/tools/adb",
    923       "3",
    924       "0"
    925     ],
    926     "env": {
    927       "BUILDTYPE": "Debug",
    928       "CHROME_HEADLESS": "1",
    929       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    930       "SKIA_OUT": "[START_DIR]/out"
    931     },
    932     "infra_step": true,
    933     "name": "Disabling CPU 3",
    934     "timeout": 30,
    935     "~followup_annotations": [
    936       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    937       "@@@STEP_LOG_LINE (a] python.inline@import os@@@",
    938       "@@@STEP_LOG_LINE (a] python.inline@import subprocess@@@",
    939       "@@@STEP_LOG_LINE (a] python.inline@import sys@@@",
    940       "@@@STEP_LOG_LINE (a] python.inline@import time@@@",
    941       "@@@STEP_LOG_LINE (a] python.inline@ADB = sys.argv[1]@@@",
    942       "@@@STEP_LOG_LINE (a] python.inline@cpu = int(sys.argv[2])@@@",
    943       "@@@STEP_LOG_LINE (a] python.inline@value = int(sys.argv[3])@@@",
    944       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    945       "@@@STEP_LOG_LINE (a] python.inline@log = subprocess.check_output([ADB, 'root'])@@@",
    946       "@@@STEP_LOG_LINE (a] python.inline@# check for message like 'adbd cannot run as root in production builds'@@@",
    947       "@@@STEP_LOG_LINE (a] python.inline@print log@@@",
    948       "@@@STEP_LOG_LINE (a] python.inline@if 'cannot' in log:@@@",
    949       "@@@STEP_LOG_LINE (a] python.inline@  raise Exception('adb root failed')@@@",
    950       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    951       "@@@STEP_LOG_LINE (a] python.inline@# If we try to echo 1 to an already online cpu, adb returns exit code 1.@@@",
    952       "@@@STEP_LOG_LINE (a] python.inline@# So, check the value before trying to write it.@@@",
    953       "@@@STEP_LOG_LINE (a] python.inline@prior_status = subprocess.check_output([ADB, 'shell', 'cat '@@@",
    954       "@@@STEP_LOG_LINE (a] python.inline@    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@",
    955       "@@@STEP_LOG_LINE (a] python.inline@if prior_status == str(value):@@@",
    956       "@@@STEP_LOG_LINE (a] python.inline@  print 'CPU %d online already %d' % (cpu, value)@@@",
    957       "@@@STEP_LOG_LINE (a] python.inline@  sys.exit()@@@",
    958       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    959       "@@@STEP_LOG_LINE (a] python.inline@subprocess.check_output([ADB, 'shell', 'echo %s > '@@@",
    960       "@@@STEP_LOG_LINE (a] python.inline@    '/sys/devices/system/cpu/cpu%d/online' % (value, cpu)])@@@",
    961       "@@@STEP_LOG_LINE (a] python.inline@actual_status = subprocess.check_output([ADB, 'shell', 'cat '@@@",
    962       "@@@STEP_LOG_LINE (a] python.inline@    '/sys/devices/system/cpu/cpu%d/online' % cpu]).strip()@@@",
    963       "@@@STEP_LOG_LINE (a] python.inline@if actual_status != str(value):@@@",
    964       "@@@STEP_LOG_LINE (a] python.inline@  raise Exception('(actual, expected) (%s, %d)'@@@",
    965       "@@@STEP_LOG_LINE (a] python.inline@                  % (actual_status, value))@@@",
    966       "@@@STEP_LOG_END (a] python.inline@@@"
    967     ]
    968   },
    969   {
    970     "cmd": [
    971       "python",
    972       "-u",
    973       "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nfreq = sys.argv[2]\nidle_timer = \"10000\"\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n  raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'stop', 'thermald'])\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n    '/sys/class/kgsl/kgsl-3d0/gpuclk' % freq])\n\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n    '/sys/class/kgsl/kgsl-3d0/gpuclk']).strip()\nif actual_freq != freq:\n  raise Exception('Frequency (actual, expected) (%s, %s)'\n                  % (actual_freq, freq))\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n    '/sys/class/kgsl/kgsl-3d0/idle_timer' % idle_timer])\n\nactual_timer = subprocess.check_output([ADB, 'shell', 'cat '\n    '/sys/class/kgsl/kgsl-3d0/idle_timer']).strip()\nif actual_timer != idle_timer:\n  raise Exception('idle_timer (actual, expected) (%s, %s)'\n                  % (actual_timer, idle_timer))\n\nfor s in ['force_bus_on', 'force_rail_on', 'force_clk_on']:\n  subprocess.check_output([ADB, 'shell', 'echo \"1\" > '\n      '/sys/class/kgsl/kgsl-3d0/%s' % s])\n  actual_set = subprocess.check_output([ADB, 'shell', 'cat '\n      '/sys/class/kgsl/kgsl-3d0/%s' % s]).strip()\n  if actual_set != \"1\":\n    raise Exception('%s (actual, expected) (%s, 1)'\n                    % (s, actual_set))\n",
    974       "/opt/infra-android/tools/adb",
    975       "600000000"
    976     ],
    977     "env": {
    978       "BUILDTYPE": "Debug",
    979       "CHROME_HEADLESS": "1",
    980       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
    981       "SKIA_OUT": "[START_DIR]/out"
    982     },
    983     "infra_step": true,
    984     "name": "Lock GPU to 600000000 (and other perf tweaks)",
    985     "timeout": 30,
    986     "~followup_annotations": [
    987       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    988       "@@@STEP_LOG_LINE (a] python.inline@import os@@@",
    989       "@@@STEP_LOG_LINE (a] python.inline@import subprocess@@@",
    990       "@@@STEP_LOG_LINE (a] python.inline@import sys@@@",
    991       "@@@STEP_LOG_LINE (a] python.inline@import time@@@",
    992       "@@@STEP_LOG_LINE (a] python.inline@ADB = sys.argv[1]@@@",
    993       "@@@STEP_LOG_LINE (a] python.inline@freq = sys.argv[2]@@@",
    994       "@@@STEP_LOG_LINE (a] python.inline@idle_timer = \"10000\"@@@",
    995       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    996       "@@@STEP_LOG_LINE (a] python.inline@log = subprocess.check_output([ADB, 'root'])@@@",
    997       "@@@STEP_LOG_LINE (a] python.inline@# check for message like 'adbd cannot run as root in production builds'@@@",
    998       "@@@STEP_LOG_LINE (a] python.inline@print log@@@",
    999       "@@@STEP_LOG_LINE (a] python.inline@if 'cannot' in log:@@@",
   1000       "@@@STEP_LOG_LINE (a] python.inline@  raise Exception('adb root failed')@@@",
   1001       "@@@STEP_LOG_LINE (a] python.inline@@@@",
   1002       "@@@STEP_LOG_LINE (a] python.inline@subprocess.check_output([ADB, 'shell', 'stop', 'thermald'])@@@",
   1003       "@@@STEP_LOG_LINE (a] python.inline@@@@",
   1004       "@@@STEP_LOG_LINE (a] python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@",
   1005       "@@@STEP_LOG_LINE (a] python.inline@    '/sys/class/kgsl/kgsl-3d0/gpuclk' % freq])@@@",
   1006       "@@@STEP_LOG_LINE (a] python.inline@@@@",
   1007       "@@@STEP_LOG_LINE (a] python.inline@actual_freq = subprocess.check_output([ADB, 'shell', 'cat '@@@",
   1008       "@@@STEP_LOG_LINE (a] python.inline@    '/sys/class/kgsl/kgsl-3d0/gpuclk']).strip()@@@",
   1009       "@@@STEP_LOG_LINE (a] python.inline@if actual_freq != freq:@@@",
   1010       "@@@STEP_LOG_LINE (a] python.inline@  raise Exception('Frequency (actual, expected) (%s, %s)'@@@",
   1011       "@@@STEP_LOG_LINE (a] python.inline@                  % (actual_freq, freq))@@@",
   1012       "@@@STEP_LOG_LINE (a] python.inline@@@@",
   1013       "@@@STEP_LOG_LINE (a] python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@",
   1014       "@@@STEP_LOG_LINE (a] python.inline@    '/sys/class/kgsl/kgsl-3d0/idle_timer' % idle_timer])@@@",
   1015       "@@@STEP_LOG_LINE (a] python.inline@@@@",
   1016       "@@@STEP_LOG_LINE (a] python.inline@actual_timer = subprocess.check_output([ADB, 'shell', 'cat '@@@",
   1017       "@@@STEP_LOG_LINE (a] python.inline@    '/sys/class/kgsl/kgsl-3d0/idle_timer']).strip()@@@",
   1018       "@@@STEP_LOG_LINE (a] python.inline@if actual_timer != idle_timer:@@@",
   1019       "@@@STEP_LOG_LINE (a] python.inline@  raise Exception('idle_timer (actual, expected) (%s, %s)'@@@",
   1020       "@@@STEP_LOG_LINE (a] python.inline@                  % (actual_timer, idle_timer))@@@",
   1021       "@@@STEP_LOG_LINE (a] python.inline@@@@",
   1022       "@@@STEP_LOG_LINE (a] python.inline@for s in ['force_bus_on', 'force_rail_on', 'force_clk_on']:@@@",
   1023       "@@@STEP_LOG_LINE (a] python.inline@  subprocess.check_output([ADB, 'shell', 'echo \"1\" > '@@@",
   1024       "@@@STEP_LOG_LINE (a] python.inline@      '/sys/class/kgsl/kgsl-3d0/%s' % s])@@@",
   1025       "@@@STEP_LOG_LINE (a] python.inline@  actual_set = subprocess.check_output([ADB, 'shell', 'cat '@@@",
   1026       "@@@STEP_LOG_LINE (a] python.inline@      '/sys/class/kgsl/kgsl-3d0/%s' % s]).strip()@@@",
   1027       "@@@STEP_LOG_LINE (a] python.inline@  if actual_set != \"1\":@@@",
   1028       "@@@STEP_LOG_LINE (a] python.inline@    raise Exception('%s (actual, expected) (%s, 1)'@@@",
   1029       "@@@STEP_LOG_LINE (a] python.inline@                    % (s, actual_set))@@@",
   1030       "@@@STEP_LOG_END (a] python.inline@@@"
   1031     ]
   1032   },
   1033   {
   1034     "cmd": [
   1035       "/opt/infra-android/tools/adb",
   1036       "push",
   1037       "[START_DIR]/out/Debug/nanobench",
   1038       "/data/local/tmp/"
   1039     ],
   1040     "cwd": "[START_DIR]/skia",
   1041     "env": {
   1042       "BUILDTYPE": "Debug",
   1043       "CHROME_HEADLESS": "1",
   1044       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
   1045       "SKIA_OUT": "[START_DIR]/out"
   1046     },
   1047     "infra_step": true,
   1048     "name": "push nanobench"
   1049   },
   1050   {
   1051     "cmd": [
   1052       "python",
   1053       "-u",
   1054       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
   1055       "--json-output",
   1056       "/path/to/tmp/json",
   1057       "copy",
   1058       "set -x; /data/local/tmp/nanobench --some-flag; echo $? >/data/local/tmp/rc",
   1059       "[START_DIR]/tmp/nanobench.sh"
   1060     ],
   1061     "infra_step": true,
   1062     "name": "write nanobench.sh"
   1063   },
   1064   {
   1065     "cmd": [
   1066       "/opt/infra-android/tools/adb",
   1067       "push",
   1068       "[START_DIR]/tmp/nanobench.sh",
   1069       "/data/local/tmp/"
   1070     ],
   1071     "cwd": "[START_DIR]/skia",
   1072     "env": {
   1073       "BUILDTYPE": "Debug",
   1074       "CHROME_HEADLESS": "1",
   1075       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
   1076       "SKIA_OUT": "[START_DIR]/out"
   1077     },
   1078     "infra_step": true,
   1079     "name": "push nanobench.sh"
   1080   },
   1081   {
   1082     "cmd": [
   1083       "/opt/infra-android/tools/adb",
   1084       "logcat",
   1085       "-c"
   1086     ],
   1087     "cwd": "[START_DIR]/skia",
   1088     "env": {
   1089       "BUILDTYPE": "Debug",
   1090       "CHROME_HEADLESS": "1",
   1091       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
   1092       "SKIA_OUT": "[START_DIR]/out"
   1093     },
   1094     "infra_step": true,
   1095     "name": "clear log"
   1096   },
   1097   {
   1098     "cmd": [
   1099       "python",
   1100       "-u",
   1101       "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh      = sys.argv[2]\nsubprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])\ntry:\n  sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',\n                                        bin_dir + 'rc'])))\nexcept ValueError:\n  print \"Couldn't read the return code.  Probably killed for OOM.\"\n  sys.exit(1)\n",
   1102       "/data/local/tmp/",
   1103       "nanobench.sh"
   1104     ],
   1105     "name": "nanobench",
   1106     "~followup_annotations": [
   1107       "@@@STEP_LOG_LINE (a] python.inline@@@@",
   1108       "@@@STEP_LOG_LINE (a] python.inline@import subprocess@@@",
   1109       "@@@STEP_LOG_LINE (a] python.inline@import sys@@@",
   1110       "@@@STEP_LOG_LINE (a] python.inline@bin_dir = sys.argv[1]@@@",
   1111       "@@@STEP_LOG_LINE (a] python.inline@sh      = sys.argv[2]@@@",
   1112       "@@@STEP_LOG_LINE (a] python.inline@subprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])@@@",
   1113       "@@@STEP_LOG_LINE (a] python.inline@try:@@@",
   1114       "@@@STEP_LOG_LINE (a] python.inline@  sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',@@@",
   1115       "@@@STEP_LOG_LINE (a] python.inline@                                        bin_dir + 'rc'])))@@@",
   1116       "@@@STEP_LOG_LINE (a] python.inline@except ValueError:@@@",
   1117       "@@@STEP_LOG_LINE (a] python.inline@  print \"Couldn't read the return code.  Probably killed for OOM.\"@@@",
   1118       "@@@STEP_LOG_LINE (a] python.inline@  sys.exit(1)@@@",
   1119       "@@@STEP_LOG_END (a] python.inline@@@"
   1120     ]
   1121   },
   1122   {
   1123     "cmd": [
   1124       "/opt/infra-android/tools/adb",
   1125       "pull",
   1126       "/sdcard/revenge_of_the_skiabot/perf",
   1127       "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android/data"
   1128     ],
   1129     "cwd": "[START_DIR]/skia",
   1130     "env": {
   1131       "BUILDTYPE": "Debug",
   1132       "CHROME_HEADLESS": "1",
   1133       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
   1134       "SKIA_OUT": "[START_DIR]/out"
   1135     },
   1136     "infra_step": true,
   1137     "name": "pull /sdcard/revenge_of_the_skiabot/perf [CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android/data"
   1138   },
   1139   {
   1140     "cmd": [
   1141       "python",
   1142       "-u",
   1143       "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n  tokens = line.split()\n  if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n    addr, path = tokens[-2:]\n    local = os.path.join(out, os.path.basename(path))\n    if os.path.exists(local):\n      sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n      line = line.replace(addr, addr + ' ' + sym.strip())\n  print line\n",
   1144       "[START_DIR]/out/Debug"
   1145     ],
   1146     "env": {
   1147       "BUILDTYPE": "Debug",
   1148       "CHROME_HEADLESS": "1",
   1149       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
   1150       "SKIA_OUT": "[START_DIR]/out"
   1151     },
   1152     "infra_step": true,
   1153     "name": "dump log",
   1154     "timeout": 300,
   1155     "~followup_annotations": [
   1156       "@@@STEP_LOG_LINE (a] python.inline@@@@",
   1157       "@@@STEP_LOG_LINE (a] python.inline@import os@@@",
   1158       "@@@STEP_LOG_LINE (a] python.inline@import subprocess@@@",
   1159       "@@@STEP_LOG_LINE (a] python.inline@import sys@@@",
   1160       "@@@STEP_LOG_LINE (a] python.inline@out = sys.argv[1]@@@",
   1161       "@@@STEP_LOG_LINE (a] python.inline@log = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])@@@",
   1162       "@@@STEP_LOG_LINE (a] python.inline@for line in log.split('\\n'):@@@",
   1163       "@@@STEP_LOG_LINE (a] python.inline@  tokens = line.split()@@@",
   1164       "@@@STEP_LOG_LINE (a] python.inline@  if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@",
   1165       "@@@STEP_LOG_LINE (a] python.inline@    addr, path = tokens[-2:]@@@",
   1166       "@@@STEP_LOG_LINE (a] python.inline@    local = os.path.join(out, os.path.basename(path))@@@",
   1167       "@@@STEP_LOG_LINE (a] python.inline@    if os.path.exists(local):@@@",
   1168       "@@@STEP_LOG_LINE (a] python.inline@      sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@",
   1169       "@@@STEP_LOG_LINE (a] python.inline@      line = line.replace(addr, addr + ' ' + sym.strip())@@@",
   1170       "@@@STEP_LOG_LINE (a] python.inline@  print line@@@",
   1171       "@@@STEP_LOG_END (a] python.inline@@@"
   1172     ]
   1173   },
   1174   {
   1175     "cmd": [
   1176       "/opt/infra-android/tools/adb",
   1177       "kill-server"
   1178     ],
   1179     "cwd": "[START_DIR]/skia",
   1180     "env": {
   1181       "BUILDTYPE": "Debug",
   1182       "CHROME_HEADLESS": "1",
   1183       "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
   1184       "SKIA_OUT": "[START_DIR]/out"
   1185     },
   1186     "infra_step": true,
   1187     "name": "kill adb server"
   1188   },
   1189   {
   1190     "name": "$result",
   1191     "recipe_result": null,
   1192     "status_code": 0
   1193   }
   1194 ]