def create_clean_device_dir(self, path):
return self._f.create_clean_device_dir(path)
- def read_file_on_device(self, path):
- return self._f.read_file_on_device(path)
+ def read_file_on_device(self, path, **kwargs):
+ return self._f.read_file_on_device(path, **kwargs)
def remove_file_on_device(self, path):
return self._f.remove_file_on_device(path)
device_version_file = self.device_path_join(
self.device_dirs.tmp_dir, version_file)
if str(actual_version_file) != str(device_version_file):
- try:
- device_version = self.read_file_on_device(device_version_file)
- except self.m.step.StepFailure:
+ device_version = self.read_file_on_device(device_version_file,
+ abort_on_failure=False,
+ fail_build_on_failure=False)
+ if not device_version:
device_version = VERSION_NONE
if device_version != host_version:
self.remove_file_on_device(device_version_file)
"infra_step": true,
"name": "write SKP_VERSION"
},
- {
- "cmd": [
- "ssh",
- "-oConnectTimeout=15",
- "-oBatchMode=yes",
- "-t",
- "-t",
- "foo@127.0.0.1",
- "touch",
- "/home/chronos/user/SKP_VERSION"
- ],
- "env": {
- "BUILDTYPE": "Release",
- "CHROME_HEADLESS": "1",
- "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]",
- "SKIA_OUT": "[START_DIR]/out"
- },
- "infra_step": true,
- "name": "touch /home/chronos/user/SKP_VERSION"
- },
{
"cmd": [
"ssh",
"infra_step": true,
"name": "write SK_IMAGE_VERSION"
},
- {
- "cmd": [
- "ssh",
- "-oConnectTimeout=15",
- "-oBatchMode=yes",
- "-t",
- "-t",
- "foo@127.0.0.1",
- "touch",
- "/home/chronos/user/SK_IMAGE_VERSION"
- ],
- "env": {
- "BUILDTYPE": "Release",
- "CHROME_HEADLESS": "1",
- "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]",
- "SKIA_OUT": "[START_DIR]/out"
- },
- "infra_step": true,
- "name": "touch /home/chronos/user/SK_IMAGE_VERSION"
- },
{
"cmd": [
"ssh",
"infra_step": true,
"name": "write SVG_VERSION"
},
- {
- "cmd": [
- "ssh",
- "-oConnectTimeout=15",
- "-oBatchMode=yes",
- "-t",
- "-t",
- "foo@127.0.0.1",
- "touch",
- "/home/chronos/user/SVG_VERSION"
- ],
- "env": {
- "BUILDTYPE": "Release",
- "CHROME_HEADLESS": "1",
- "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]",
- "SKIA_OUT": "[START_DIR]/out"
- },
- "infra_step": true,
- "name": "touch /home/chronos/user/SVG_VERSION"
- },
{
"cmd": [
"ssh",
"@@@STEP_LOG_END@python.inline@@@"
]
},
- {
- "cmd": [
- "adb",
- "shell",
- "reboot",
- "-p"
- ],
- "cwd": "[START_DIR]/skia",
- "env": {
- "BUILDTYPE": "Debug",
- "CHROME_HEADLESS": "1",
- "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]",
- "SKIA_OUT": "[START_DIR]/out"
- },
- "infra_step": true,
- "name": "shut down device to quarantine bot"
- },
{
"cmd": [
"adb",
},
{
"name": "$result",
- "reason": "Failed build steps: read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION",
"recipe_result": null,
- "status_code": 1
+ "status_code": 0
}
]
\ No newline at end of file
def copy_directory_contents_to_host(self, device, host):
self._adb('pull %s %s' % (device, host), 'pull', device, host)
- def read_file_on_device(self, path):
- return self._adb('read %s' % path,
- 'shell', 'cat', path, stdout=self.m.raw_io.output()).stdout
+ def read_file_on_device(self, path, **kwargs):
+ rv = self._adb('read %s' % path,
+ 'shell', 'cat', path, stdout=self.m.raw_io.output(),
+ **kwargs)
+ return rv.stdout.rstrip() if rv and rv.stdout else None
def remove_file_on_device(self, path):
self._adb('rm %s' % path, 'shell', 'rm', '-f', path)
self._ssh('rm %s' % path, 'rm', '-rf', path)
self._ssh('mkdir %s' % path, 'mkdir', '-p', path)
- def read_file_on_device(self, path):
- # To avoid failure if file doesn't exist.
- self._ssh('touch %s' % path, 'touch', path)
- return self._ssh('read %s' % path,
- 'cat', path, stdout=self.m.raw_io.output()).stdout
+ def read_file_on_device(self, path, **kwargs):
+ rv = self._ssh('read %s' % path,
+ 'cat', path, stdout=self.m.raw_io.output(),
+ **kwargs)
+ return rv.stdout.rstrip() if rv and rv.stdout else None
def remove_file_on_device(self, path):
# use -f to silently return if path doesn't exist
self._run_ios_script('rm', path)
self._run_ios_script('mkdir', path)
- def read_file_on_device(self, path):
+ def read_file_on_device(self, path, **kwargs):
full = self.m.vars.skia_dir.join('platform_tools/ios/bin/ios_cat_file')
- rc = self.m.run(self.m.step,
+ rv = self.m.run(self.m.step,
name = 'cat_file %s' % path,
cmd = [full, path],
stdout=self.m.raw_io.output(),
- infra_step=kInfraStep)
- return rc.stdout.rstrip() if rc.stdout else rc.stdout
+ infra_step=kInfraStep,
+ **kwargs)
+ return rv.stdout.rstrip() if rv and rv.stdout else None
"infra_step": true,
"name": "write SKP_VERSION"
},
- {
- "cmd": [
- "ssh",
- "-oConnectTimeout=15",
- "-oBatchMode=yes",
- "-t",
- "-t",
- "foo@127.0.0.1",
- "touch",
- "/home/chronos/user/SKP_VERSION"
- ],
- "env": {
- "BUILDTYPE": "Release",
- "CHROME_HEADLESS": "1",
- "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]",
- "SKIA_OUT": "[START_DIR]/out"
- },
- "infra_step": true,
- "name": "touch /home/chronos/user/SKP_VERSION"
- },
{
"cmd": [
"ssh",
"infra_step": true,
"name": "write SK_IMAGE_VERSION"
},
- {
- "cmd": [
- "ssh",
- "-oConnectTimeout=15",
- "-oBatchMode=yes",
- "-t",
- "-t",
- "foo@127.0.0.1",
- "touch",
- "/home/chronos/user/SK_IMAGE_VERSION"
- ],
- "env": {
- "BUILDTYPE": "Release",
- "CHROME_HEADLESS": "1",
- "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]",
- "SKIA_OUT": "[START_DIR]/out"
- },
- "infra_step": true,
- "name": "touch /home/chronos/user/SK_IMAGE_VERSION"
- },
{
"cmd": [
"ssh",
"infra_step": true,
"name": "write SVG_VERSION"
},
- {
- "cmd": [
- "ssh",
- "-oConnectTimeout=15",
- "-oBatchMode=yes",
- "-t",
- "-t",
- "foo@127.0.0.1",
- "touch",
- "/home/chronos/user/SVG_VERSION"
- ],
- "env": {
- "BUILDTYPE": "Release",
- "CHROME_HEADLESS": "1",
- "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]",
- "SKIA_OUT": "[START_DIR]/out"
- },
- "infra_step": true,
- "name": "touch /home/chronos/user/SVG_VERSION"
- },
{
"cmd": [
"ssh",
"infra_step": true,
"name": "write SKP_VERSION"
},
- {
- "cmd": [
- "ssh",
- "-oConnectTimeout=15",
- "-oBatchMode=yes",
- "-t",
- "-t",
- "foo@127.0.0.1",
- "touch",
- "/home/chronos/user/SKP_VERSION"
- ],
- "env": {
- "BUILDTYPE": "Debug",
- "CHROME_HEADLESS": "1",
- "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]",
- "SKIA_OUT": "[START_DIR]/out"
- },
- "infra_step": true,
- "name": "touch /home/chronos/user/SKP_VERSION"
- },
{
"cmd": [
"ssh",
"infra_step": true,
"name": "write SK_IMAGE_VERSION"
},
- {
- "cmd": [
- "ssh",
- "-oConnectTimeout=15",
- "-oBatchMode=yes",
- "-t",
- "-t",
- "foo@127.0.0.1",
- "touch",
- "/home/chronos/user/SK_IMAGE_VERSION"
- ],
- "env": {
- "BUILDTYPE": "Debug",
- "CHROME_HEADLESS": "1",
- "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]",
- "SKIA_OUT": "[START_DIR]/out"
- },
- "infra_step": true,
- "name": "touch /home/chronos/user/SK_IMAGE_VERSION"
- },
{
"cmd": [
"ssh",
"infra_step": true,
"name": "write SVG_VERSION"
},
- {
- "cmd": [
- "ssh",
- "-oConnectTimeout=15",
- "-oBatchMode=yes",
- "-t",
- "-t",
- "foo@127.0.0.1",
- "touch",
- "/home/chronos/user/SVG_VERSION"
- ],
- "env": {
- "BUILDTYPE": "Debug",
- "CHROME_HEADLESS": "1",
- "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]",
- "SKIA_OUT": "[START_DIR]/out"
- },
- "infra_step": true,
- "name": "touch /home/chronos/user/SVG_VERSION"
- },
{
"cmd": [
"ssh",