Bug 1036930 - Remove marionette/scripts/runemu.py, r=dburns
authorMalini Das <mdas@mozilla.com>
Wed, 16 Jul 2014 11:44:40 -0400
changeset 194391 998877e0d763da97a62138144b0040aa9ec27936
parent 194390 fafed32afbea6df915edc05ceafe53b8e64aa316
child 194392 8fd6bf6c57cbed415c08ab7c58c3b18e0bd54277
push id46335
push usermdas@mozilla.com
push dateWed, 16 Jul 2014 15:45:39 +0000
treeherdermozilla-inbound@998877e0d763 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdburns
bugs1036930
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1036930 - Remove marionette/scripts/runemu.py, r=dburns
testing/marionette/client/marionette/scripts/runemu.py
testing/marionette/client/marionette/scripts/runemu.sh
deleted file mode 100644
--- a/testing/marionette/client/marionette/scripts/runemu.py
+++ /dev/null
@@ -1,50 +0,0 @@
-from marionette import Marionette, Emulator
-from optparse import OptionParser
-
-
-def runemulator(homedir=None, url=None, pidfile=None, arch='x86', noWindow=False,
-                userdata=None):
-    qemu = Emulator(homedir=homedir, arch=arch, noWindow=noWindow,
-                    userdata=userdata)
-    qemu.start()
-    port = qemu.setup_port_forwarding(2828)
-    assert(qemu.wait_for_port())
-    if pidfile:
-        f = open(pidfile, 'w')
-        f.write("%d" % qemu.proc.pid)
-        f.close()
-    print 'emulator launched, pid:', qemu.proc.pid
-
-    if url:
-        marionette = Marionette(port=port)
-        marionette.start_session()
-        marionette.navigate(url)
-        marionette.delete_session()
-
-if __name__ == '__main__':
-    parser = OptionParser()
-    parser.add_option('--repo', dest='repo_path', action='store',
-                      help='directory of the B2G repo')
-    parser.add_option('--arch', dest='arch', action='store',
-                      default='x86',
-                      help='the emulator cpu architecture (x86 or arm)')
-    parser.add_option('--url', dest='url', action='store',
-                      help='url to navigate to after launching emulator')
-    parser.add_option('--pidfile', dest='pidfile', action='store',
-                      help='file in which to store emulator pid')
-    parser.add_option('--no-window', dest='noWindow', action='store_true',
-                      help='pass -no-window to the emulator')
-    parser.add_option('--userdata', dest='userdata', action='store',
-                      help='path to userdata.img file to use')
-
-    options, args = parser.parse_args()
-    if not options.repo_path:
-        raise Exception ("must specify the --repo /path/to/B2G/repo argument")
-
-    runemulator(homedir=options.repo_path,
-                url=options.url,
-                pidfile=options.pidfile,
-                arch=options.arch,
-                noWindow=options.noWindow,
-                userdata=options.userdata)
-
deleted file mode 100755
--- a/testing/marionette/client/marionette/scripts/runemu.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/bash
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this file,
-# You can obtain one at http://mozilla.org/MPL/2.0/.
-
-# Marionette requires Python 2.7, so the first parameter to this script
-# should be the path to that.
-PYTHON=$1
-
-if [ -z "${PYTHON}" ]
-then
-    echo "No python found"
-    exit 1
-fi
-
-# Determine the absolute path of our location.
-echo $0
-echo `dirname $0`
-echo $PWD
-SCRIPTS_HOME=`dirname $0`
-cd $SCRIPTS_HOME
-cd ..
-MARIONETTE_HOME=`dirname $PWD`
-echo "Detected Marionette home in $MARIONETTE_HOME"
-
-# If a GECKO_OBJDIR environemnt variable exists, we will create the Python
-# virtual envirnoment there. Otherwise we create it in the PWD.
-VENV_DIR="runemu_venv"
-if [ -z $GECKO_OBJDIR ]
-then
-    VENV_DIR="$MARIONETTE_HOME/$VENV_DIR"
-else
-    VENV_DIR="$GECKO_OBJDIR/$VENV_DIR"
-fi
-
-# Check if environment exists, if not, create a virtualenv:
-if [ -d $VENV_DIR ]
-then
-  echo "Using virtual environment in $VENV_DIR"
-  cd $VENV_DIR
-  . bin/activate
-else
-  echo "Creating a virtual environment in $VENV_DIR"
-  curl -L https://raw.github.com/pypa/virtualenv/develop/virtualenv.py | ${PYTHON} - $VENV_DIR
-  cd $VENV_DIR
-  . bin/activate
-  # set up mozbase
-  git clone git://github.com/mozilla/mozbase.git
-  cd mozbase
-  python setup_development.py
-fi
-
-# update the marionette_client
-cd $MARIONETTE_HOME
-python setup.py develop
-cd marionette
-
-# pop off the python parameter
-shift
-cd scripts
-python runemu.py $@
-