Home | History | Annotate | Download | only in test.expected
      1 [
      2   {
      3     "cmd": [
      4       "python",
      5       "-u",
      6       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
      7       "--json-output",
      8       "/path/to/tmp/json",
      9       "ensure-directory",
     10       "--mode",
     11       "0777",
     12       "[START_DIR]/tmp"
     13     ],
     14     "infra_step": true,
     15     "name": "makedirs tmp_dir"
     16   },
     17   {
     18     "cmd": [
     19       "python",
     20       "-u",
     21       "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n"
     22     ],
     23     "name": "get swarming bot id",
     24     "stdout": "/path/to/tmp/",
     25     "~followup_annotations": [
     26       "@@@STEP_LOG_LINE (a] python.inline@import os@@@",
     27       "@@@STEP_LOG_LINE (a] python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@",
     28       "@@@STEP_LOG_END (a] python.inline@@@"
     29     ]
     30   },
     31   {
     32     "cmd": [
     33       "/opt/infra-android/tools/adb",
     34       "shell",
     35       "mkdir",
     36       "-p",
     37       "/sdcard/revenge_of_the_skiabot/resources"
     38     ],
     39     "cwd": "[START_DIR]/skia",
     40     "env": {
     41       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
     42       "CHROME_HEADLESS": "1",
     43       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
     44     },
     45     "infra_step": true,
     46     "name": "mkdir /sdcard/revenge_of_the_skiabot/resources"
     47   },
     48   {
     49     "cmd": [
     50       "python",
     51       "-u",
     52       "\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",
     53       "[START_DIR]/skia/resources",
     54       "/sdcard/revenge_of_the_skiabot/resources"
     55     ],
     56     "env": {
     57       "CHROME_HEADLESS": "1",
     58       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
     59     },
     60     "infra_step": true,
     61     "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources",
     62     "~followup_annotations": [
     63       "@@@STEP_LOG_LINE (a] python.inline@@@@",
     64       "@@@STEP_LOG_LINE (a] python.inline@import os@@@",
     65       "@@@STEP_LOG_LINE (a] python.inline@import subprocess@@@",
     66       "@@@STEP_LOG_LINE (a] python.inline@import sys@@@",
     67       "@@@STEP_LOG_LINE (a] python.inline@host   = sys.argv[1]@@@",
     68       "@@@STEP_LOG_LINE (a] python.inline@device = sys.argv[2]@@@",
     69       "@@@STEP_LOG_LINE (a] python.inline@for d, _, fs in os.walk(host):@@@",
     70       "@@@STEP_LOG_LINE (a] python.inline@  p = os.path.relpath(d, host)@@@",
     71       "@@@STEP_LOG_LINE (a] python.inline@  if p != '.' and p.startswith('.'):@@@",
     72       "@@@STEP_LOG_LINE (a] python.inline@    continue@@@",
     73       "@@@STEP_LOG_LINE (a] python.inline@  for f in fs:@@@",
     74       "@@@STEP_LOG_LINE (a] python.inline@    print os.path.join(p,f)@@@",
     75       "@@@STEP_LOG_LINE (a] python.inline@    subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@",
     76       "@@@STEP_LOG_LINE (a] python.inline@                           os.path.realpath(os.path.join(host, p, f)),@@@",
     77       "@@@STEP_LOG_LINE (a] python.inline@                           os.path.join(device, p, f)])@@@",
     78       "@@@STEP_LOG_END (a] python.inline@@@"
     79     ]
     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       "copy",
     89       "[START_DIR]/skia/infra/bots/assets/skp/VERSION",
     90       "/path/to/tmp/"
     91     ],
     92     "infra_step": true,
     93     "name": "Get skp VERSION"
     94   },
     95   {
     96     "cmd": [
     97       "python",
     98       "-u",
     99       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
    100       "--json-output",
    101       "/path/to/tmp/json",
    102       "copy",
    103       "42",
    104       "[START_DIR]/tmp/SKP_VERSION"
    105     ],
    106     "infra_step": true,
    107     "name": "write SKP_VERSION"
    108   },
    109   {
    110     "cmd": [
    111       "/opt/infra-android/tools/adb",
    112       "shell",
    113       "cat",
    114       "/sdcard/revenge_of_the_skiabot/SKP_VERSION"
    115     ],
    116     "cwd": "[START_DIR]/skia",
    117     "env": {
    118       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    119       "CHROME_HEADLESS": "1",
    120       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    121     },
    122     "infra_step": true,
    123     "name": "read /sdcard/revenge_of_the_skiabot/SKP_VERSION",
    124     "stdout": "/path/to/tmp/"
    125   },
    126   {
    127     "cmd": [
    128       "/opt/infra-android/tools/adb",
    129       "shell",
    130       "rm",
    131       "-f",
    132       "/sdcard/revenge_of_the_skiabot/SKP_VERSION"
    133     ],
    134     "cwd": "[START_DIR]/skia",
    135     "env": {
    136       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    137       "CHROME_HEADLESS": "1",
    138       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    139     },
    140     "infra_step": true,
    141     "name": "rm /sdcard/revenge_of_the_skiabot/SKP_VERSION"
    142   },
    143   {
    144     "cmd": [
    145       "/opt/infra-android/tools/adb",
    146       "shell",
    147       "rm",
    148       "-rf",
    149       "/sdcard/revenge_of_the_skiabot/skps"
    150     ],
    151     "cwd": "[START_DIR]/skia",
    152     "env": {
    153       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    154       "CHROME_HEADLESS": "1",
    155       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    156     },
    157     "infra_step": true,
    158     "name": "rm /sdcard/revenge_of_the_skiabot/skps"
    159   },
    160   {
    161     "cmd": [
    162       "/opt/infra-android/tools/adb",
    163       "shell",
    164       "mkdir",
    165       "-p",
    166       "/sdcard/revenge_of_the_skiabot/skps"
    167     ],
    168     "cwd": "[START_DIR]/skia",
    169     "env": {
    170       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    171       "CHROME_HEADLESS": "1",
    172       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    173     },
    174     "infra_step": true,
    175     "name": "mkdir /sdcard/revenge_of_the_skiabot/skps"
    176   },
    177   {
    178     "cmd": [
    179       "python",
    180       "-u",
    181       "\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",
    182       "[START_DIR]/skp",
    183       "/sdcard/revenge_of_the_skiabot/skps"
    184     ],
    185     "env": {
    186       "CHROME_HEADLESS": "1",
    187       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    188     },
    189     "infra_step": true,
    190     "name": "push [START_DIR]/skp/* /sdcard/revenge_of_the_skiabot/skps",
    191     "~followup_annotations": [
    192       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    193       "@@@STEP_LOG_LINE (a] python.inline@import os@@@",
    194       "@@@STEP_LOG_LINE (a] python.inline@import subprocess@@@",
    195       "@@@STEP_LOG_LINE (a] python.inline@import sys@@@",
    196       "@@@STEP_LOG_LINE (a] python.inline@host   = sys.argv[1]@@@",
    197       "@@@STEP_LOG_LINE (a] python.inline@device = sys.argv[2]@@@",
    198       "@@@STEP_LOG_LINE (a] python.inline@for d, _, fs in os.walk(host):@@@",
    199       "@@@STEP_LOG_LINE (a] python.inline@  p = os.path.relpath(d, host)@@@",
    200       "@@@STEP_LOG_LINE (a] python.inline@  if p != '.' and p.startswith('.'):@@@",
    201       "@@@STEP_LOG_LINE (a] python.inline@    continue@@@",
    202       "@@@STEP_LOG_LINE (a] python.inline@  for f in fs:@@@",
    203       "@@@STEP_LOG_LINE (a] python.inline@    print os.path.join(p,f)@@@",
    204       "@@@STEP_LOG_LINE (a] python.inline@    subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@",
    205       "@@@STEP_LOG_LINE (a] python.inline@                           os.path.realpath(os.path.join(host, p, f)),@@@",
    206       "@@@STEP_LOG_LINE (a] python.inline@                           os.path.join(device, p, f)])@@@",
    207       "@@@STEP_LOG_END (a] python.inline@@@"
    208     ]
    209   },
    210   {
    211     "cmd": [
    212       "/opt/infra-android/tools/adb",
    213       "push",
    214       "[START_DIR]/tmp/SKP_VERSION",
    215       "/sdcard/revenge_of_the_skiabot/SKP_VERSION"
    216     ],
    217     "cwd": "[START_DIR]/skia",
    218     "env": {
    219       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    220       "CHROME_HEADLESS": "1",
    221       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    222     },
    223     "infra_step": true,
    224     "name": "push [START_DIR]/tmp/SKP_VERSION /sdcard/revenge_of_the_skiabot/SKP_VERSION"
    225   },
    226   {
    227     "cmd": [
    228       "python",
    229       "-u",
    230       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
    231       "--json-output",
    232       "/path/to/tmp/json",
    233       "copy",
    234       "[START_DIR]/skia/infra/bots/assets/skimage/VERSION",
    235       "/path/to/tmp/"
    236     ],
    237     "infra_step": true,
    238     "name": "Get skimage VERSION"
    239   },
    240   {
    241     "cmd": [
    242       "python",
    243       "-u",
    244       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
    245       "--json-output",
    246       "/path/to/tmp/json",
    247       "copy",
    248       "42",
    249       "[START_DIR]/tmp/SK_IMAGE_VERSION"
    250     ],
    251     "infra_step": true,
    252     "name": "write SK_IMAGE_VERSION"
    253   },
    254   {
    255     "cmd": [
    256       "/opt/infra-android/tools/adb",
    257       "shell",
    258       "cat",
    259       "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION"
    260     ],
    261     "cwd": "[START_DIR]/skia",
    262     "env": {
    263       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    264       "CHROME_HEADLESS": "1",
    265       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    266     },
    267     "infra_step": true,
    268     "name": "read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION",
    269     "stdout": "/path/to/tmp/"
    270   },
    271   {
    272     "cmd": [
    273       "/opt/infra-android/tools/adb",
    274       "shell",
    275       "rm",
    276       "-f",
    277       "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION"
    278     ],
    279     "cwd": "[START_DIR]/skia",
    280     "env": {
    281       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    282       "CHROME_HEADLESS": "1",
    283       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    284     },
    285     "infra_step": true,
    286     "name": "rm /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION"
    287   },
    288   {
    289     "cmd": [
    290       "/opt/infra-android/tools/adb",
    291       "shell",
    292       "rm",
    293       "-rf",
    294       "/sdcard/revenge_of_the_skiabot/images"
    295     ],
    296     "cwd": "[START_DIR]/skia",
    297     "env": {
    298       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    299       "CHROME_HEADLESS": "1",
    300       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    301     },
    302     "infra_step": true,
    303     "name": "rm /sdcard/revenge_of_the_skiabot/images"
    304   },
    305   {
    306     "cmd": [
    307       "/opt/infra-android/tools/adb",
    308       "shell",
    309       "mkdir",
    310       "-p",
    311       "/sdcard/revenge_of_the_skiabot/images"
    312     ],
    313     "cwd": "[START_DIR]/skia",
    314     "env": {
    315       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    316       "CHROME_HEADLESS": "1",
    317       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    318     },
    319     "infra_step": true,
    320     "name": "mkdir /sdcard/revenge_of_the_skiabot/images"
    321   },
    322   {
    323     "cmd": [
    324       "python",
    325       "-u",
    326       "\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",
    327       "[START_DIR]/skimage",
    328       "/sdcard/revenge_of_the_skiabot/images"
    329     ],
    330     "env": {
    331       "CHROME_HEADLESS": "1",
    332       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    333     },
    334     "infra_step": true,
    335     "name": "push [START_DIR]/skimage/* /sdcard/revenge_of_the_skiabot/images",
    336     "~followup_annotations": [
    337       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    338       "@@@STEP_LOG_LINE (a] python.inline@import os@@@",
    339       "@@@STEP_LOG_LINE (a] python.inline@import subprocess@@@",
    340       "@@@STEP_LOG_LINE (a] python.inline@import sys@@@",
    341       "@@@STEP_LOG_LINE (a] python.inline@host   = sys.argv[1]@@@",
    342       "@@@STEP_LOG_LINE (a] python.inline@device = sys.argv[2]@@@",
    343       "@@@STEP_LOG_LINE (a] python.inline@for d, _, fs in os.walk(host):@@@",
    344       "@@@STEP_LOG_LINE (a] python.inline@  p = os.path.relpath(d, host)@@@",
    345       "@@@STEP_LOG_LINE (a] python.inline@  if p != '.' and p.startswith('.'):@@@",
    346       "@@@STEP_LOG_LINE (a] python.inline@    continue@@@",
    347       "@@@STEP_LOG_LINE (a] python.inline@  for f in fs:@@@",
    348       "@@@STEP_LOG_LINE (a] python.inline@    print os.path.join(p,f)@@@",
    349       "@@@STEP_LOG_LINE (a] python.inline@    subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@",
    350       "@@@STEP_LOG_LINE (a] python.inline@                           os.path.realpath(os.path.join(host, p, f)),@@@",
    351       "@@@STEP_LOG_LINE (a] python.inline@                           os.path.join(device, p, f)])@@@",
    352       "@@@STEP_LOG_END (a] python.inline@@@"
    353     ]
    354   },
    355   {
    356     "cmd": [
    357       "/opt/infra-android/tools/adb",
    358       "push",
    359       "[START_DIR]/tmp/SK_IMAGE_VERSION",
    360       "/sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION"
    361     ],
    362     "cwd": "[START_DIR]/skia",
    363     "env": {
    364       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    365       "CHROME_HEADLESS": "1",
    366       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    367     },
    368     "infra_step": true,
    369     "name": "push [START_DIR]/tmp/SK_IMAGE_VERSION /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION"
    370   },
    371   {
    372     "cmd": [
    373       "python",
    374       "-u",
    375       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
    376       "--json-output",
    377       "/path/to/tmp/json",
    378       "copy",
    379       "[START_DIR]/skia/infra/bots/assets/svg/VERSION",
    380       "/path/to/tmp/"
    381     ],
    382     "infra_step": true,
    383     "name": "Get svg VERSION"
    384   },
    385   {
    386     "cmd": [
    387       "python",
    388       "-u",
    389       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
    390       "--json-output",
    391       "/path/to/tmp/json",
    392       "copy",
    393       "42",
    394       "[START_DIR]/tmp/SVG_VERSION"
    395     ],
    396     "infra_step": true,
    397     "name": "write SVG_VERSION"
    398   },
    399   {
    400     "cmd": [
    401       "/opt/infra-android/tools/adb",
    402       "shell",
    403       "cat",
    404       "/sdcard/revenge_of_the_skiabot/SVG_VERSION"
    405     ],
    406     "cwd": "[START_DIR]/skia",
    407     "env": {
    408       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    409       "CHROME_HEADLESS": "1",
    410       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    411     },
    412     "infra_step": true,
    413     "name": "read /sdcard/revenge_of_the_skiabot/SVG_VERSION",
    414     "stdout": "/path/to/tmp/"
    415   },
    416   {
    417     "cmd": [
    418       "/opt/infra-android/tools/adb",
    419       "shell",
    420       "rm",
    421       "-f",
    422       "/sdcard/revenge_of_the_skiabot/SVG_VERSION"
    423     ],
    424     "cwd": "[START_DIR]/skia",
    425     "env": {
    426       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    427       "CHROME_HEADLESS": "1",
    428       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    429     },
    430     "infra_step": true,
    431     "name": "rm /sdcard/revenge_of_the_skiabot/SVG_VERSION"
    432   },
    433   {
    434     "cmd": [
    435       "/opt/infra-android/tools/adb",
    436       "shell",
    437       "rm",
    438       "-rf",
    439       "/sdcard/revenge_of_the_skiabot/svgs"
    440     ],
    441     "cwd": "[START_DIR]/skia",
    442     "env": {
    443       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    444       "CHROME_HEADLESS": "1",
    445       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    446     },
    447     "infra_step": true,
    448     "name": "rm /sdcard/revenge_of_the_skiabot/svgs"
    449   },
    450   {
    451     "cmd": [
    452       "/opt/infra-android/tools/adb",
    453       "shell",
    454       "mkdir",
    455       "-p",
    456       "/sdcard/revenge_of_the_skiabot/svgs"
    457     ],
    458     "cwd": "[START_DIR]/skia",
    459     "env": {
    460       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    461       "CHROME_HEADLESS": "1",
    462       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    463     },
    464     "infra_step": true,
    465     "name": "mkdir /sdcard/revenge_of_the_skiabot/svgs"
    466   },
    467   {
    468     "cmd": [
    469       "python",
    470       "-u",
    471       "\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",
    472       "[START_DIR]/svg",
    473       "/sdcard/revenge_of_the_skiabot/svgs"
    474     ],
    475     "env": {
    476       "CHROME_HEADLESS": "1",
    477       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    478     },
    479     "infra_step": true,
    480     "name": "push [START_DIR]/svg/* /sdcard/revenge_of_the_skiabot/svgs",
    481     "~followup_annotations": [
    482       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    483       "@@@STEP_LOG_LINE (a] python.inline@import os@@@",
    484       "@@@STEP_LOG_LINE (a] python.inline@import subprocess@@@",
    485       "@@@STEP_LOG_LINE (a] python.inline@import sys@@@",
    486       "@@@STEP_LOG_LINE (a] python.inline@host   = sys.argv[1]@@@",
    487       "@@@STEP_LOG_LINE (a] python.inline@device = sys.argv[2]@@@",
    488       "@@@STEP_LOG_LINE (a] python.inline@for d, _, fs in os.walk(host):@@@",
    489       "@@@STEP_LOG_LINE (a] python.inline@  p = os.path.relpath(d, host)@@@",
    490       "@@@STEP_LOG_LINE (a] python.inline@  if p != '.' and p.startswith('.'):@@@",
    491       "@@@STEP_LOG_LINE (a] python.inline@    continue@@@",
    492       "@@@STEP_LOG_LINE (a] python.inline@  for f in fs:@@@",
    493       "@@@STEP_LOG_LINE (a] python.inline@    print os.path.join(p,f)@@@",
    494       "@@@STEP_LOG_LINE (a] python.inline@    subprocess.check_call(['/opt/infra-android/tools/adb', 'push',@@@",
    495       "@@@STEP_LOG_LINE (a] python.inline@                           os.path.realpath(os.path.join(host, p, f)),@@@",
    496       "@@@STEP_LOG_LINE (a] python.inline@                           os.path.join(device, p, f)])@@@",
    497       "@@@STEP_LOG_END (a] python.inline@@@"
    498     ]
    499   },
    500   {
    501     "cmd": [
    502       "/opt/infra-android/tools/adb",
    503       "push",
    504       "[START_DIR]/tmp/SVG_VERSION",
    505       "/sdcard/revenge_of_the_skiabot/SVG_VERSION"
    506     ],
    507     "cwd": "[START_DIR]/skia",
    508     "env": {
    509       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    510       "CHROME_HEADLESS": "1",
    511       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    512     },
    513     "infra_step": true,
    514     "name": "push [START_DIR]/tmp/SVG_VERSION /sdcard/revenge_of_the_skiabot/SVG_VERSION"
    515   },
    516   {
    517     "cmd": [
    518       "python",
    519       "-u",
    520       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
    521       "--json-output",
    522       "/path/to/tmp/json",
    523       "rmtree",
    524       "[START_DIR]/test"
    525     ],
    526     "infra_step": true,
    527     "name": "rmtree test"
    528   },
    529   {
    530     "cmd": [
    531       "python",
    532       "-u",
    533       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
    534       "--json-output",
    535       "/path/to/tmp/json",
    536       "ensure-directory",
    537       "--mode",
    538       "0777",
    539       "[START_DIR]/test"
    540     ],
    541     "infra_step": true,
    542     "name": "makedirs test"
    543   },
    544   {
    545     "cmd": [
    546       "/opt/infra-android/tools/adb",
    547       "shell",
    548       "rm",
    549       "-rf",
    550       "/sdcard/revenge_of_the_skiabot/dm_out"
    551     ],
    552     "cwd": "[START_DIR]/skia",
    553     "env": {
    554       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    555       "CHROME_HEADLESS": "1",
    556       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    557     },
    558     "infra_step": true,
    559     "name": "rm /sdcard/revenge_of_the_skiabot/dm_out"
    560   },
    561   {
    562     "cmd": [
    563       "/opt/infra-android/tools/adb",
    564       "shell",
    565       "mkdir",
    566       "-p",
    567       "/sdcard/revenge_of_the_skiabot/dm_out"
    568     ],
    569     "cwd": "[START_DIR]/skia",
    570     "env": {
    571       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    572       "CHROME_HEADLESS": "1",
    573       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    574     },
    575     "infra_step": true,
    576     "name": "mkdir /sdcard/revenge_of_the_skiabot/dm_out"
    577   },
    578   {
    579     "cmd": [
    580       "python",
    581       "-u",
    582       "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = sys.argv[1]\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n  try:\n    with contextlib.closing(\n        urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n      hashes = w.read()\n      with open(sys.argv[2], 'w') as f:\n        f.write(hashes)\n        break\n  except Exception as e:\n    print 'Failed to get uninteresting hashes from %s:' % HASHES_URL\n    print e\n    if retry == RETRIES:\n      raise\n    waittime = WAIT_BASE * math.pow(2, retry)\n    print 'Retry in %d seconds.' % waittime\n    time.sleep(waittime)\n",
    583       "https://example.com/hashes.txt",
    584       "[START_DIR]/tmp/uninteresting_hashes.txt"
    585     ],
    586     "env": {
    587       "CHROME_HEADLESS": "1",
    588       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    589     },
    590     "infra_step": true,
    591     "name": "get uninteresting hashes",
    592     "~followup_annotations": [
    593       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    594       "@@@STEP_LOG_LINE (a] python.inline@import contextlib@@@",
    595       "@@@STEP_LOG_LINE (a] python.inline@import math@@@",
    596       "@@@STEP_LOG_LINE (a] python.inline@import socket@@@",
    597       "@@@STEP_LOG_LINE (a] python.inline@import sys@@@",
    598       "@@@STEP_LOG_LINE (a] python.inline@import time@@@",
    599       "@@@STEP_LOG_LINE (a] python.inline@import urllib2@@@",
    600       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    601       "@@@STEP_LOG_LINE (a] python.inline@HASHES_URL = sys.argv[1]@@@",
    602       "@@@STEP_LOG_LINE (a] python.inline@RETRIES = 5@@@",
    603       "@@@STEP_LOG_LINE (a] python.inline@TIMEOUT = 60@@@",
    604       "@@@STEP_LOG_LINE (a] python.inline@WAIT_BASE = 15@@@",
    605       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    606       "@@@STEP_LOG_LINE (a] python.inline@socket.setdefaulttimeout(TIMEOUT)@@@",
    607       "@@@STEP_LOG_LINE (a] python.inline@for retry in range(RETRIES):@@@",
    608       "@@@STEP_LOG_LINE (a] python.inline@  try:@@@",
    609       "@@@STEP_LOG_LINE (a] python.inline@    with contextlib.closing(@@@",
    610       "@@@STEP_LOG_LINE (a] python.inline@        urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@",
    611       "@@@STEP_LOG_LINE (a] python.inline@      hashes = w.read()@@@",
    612       "@@@STEP_LOG_LINE (a] python.inline@      with open(sys.argv[2], 'w') as f:@@@",
    613       "@@@STEP_LOG_LINE (a] python.inline@        f.write(hashes)@@@",
    614       "@@@STEP_LOG_LINE (a] python.inline@        break@@@",
    615       "@@@STEP_LOG_LINE (a] python.inline@  except Exception as e:@@@",
    616       "@@@STEP_LOG_LINE (a] python.inline@    print 'Failed to get uninteresting hashes from %s:' % HASHES_URL@@@",
    617       "@@@STEP_LOG_LINE (a] python.inline@    print e@@@",
    618       "@@@STEP_LOG_LINE (a] python.inline@    if retry == RETRIES:@@@",
    619       "@@@STEP_LOG_LINE (a] python.inline@      raise@@@",
    620       "@@@STEP_LOG_LINE (a] python.inline@    waittime = WAIT_BASE * math.pow(2, retry)@@@",
    621       "@@@STEP_LOG_LINE (a] python.inline@    print 'Retry in %d seconds.' % waittime@@@",
    622       "@@@STEP_LOG_LINE (a] python.inline@    time.sleep(waittime)@@@",
    623       "@@@STEP_LOG_END (a] python.inline@@@"
    624     ]
    625   },
    626   {
    627     "cmd": [
    628       "/opt/infra-android/tools/adb",
    629       "push",
    630       "[START_DIR]/tmp/uninteresting_hashes.txt",
    631       "/sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt"
    632     ],
    633     "cwd": "[START_DIR]/skia",
    634     "env": {
    635       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    636       "CHROME_HEADLESS": "1",
    637       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    638     },
    639     "infra_step": true,
    640     "name": "push [START_DIR]/tmp/uninteresting_hashes.txt /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt"
    641   },
    642   {
    643     "cmd": [
    644       "python",
    645       "-u",
    646       "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n"
    647     ],
    648     "name": "get swarming bot id (2)",
    649     "stdout": "/path/to/tmp/",
    650     "~followup_annotations": [
    651       "@@@STEP_LOG_LINE (a] python.inline@import os@@@",
    652       "@@@STEP_LOG_LINE (a] python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@",
    653       "@@@STEP_LOG_END (a] python.inline@@@"
    654     ]
    655   },
    656   {
    657     "cmd": [
    658       "python",
    659       "-u",
    660       "import os\nprint os.environ.get('SWARMING_TASK_ID', '')\n"
    661     ],
    662     "name": "get swarming task id",
    663     "stdout": "/path/to/tmp/",
    664     "~followup_annotations": [
    665       "@@@STEP_LOG_LINE (a] python.inline@import os@@@",
    666       "@@@STEP_LOG_LINE (a] python.inline@print os.environ.get('SWARMING_TASK_ID', '')@@@",
    667       "@@@STEP_LOG_END (a] python.inline@@@"
    668     ]
    669   },
    670   {
    671     "cmd": [
    672       "/opt/infra-android/tools/adb",
    673       "push",
    674       "[START_DIR]/build/dm",
    675       "/data/local/tmp/"
    676     ],
    677     "cwd": "[START_DIR]/skia",
    678     "env": {
    679       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    680       "CHROME_HEADLESS": "1",
    681       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    682     },
    683     "infra_step": true,
    684     "name": "push dm"
    685   },
    686   {
    687     "cmd": [
    688       "python",
    689       "-u",
    690       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
    691       "--json-output",
    692       "/path/to/tmp/json",
    693       "copy",
    694       "set -x; /data/local/tmp/dm --resourcePath /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/dm --colorImages /sdcard/revenge_of_the_skiabot/images/colorspace --nameByHash --properties gitHash abc123 builder Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-All-Android buildbucket_build_id 123454321 task_id task_12345 swarming_bot_id \"\" swarming_task_id \"\" --svgs /sdcard/revenge_of_the_skiabot/svgs --key arch arm compiler Clang configuration Debug cpu_or_gpu GPU cpu_or_gpu_value Tegra3 extra_config Android model Nexus7 os Android style default --uninterestingHashesFile /sdcard/revenge_of_the_skiabot/uninteresting_hashes.txt --writePath /sdcard/revenge_of_the_skiabot/dm_out --dont_write pdf --nocpu --config gles glesdft glessrgb --src tests gm image colorImage svg --blacklist _ svg _ svgparse_ glessrgb image _ _ _ image gen_platf error _ test _ GrShape _ test _ SRGBReadWritePixels _ image _ interlaced1.png _ image _ interlaced2.png _ image _ interlaced3.png _ image _ .arw _ image _ .cr2 _ image _ .dng _ image _ .nef _ image _ .nrw _ image _ .orf _ image _ .raf _ image _ .rw2 _ image _ .pef _ image _ .srw _ image _ .ARW _ image _ .CR2 _ image _ .DNG _ image _ .NEF _ image _ .NRW _ image _ .ORF _ image _ .RAF _ image _ .RW2 _ image _ .PEF _ image _ .SRW --nonativeFonts --verbose; echo $? >/data/local/tmp/rc",
    695       "[START_DIR]/tmp/dm.sh"
    696     ],
    697     "env": {
    698       "CHROME_HEADLESS": "1",
    699       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    700     },
    701     "infra_step": true,
    702     "name": "write dm.sh"
    703   },
    704   {
    705     "cmd": [
    706       "/opt/infra-android/tools/adb",
    707       "push",
    708       "[START_DIR]/tmp/dm.sh",
    709       "/data/local/tmp/"
    710     ],
    711     "cwd": "[START_DIR]/skia",
    712     "env": {
    713       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    714       "CHROME_HEADLESS": "1",
    715       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    716     },
    717     "infra_step": true,
    718     "name": "push dm.sh"
    719   },
    720   {
    721     "cmd": [
    722       "/opt/infra-android/tools/adb",
    723       "logcat",
    724       "-c"
    725     ],
    726     "cwd": "[START_DIR]/skia",
    727     "env": {
    728       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    729       "CHROME_HEADLESS": "1",
    730       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    731     },
    732     "infra_step": true,
    733     "name": "clear log"
    734   },
    735   {
    736     "cmd": [
    737       "python",
    738       "-u",
    739       "\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",
    740       "/data/local/tmp/",
    741       "dm.sh"
    742     ],
    743     "env": {
    744       "CHROME_HEADLESS": "1",
    745       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    746     },
    747     "name": "dm",
    748     "~followup_annotations": [
    749       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    750       "@@@STEP_LOG_LINE (a] python.inline@import subprocess@@@",
    751       "@@@STEP_LOG_LINE (a] python.inline@import sys@@@",
    752       "@@@STEP_LOG_LINE (a] python.inline@bin_dir = sys.argv[1]@@@",
    753       "@@@STEP_LOG_LINE (a] python.inline@sh      = sys.argv[2]@@@",
    754       "@@@STEP_LOG_LINE (a] python.inline@subprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])@@@",
    755       "@@@STEP_LOG_LINE (a] python.inline@try:@@@",
    756       "@@@STEP_LOG_LINE (a] python.inline@  sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',@@@",
    757       "@@@STEP_LOG_LINE (a] python.inline@                                        bin_dir + 'rc'])))@@@",
    758       "@@@STEP_LOG_LINE (a] python.inline@except ValueError:@@@",
    759       "@@@STEP_LOG_LINE (a] python.inline@  print \"Couldn't read the return code.  Probably killed for OOM.\"@@@",
    760       "@@@STEP_LOG_LINE (a] python.inline@  sys.exit(1)@@@",
    761       "@@@STEP_LOG_END (a] python.inline@@@"
    762     ]
    763   },
    764   {
    765     "cmd": [],
    766     "name": "adb pull"
    767   },
    768   {
    769     "cmd": [
    770       "/opt/infra-android/tools/adb",
    771       "pull",
    772       "/sdcard/revenge_of_the_skiabot/dm_out",
    773       "[CLEANUP]/adb_pull_tmp_1"
    774     ],
    775     "cwd": "[START_DIR]/skia",
    776     "env": {
    777       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    778       "CHROME_HEADLESS": "1",
    779       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    780     },
    781     "infra_step": true,
    782     "name": "adb pull.pull /sdcard/revenge_of_the_skiabot/dm_out",
    783     "~followup_annotations": [
    784       "@@@STEP_NEST_LEVEL@1@@@"
    785     ]
    786   },
    787   {
    788     "cmd": [
    789       "python",
    790       "-u",
    791       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
    792       "--json-output",
    793       "/path/to/tmp/json",
    794       "glob",
    795       "[CLEANUP]/adb_pull_tmp_1",
    796       "dm_out/*"
    797     ],
    798     "infra_step": true,
    799     "name": "adb pull.list pulled files",
    800     "stdout": "/path/to/tmp/",
    801     "~followup_annotations": [
    802       "@@@STEP_NEST_LEVEL@1@@@",
    803       "@@@STEP_LOG_LINE@glob@[CLEANUP]/adb_pull_tmp_1/1.png@@@",
    804       "@@@STEP_LOG_LINE@glob@[CLEANUP]/adb_pull_tmp_1/2.png@@@",
    805       "@@@STEP_LOG_END@glob@@@"
    806     ]
    807   },
    808   {
    809     "cmd": [
    810       "python",
    811       "-u",
    812       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
    813       "--json-output",
    814       "/path/to/tmp/json",
    815       "copy",
    816       "[CLEANUP]/adb_pull_tmp_1/1.png",
    817       "[START_DIR]/[SWARM_OUT_DIR]"
    818     ],
    819     "infra_step": true,
    820     "name": "adb pull.copy 1.png",
    821     "~followup_annotations": [
    822       "@@@STEP_NEST_LEVEL@1@@@"
    823     ]
    824   },
    825   {
    826     "cmd": [
    827       "python",
    828       "-u",
    829       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
    830       "--json-output",
    831       "/path/to/tmp/json",
    832       "copy",
    833       "[CLEANUP]/adb_pull_tmp_1/2.png",
    834       "[START_DIR]/[SWARM_OUT_DIR]"
    835     ],
    836     "infra_step": true,
    837     "name": "adb pull.copy 2.png",
    838     "~followup_annotations": [
    839       "@@@STEP_NEST_LEVEL@1@@@"
    840     ]
    841   },
    842   {
    843     "cmd": [
    844       "python",
    845       "-u",
    846       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
    847       "--json-output",
    848       "/path/to/tmp/json",
    849       "rmtree",
    850       "[CLEANUP]/adb_pull_tmp_1"
    851     ],
    852     "infra_step": true,
    853     "name": "adb pull.rmtree [CLEANUP]/adb_pull_tmp_1",
    854     "~followup_annotations": [
    855       "@@@STEP_NEST_LEVEL@1@@@"
    856     ]
    857   },
    858   {
    859     "cmd": [
    860       "python",
    861       "-u",
    862       "\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",
    863       "[START_DIR]/build"
    864     ],
    865     "env": {
    866       "CHROME_HEADLESS": "1",
    867       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    868     },
    869     "infra_step": true,
    870     "name": "dump log",
    871     "timeout": 300,
    872     "~followup_annotations": [
    873       "@@@STEP_LOG_LINE (a] python.inline@@@@",
    874       "@@@STEP_LOG_LINE (a] python.inline@import os@@@",
    875       "@@@STEP_LOG_LINE (a] python.inline@import subprocess@@@",
    876       "@@@STEP_LOG_LINE (a] python.inline@import sys@@@",
    877       "@@@STEP_LOG_LINE (a] python.inline@out = sys.argv[1]@@@",
    878       "@@@STEP_LOG_LINE (a] python.inline@log = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])@@@",
    879       "@@@STEP_LOG_LINE (a] python.inline@for line in log.split('\\n'):@@@",
    880       "@@@STEP_LOG_LINE (a] python.inline@  tokens = line.split()@@@",
    881       "@@@STEP_LOG_LINE (a] python.inline@  if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@",
    882       "@@@STEP_LOG_LINE (a] python.inline@    addr, path = tokens[-2:]@@@",
    883       "@@@STEP_LOG_LINE (a] python.inline@    local = os.path.join(out, os.path.basename(path))@@@",
    884       "@@@STEP_LOG_LINE (a] python.inline@    if os.path.exists(local):@@@",
    885       "@@@STEP_LOG_LINE (a] python.inline@      sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@",
    886       "@@@STEP_LOG_LINE (a] python.inline@      line = line.replace(addr, addr + ' ' + sym.strip())@@@",
    887       "@@@STEP_LOG_LINE (a] python.inline@  print line@@@",
    888       "@@@STEP_LOG_END (a] python.inline@@@"
    889     ]
    890   },
    891   {
    892     "cmd": [
    893       "/opt/infra-android/tools/adb",
    894       "kill-server"
    895     ],
    896     "cwd": "[START_DIR]/skia",
    897     "env": {
    898       "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey",
    899       "CHROME_HEADLESS": "1",
    900       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
    901     },
    902     "infra_step": true,
    903     "name": "kill adb server"
    904   },
    905   {
    906     "jsonResult": null,
    907     "name": "$result"
    908   }
    909 ]