Example #1
0
 def push(self, src_path, dst_path):
     if self.system == SystemType.android:
         sh_commands.adb_push(src_path, dst_path, self.address)
     elif self.system == SystemType.arm_linux:
         try:
             sh.scp(src_path,
                    '%s@%s:%s' % (self.username, self.address, dst_path))
         except sh.ErrorReturnCode_1 as e:
             six.print_('Error msg {}'.format(e), file=sys.stderr)
Example #2
0
File: device.py Project: lbqin/mace
 def push(self, src_path, dst_path):
     mace_check(os.path.exists(src_path), "Device",
                '{} not found'.format(src_path))
     six.print_("Push %s to %s" % (src_path, dst_path))
     if self.system == SystemType.android:
         sh_commands.adb_push(src_path, dst_path, self.address)
     elif self.system == SystemType.arm_linux:
         try:
             sh.scp(
                 src_path, '{}@{}:{}'.format(self.username, self.address,
                                             dst_path))
         except sh.ErrorReturnCode_1 as e:
             six.print_('Push Failed !', e, file=sys.stderr)
             raise e