Bug 629202 - Fixed 'ImportError: No module named automation' during valgrind-linux test, r+a=ted
authorEdmund Wong <ewong@pw-wspx.org>
Wed, 02 Feb 2011 07:44:00 -0800
changeset 61978 0797666b621296998743309937e45bfcf46745b4
parent 61977 6a78c8b01e9bae2242d61d1971dfbc3094e36aa1
child 61979 4574f9e56d49dcc037a678bc26bc3f29abf96069
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs629202
milestone2.0b12pre
first release with
nightly linux32
0797666b6212 / 4.0b12pre / 20110204192831 / files
nightly linux64
0797666b6212 / 4.0b12pre / 20110204192823 / files
nightly mac
0797666b6212 / 4.0b12pre / 20110204192818 / files
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
Bug 629202 - Fixed 'ImportError: No module named automation' during valgrind-linux test, r+a=ted
build/pgo/profileserver.py
--- a/build/pgo/profileserver.py
+++ b/build/pgo/profileserver.py
@@ -41,21 +41,23 @@
 import SimpleHTTPServer
 import SocketServer
 import socket
 import threading
 import os
 import sys
 import shutil
 from datetime import datetime
+
+SCRIPT_DIR = os.path.abspath(os.path.realpath(os.path.dirname(sys.argv[0])))
+os.path.insert(0, SCRIPT_DIR)
 from automation import Automation
 from automationutils import getDebuggerInfo, addCommonOptions
 
 PORT = 8888
-SCRIPT_DIR = os.path.abspath(os.path.realpath(os.path.dirname(sys.argv[0])))
 PROFILE_DIRECTORY = os.path.abspath(os.path.join(SCRIPT_DIR, "./pgoprofile"))
 MOZ_JAR_LOG_DIR = os.path.abspath(os.path.join(os.path.join(os.getenv("OBJDIR"), "dist"), "jarlog"))
 os.chdir(SCRIPT_DIR)
 
 class EasyServer(SocketServer.TCPServer):
   allow_reuse_address = True
 
 if __name__ == '__main__':