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