Bug 907552 - Mochitests should use __file__ for determining location, r=gps

This commit is contained in:
Andrew Halberstadt 2013-08-26 17:17:51 -04:00
parent 9d70573449
commit 665be4f33e
3 changed files with 5 additions and 6 deletions

View File

@ -4,7 +4,6 @@
import optparse
import os
import sys
import tempfile
from automation import Automation
@ -12,7 +11,7 @@ from automationutils import addCommonOptions, isURL
from mozprofile import DEFAULT_PORTS
import moznetwork
here = os.path.abspath(os.path.dirname(sys.argv[0]))
here = os.path.abspath(os.path.dirname(__file__))
try:
from mozbuild.base import MozbuildObject
@ -652,7 +651,7 @@ class B2GOptions(MochitestOptions):
def verifyOptions(self, options, mochitest):
# since we are reusing verifyOptions, it will exit if App is not found
temp = options.app
options.app = sys.argv[0]
options.app = __file__
tempPort = options.httpPort
tempSSL = options.sslPort
tempIP = options.webServer

View File

@ -15,7 +15,7 @@ try:
except ImportError:
import simplejson as json
here = os.path.abspath(os.path.dirname(sys.argv[0]))
here = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, here)
from b2gautomation import B2GDesktopAutomation

View File

@ -12,7 +12,7 @@ import shutil
import math
import base64
sys.path.insert(0, os.path.abspath(os.path.realpath(os.path.dirname(sys.argv[0]))))
sys.path.insert(0, os.path.abspath(os.path.realpath(os.path.dirname(__file__))))
from automation import Automation
from remoteautomation import RemoteAutomation, fennecLogcatFilters
@ -209,7 +209,7 @@ class RemoteOptions(MochitestOptions):
def verifyOptions(self, options, mochitest):
# since we are reusing verifyOptions, it will exit if App is not found
temp = options.app
options.app = sys.argv[0]
options.app = __file__
tempPort = options.httpPort
tempSSL = options.sslPort
tempIP = options.webServer