sut_tools/installTests.py
author Joel Maher <jmaher@mozilla.com
Mon, 01 Oct 2012 09:32:00 -0400
changeset 3000 e3f0628bdf8981611943b5935cc47e881c5cbc01
parent 1838 d784cb34b2674943f65cad7600f117fcbfb64e6b
child 3406 47b77f5fcd442dad86fd1b069befddd936c540e8
permissions -rwxr-xr-x
Bug 795028 - update sut_tools to use modern devicemanager. r=Callek

#!/usr/bin/env python

import os, sys
from mozdevice import devicemanagerSUT as devicemanager

if (len(sys.argv) <> 3):
  print "usage: install.py <ip address> <localfilename>"
  sys.exit(1)

print "connecting to: " + sys.argv[1]
dm = devicemanager.DeviceManagerSUT(sys.argv[1])

devRoot  = dm.getDeviceRoot()
source   = sys.argv[2]
filename = os.path.basename(source)
target   = os.path.join(devRoot, filename)

dm.pushFile(source, target)
dm.unpackFile(target)