bug 523330 - default symbols path busted for mochitest/reftest. r=bsmedberg
authorTed Mielczarek <ted.mielczarek@gmail.com>
Wed, 21 Oct 2009 14:19:51 -0400
changeset 34123 cd03dd745df86043a89983d71ee613b31c897a65
parent 34122 6c5c169328dd086069fecd3a62e00d15c35cd718
child 34124 ec2c55e697a7fa707a522ed4043c53344476dce7
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)
reviewersbsmedberg
bugs523330
milestone1.9.3a1pre
bug 523330 - default symbols path busted for mochitest/reftest. r=bsmedberg
build/automation-build.mk
build/automation.py.in
layout/tools/reftest/runreftest.py
testing/mochitest/runtests.py.in
testing/testsuite-targets.mk
--- a/build/automation-build.mk
+++ b/build/automation-build.mk
@@ -16,28 +16,26 @@ else
 browser_path = \"$(TARGET_DIST)/$(MOZ_APP_DISPLAYNAME).app/Contents/MacOS/$(PROGRAM)\"
 endif
 else
 browser_path = \"$(TARGET_DIST)/bin/$(PROGRAM)\"
 endif
 endif
 
 _PROFILE_DIR = $(TARGET_DEPTH)/_profile/pgo
-_SYMBOLS_PATH = $(TARGET_DIST)/crashreporter-symbols
 
 ABSOLUTE_TOPSRCDIR = $(call core_abspath,$(MOZILLA_DIR))
 _CERTS_SRC_DIR = $(ABSOLUTE_TOPSRCDIR)/build/pgo/certs
 
 AUTOMATION_PPARGS = 	\
 			-DBROWSER_PATH=$(browser_path) \
 			-DXPC_BIN_PATH=\"$(LIBXUL_DIST)/bin\" \
 			-DBIN_SUFFIX=\"$(BIN_SUFFIX)\" \
 			-DPROFILE_DIR=\"$(_PROFILE_DIR)\" \
 			-DCERTS_SRC_DIR=\"$(_CERTS_SRC_DIR)\" \
-			-DSYMBOLS_PATH=\"$(_SYMBOLS_PATH)\" \
 			-DPERL="\"$(PERL)\"" \
 			$(NULL)
 
 ifeq ($(OS_ARCH),Darwin)
 AUTOMATION_PPARGS += -DIS_MAC=1
 else
 AUTOMATION_PPARGS += -DIS_MAC=0
 endif
--- a/build/automation.py.in
+++ b/build/automation.py.in
@@ -67,17 +67,16 @@ SCRIPT_DIR = os.path.abspath(os.path.rea
            "Process",
            "initializeProfile",
            "DIST_BIN",
            "DEFAULT_APP",
            "CERTS_SRC_DIR",
            "environment",
            "IS_TEST_BUILD",
            "IS_DEBUG_BUILD",
-           "SYMBOLS_PATH",
           ]
 
 # These are generated in mozilla/build/Makefile.in
 #expand DIST_BIN = __XPC_BIN_PATH__
 #expand IS_WIN32 = len("__WIN32__") != 0
 #expand IS_MAC = __IS_MAC__ != 0
 #expand IS_LINUX = __IS_LINUX__ != 0
 #ifdef IS_CYGWIN
@@ -90,17 +89,16 @@ IS_CYGWIN = False
 #expand PERL = __PERL__
 
 UNIXISH = not IS_WIN32 and not IS_MAC
 
 #expand DEFAULT_APP = "./" + __BROWSER_PATH__
 #expand CERTS_SRC_DIR = __CERTS_SRC_DIR__
 #expand IS_TEST_BUILD = __IS_TEST_BUILD__
 #expand IS_DEBUG_BUILD = __IS_DEBUG_BUILD__
-#expand SYMBOLS_PATH = __SYMBOLS_PATH__
 
 ###########
 # LOGGING #
 ###########
 
 # We use the logging system here primarily because it'll handle multiple
 # threads, which is needed to process the output of the server and application
 # processes simultaneously.
@@ -439,17 +437,17 @@ def environment(env = None, xrePath = DI
 
 ###############
 # RUN THE APP #
 ###############
 
 def runApp(testURL, env, app, profileDir, extraArgs,
            runSSLTunnel = False, utilityPath = DIST_BIN,
            xrePath = DIST_BIN, certPath = CERTS_SRC_DIR,
-           debuggerInfo = None, symbolsPath = SYMBOLS_PATH):
+           debuggerInfo = None, symbolsPath = None):
   "Run the app, log the duration it took to execute, return the status code."
 
   # copy env so we don't munge the caller's environment
   env = dict(env);
   env["NO_EM_RESTART"] = "1"
 
   if IS_TEST_BUILD and runSSLTunnel:
     # create certificate database for the profile
--- a/layout/tools/reftest/runreftest.py
+++ b/layout/tools/reftest/runreftest.py
@@ -119,17 +119,18 @@ Are you executing $objdir/_tests/reftest
     sys.exit(1)
 
   if options.xrePath is None:
     options.xrePath = os.path.dirname(options.app)
   else:
     # allow relative paths
     options.xrePath = getFullPath(options.xrePath)
 
-  options.symbolsPath = getFullPath(options.symbolsPath)
+  if options.symbolsPath:
+    options.symbolsPath = getFullPath(options.symbolsPath)
   options.utilityPath = getFullPath(options.utilityPath)
 
   debuggerInfo = getDebuggerInfo(oldcwd, options.debugger, options.debuggerArgs,
      options.debuggerInteractive);
 
   profileDir = None
   try:
     profileDir = mkdtemp()
--- a/testing/mochitest/runtests.py.in
+++ b/testing/mochitest/runtests.py.in
@@ -342,17 +342,18 @@ def main():
     msg = """\
 Error: Path %(app)s doesn't exist.
 Are you executing $objdir/_tests/testing/mochitest/runtests.py?"""
     print msg % {"app": options.app}
     sys.exit(1)
 
   options.utilityPath = getFullPath(options.utilityPath)
   options.certPath = getFullPath(options.certPath)
-  options.symbolsPath = getFullPath(options.symbolsPath)
+  if options.symbolsPath:
+    options.symbolsPath = getFullPath(options.symbolsPath)
 
   debuggerInfo = getDebuggerInfo(oldcwd, options.debugger, options.debuggerArgs,
     options.debuggerInteractive);
 
   # browser environment
   browserEnv = automation.environment(xrePath = options.xrePath)
 
   # These variables are necessary for correct application startup; change
--- a/testing/testsuite-targets.mk
+++ b/testing/testsuite-targets.mk
@@ -40,25 +40,26 @@
 # Shortcut for mochitest* and xpcshell-tests targets,
 # replaces 'EXTRA_TEST_ARGS=--test-path=...'.
 ifdef TEST_PATH
 TEST_PATH_ARG := --test-path=$(TEST_PATH)
 else
 TEST_PATH_ARG :=
 endif
 
+SYMBOLS_PATH := --symbols-path=$(DIST)/crashreporter-symbols
 
 # Usage: |make [TEST_PATH=...] [EXTRA_TEST_ARGS=...] mochitest*|.
 mochitest:: mochitest-plain mochitest-chrome mochitest-a11y
 
 RUN_MOCHITEST = \
 	rm -f ./$@.log && \
 	$(PYTHON) _tests/testing/mochitest/runtests.py --autorun --close-when-done \
 	  --console-level=INFO --log-file=./$@.log --file-level=INFO \
-	  $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS)
+	  $(SYMBOLS_PATH) $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS)
 
 ifndef NO_FAIL_ON_TEST_ERRORS
 define CHECK_TEST_ERROR
   @errors=`grep "TEST-UNEXPECTED-" $@.log` ;\
   if test "$$errors" ; then \
 	  echo "$@ failed:"; \
 	  echo "$$errors"; \
 	  exit 1; \
@@ -77,17 +78,18 @@ mochitest-chrome:
 	$(CHECK_TEST_ERROR)
 
 mochitest-a11y:
 	$(RUN_MOCHITEST) --a11y
 	$(CHECK_TEST_ERROR)
 
 
 # Usage: |make [EXTRA_TEST_ARGS=...] *test|.
-RUN_REFTEST = rm -f ./$@.log && $(PYTHON) _tests/reftest/runreftest.py $(EXTRA_TEST_ARGS) $(1) | tee ./$@.log
+RUN_REFTEST = rm -f ./$@.log && $(PYTHON) _tests/reftest/runreftest.py \
+  $(SYMBOLS_PATH) $(EXTRA_TEST_ARGS) $(1) | tee ./$@.log
 
 reftest:
 	$(call RUN_REFTEST,$(topsrcdir)/layout/reftests/reftest.list)
 	$(CHECK_TEST_ERROR)
 
 crashtest:
 	$(call RUN_REFTEST,$(topsrcdir)/testing/crashtest/crashtests.list)
 	$(CHECK_TEST_ERROR)
@@ -101,17 +103,17 @@ jstestbrowser:
 # See also config/rules.mk 'xpcshell-tests' target for local execution.
 # Usage: |make [TEST_PATH=...] [EXTRA_TEST_ARGS=...] xpcshell-tests|.
 xpcshell-tests:
 	$(PYTHON) -u $(topsrcdir)/config/pythonpath.py \
 	  -I$(topsrcdir)/build \
 	  $(topsrcdir)/testing/xpcshell/runxpcshelltests.py \
 	  --manifest=$(DEPTH)/_tests/xpcshell/all-test-dirs.list \
 	  --no-logfiles \
-	  --symbols-path=$(DIST)/crashreporter-symbols \
+          $(SYMBOLS_PATH) \
 	  $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS) \
 	  $(DIST)/bin/xpcshell
 
 
 # Package up the tests and test harnesses
 include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
 
 ifndef UNIVERSAL_BINARY