blob: b9ab36fa5208cc70e0ab574f9ae4f5201af6791e [file] [log] [blame]
Mike Klein7d921032017-01-05 12:20:41 -05001#!/usr/bin/env python
2#
3# Copyright 2016 Google Inc.
4#
5# Use of this source code is governed by a BSD-style license that can be
6# found in the LICENSE file.
7
8import os
9import subprocess
10import sys
11
12host, serial, stamp = sys.argv[1:]
13device = '/data/local/tmp/' + os.path.basename(host)
14
15# adb push is verbose, so eat its output with check_output().
16subprocess.check_output(['adb', '-s', serial, 'push', host, device])
17subprocess.check_call(['adb', '-s', serial, 'shell', 'chmod', '+x', device])
18
19# Touch a file to let GN/Ninja know we succeeded.
20with open(stamp, 'w'):
21 pass