bug 417516 - add top level Makefile targets to run test suites. add targets for mochitest. r=bsmedberg

This commit is contained in:
Ted Mielczarek 2008-07-27 13:06:58 -04:00
parent d4c933c660
commit 21d004eaac
3 changed files with 20 additions and 1 deletions

View File

@ -66,6 +66,11 @@ ifdef MOZ_MEMORY
tier_base_dirs += memory/jemalloc
endif
ifdef ENABLE_TESTS
# Additional makefile targets to call automated test suites
include $(topsrcdir)/testing/testsuite-targets.mk
endif
include $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk
TIERS += testharness

View File

@ -59,3 +59,14 @@ package:
install::
@$(MAKE) -C browser/installer install
ifdef ENABLE_TESTS
# Implemented in testing/testsuite-targets.mk
mochitest-browser-chrome:
$(RUN_MOCHITEST) --browser-chrome
$(CHECK_TEST_ERROR)
mochitest:: mochitest-browser-chrome
.PHONY: mochitest-browser-chrome
endif

View File

@ -331,6 +331,9 @@ Are you executing $objdir/_tests/testing/mochitest/runtests.py?"""
elif options.browserChrome:
testURL = "about:blank"
# allow relative paths for logFile
if options.logFile:
options.logFile = os.path.normpath(os.path.join(oldcwd, options.logFile))
if options.browserChrome:
makeTestConfig(options)
else:
@ -339,7 +342,7 @@ Are you executing $objdir/_tests/testing/mochitest/runtests.py?"""
if options.closeWhenDone:
urlOpts.append("closeWhenDone=1")
if options.logFile:
urlOpts.append("logFile=" + encodeURIComponent(os.path.normpath(os.path.join(oldcwd, options.logFile))))
urlOpts.append("logFile=" + encodeURIComponent(options.logFile))
urlOpts.append("fileLevel=" + encodeURIComponent(options.fileLevel))
if options.consoleLevel:
urlOpts.append("consoleLevel=" + encodeURIComponent(options.consoleLevel))