sut_tools/installTests.py
author Mike Taylor <bear@mozilla.com>
Thu, 29 Sep 2011 17:04:38 -0400
changeset 1838 d784cb34b2674943f65cad7600f117fcbfb64e6b
parent 834 676bdebb589fe19f499df761e11b0b483a295e78
child 3000 e3f0628bdf8981611943b5935cc47e881c5cbc01
permissions -rwxr-xr-x
bug 688722 r=aki allow sut_tools to use devicemanagerSUT

#!/usr/bin/env python

import os, sys
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)