bug 447642 - get rid of --disable-mochitest, replace MOZ_MOCHITEST with ENABLE_TESTS. r=bsmedberg
authorTed Mielczarek <ted.mielczarek@gmail.com>
Tue, 09 Sep 2008 13:59:11 -0400
changeset 19018 1023e41aa9b45dabf8a8961605e244450f4725d0
parent 19017 dbdaae775f5bf718e0816f5a400c5dcb292d3a72
child 19019 ec0a460fbe1ad26fd5def7ceb5e0dabd4875cce9
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersbsmedberg
bugs447642
milestone1.9.1b1pre
bug 447642 - get rid of --disable-mochitest, replace MOZ_MOCHITEST with ENABLE_TESTS. r=bsmedberg
accessible/tests/Makefile.in
browser/base/Makefile.in
browser/components/feeds/Makefile.in
browser/components/places/tests/Makefile.in
browser/components/preferences/Makefile.in
browser/components/safebrowsing/Makefile.in
browser/components/search/Makefile.in
browser/components/sessionstore/Makefile.in
browser/components/shell/Makefile.in
browser/fuel/Makefile.in
config/autoconf.mk.in
configure.in
content/canvas/Makefile.in
content/events/Makefile.in
content/html/content/Makefile.in
content/html/document/Makefile.in
content/media/video/Makefile.in
content/svg/content/Makefile.in
content/xbl/Makefile.in
content/xml/document/Makefile.in
content/xslt/Makefile.in
content/xul/document/Makefile.in
docshell/Makefile.in
dom/src/jsurl/Makefile.in
dom/src/threads/Makefile.in
dom/tests/Makefile.in
editor/composer/Makefile.in
embedding/Makefile.in
extensions/universalchardet/tests/Makefile.in
intl/uconv/tests/Makefile.in
js/src/xpconnect/tests/Makefile.in
layout/base/Makefile.in
layout/base/tests/Makefile.in
layout/forms/Makefile.in
layout/generic/Makefile.in
layout/style/Makefile.in
layout/tables/Makefile.in
layout/xul/Makefile.in
layout/xul/base/Makefile.in
modules/libjar/test/Makefile.in
modules/libpr0n/test/Makefile.in
parser/htmlparser/tests/Makefile.in
testing/mochitest/Makefile.in
toolkit/components/microformats/Makefile.in
toolkit/components/places/tests/Makefile.in
toolkit/content/tests/Makefile.in
toolkit/themes/pinstripe/Makefile.in
toolkit/toolkit-tiers.mk
widget/Makefile.in
--- a/accessible/tests/Makefile.in
+++ b/accessible/tests/Makefile.in
@@ -40,14 +40,14 @@ DEPTH   = ../..
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH   = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE	= test_accessibility
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS		+= mochitest
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/browser/base/Makefile.in
+++ b/browser/base/Makefile.in
@@ -43,17 +43,17 @@ VPATH   = @srcdir@
 include $(DEPTH)/config/autoconf.mk
 
 include $(topsrcdir)/config/config.mk
 
 abs_srcdir = $(shell cd $(srcdir) && pwd)
 
 CHROME_DEPS += $(abs_srcdir)/content/overrides/app-license.html
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS += content/test
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 DEFINES += \
 	-DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
 	-DAPP_EULA_BLOCK=$(abs_srcdir)/content/overrides/app-license.html \
--- a/browser/components/feeds/Makefile.in
+++ b/browser/components/feeds/Makefile.in
@@ -38,13 +38,13 @@ DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS = public src
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS += test
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/browser/components/places/tests/Makefile.in
+++ b/browser/components/places/tests/Makefile.in
@@ -42,14 +42,11 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= test_browser_places
 
 XPCSHELL_TESTS = unit
 
-ifdef MOZ_MOCHITEST
-	DIRS += browser
-	DIRS += perf
-endif
+DIRS = browser perf
 
 include $(topsrcdir)/config/rules.mk
--- a/browser/components/preferences/Makefile.in
+++ b/browser/components/preferences/Makefile.in
@@ -38,17 +38,17 @@
 
 DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS += tests
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 DEFINES += \
 	-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
 	-DMOZ_APP_DISPLAYNAME=$(MOZ_APP_DISPLAYNAME) \
--- a/browser/components/safebrowsing/Makefile.in
+++ b/browser/components/safebrowsing/Makefile.in
@@ -40,17 +40,17 @@ DEPTH     = ../../..
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS      = src
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS += content/test
 endif
 
 ifneq (,$(BUILD_OFFICIAL)$(MOZILLA_OFFICIAL))
 DEFINES += -DOFFICIAL_BUILD=1
 endif
 
 # EXTRA_COMPONENTS installs components written in JS to dist/bin/components
--- a/browser/components/search/Makefile.in
+++ b/browser/components/search/Makefile.in
@@ -38,17 +38,17 @@
 
 DEPTH     = ../../..
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS = test
 endif
 
 MODULE = browsersearch
 XPIDL_MODULE = browsersearch
 
 XPIDLSRCS = nsIBrowserSearchService.idl
 
--- a/browser/components/sessionstore/Makefile.in
+++ b/browser/components/sessionstore/Makefile.in
@@ -45,13 +45,13 @@ XPIDL_MODULE = sessionstore
 
 XPIDLSRCS = \
 	nsISessionStartup.idl \
 	nsISessionStore.idl \
   $(NULL)
 
 DIRS = src
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS += test
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/browser/components/shell/Makefile.in
+++ b/browser/components/shell/Makefile.in
@@ -39,13 +39,13 @@ DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS = public src
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS += test
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/browser/fuel/Makefile.in
+++ b/browser/fuel/Makefile.in
@@ -39,14 +39,14 @@ DEPTH     = ../..
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS = public src
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS += test
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -156,17 +156,16 @@ MOZ_ZIPWRITER = @MOZ_ZIPWRITER@
 MOZ_MORK = @MOZ_MORK@
 MOZ_MORKREADER = @MOZ_MORKREADER@
 MOZ_NO_XPCOM_OBSOLETE = @MOZ_NO_XPCOM_OBSOLETE@
 MOZ_NO_FAST_LOAD = @MOZ_NO_FAST_LOAD@
 MOZ_OGG = @MOZ_OGG@
 MOZ_MEDIA = @MOZ_MEDIA@
 NS_PRINTING = @NS_PRINTING@
 MOZ_CRASHREPORTER = @MOZ_CRASHREPORTER@
-MOZ_MOCHITEST = @MOZ_MOCHITEST@
 MOZ_HELP_VIEWER = @MOZ_HELP_VIEWER@
 MOC= @MOC@
 
 MOZ_JAVAXPCOM = @MOZ_JAVAXPCOM@
 JAVA_INCLUDE_PATH="@JAVA_INCLUDE_PATH@"
 JAVA="@JAVA@"
 JAVAC="@JAVAC@"
 JAR="@JAR@"
--- a/configure.in
+++ b/configure.in
@@ -4352,17 +4352,16 @@ MOZ_IMG_DECODERS_DEFAULT="png gif jpeg b
 MOZ_IMG_ENCODERS_DEFAULT="png jpeg"
 MOZ_IPCD=
 MOZ_JAVAXPCOM=
 MOZ_JSDEBUGGER=1
 MOZ_JSLOADER=1
 MOZ_LIBART_CFLAGS=
 MOZ_LIBART_LIBS=
 MOZ_MATHML=1
-MOZ_MOCHITEST=1
 MOZ_MORK=1
 MOZ_MORKREADER=
 MOZ_AUTH_EXTENSION=1
 MOZ_NO_ACTIVEX_SUPPORT=1
 MOZ_NO_INSPECTOR_APIS=
 MOZ_NO_XPCOM_OBSOLETE=
 MOZ_NO_FAST_LOAD=
 MOZ_OGG=1
@@ -5524,25 +5523,16 @@ MOZ_ARG_WITH_STRING(crashreporter-enable
 [ val=`echo $withval | sed 's/[^0-9]//g'`
     MOZ_CRASHREPORTER_ENABLE_PERCENT="$val"])
 
 if test -z "$MOZ_CRASHREPORTER_ENABLE_PERCENT"; then
    MOZ_CRASHREPORTER_ENABLE_PERCENT=100
 fi
 AC_DEFINE_UNQUOTED(MOZ_CRASHREPORTER_ENABLE_PERCENT, $MOZ_CRASHREPORTER_ENABLE_PERCENT)
 
-
-dnl ========================================================
-dnl = Build mochitest JS/DOM tests (on by default)
-dnl ========================================================
-MOZ_ARG_DISABLE_BOOL(mochitest,
-[  --disable-mochitest        Disable mochitest harness],
-    MOZ_MOCHITEST=,
-    MOZ_MOCHITEST=1 )
-
 dnl ========================================================
 dnl = Enable compilation of specific extension modules
 dnl ========================================================
 
 MOZ_ARG_ENABLE_STRING(extensions,
 [  --enable-extensions     Enable extensions],
 [ for option in `echo $enableval | sed 's/,/ /g'`; do
     if test "$option" = "yes" || test "$option" = "all"; then
@@ -7910,17 +7900,16 @@ AC_SUBST(IBMBIDI)
 AC_SUBST(MOZ_UNIVERSALCHARDET)
 AC_SUBST(ACCESSIBILITY)
 AC_SUBST(MOZ_XPINSTALL)
 AC_SUBST(MOZ_VIEW_SOURCE)
 AC_SUBST(MOZ_SPELLCHECK)
 AC_SUBST(MOZ_XPFE_COMPONENTS)
 AC_SUBST(MOZ_USER_DIR)
 AC_SUBST(MOZ_CRASHREPORTER)
-AC_SUBST(MOZ_MOCHITEST)
 
 AC_SUBST(ENABLE_STRIP)
 AC_SUBST(PKG_SKIP_STRIP)
 AC_SUBST(USE_ELF_DYNSTR_GC)
 AC_SUBST(USE_PREBINDING)
 AC_SUBST(INCREMENTAL_LINKER)
 AC_SUBST(MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS)
 AC_SUBST(MOZ_COMPONENT_NSPR_LIBS)
--- a/content/canvas/Makefile.in
+++ b/content/canvas/Makefile.in
@@ -40,14 +40,14 @@ DEPTH		= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS		= public src
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS		+= test
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/content/events/Makefile.in
+++ b/content/events/Makefile.in
@@ -39,14 +39,14 @@ DEPTH		= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS		= public src
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS		+= test
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/content/html/content/Makefile.in
+++ b/content/html/content/Makefile.in
@@ -39,14 +39,14 @@ DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS		= public src
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS		+= test
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/content/html/document/Makefile.in
+++ b/content/html/document/Makefile.in
@@ -39,14 +39,14 @@ DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS		= public src
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS		+= test
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/content/media/video/Makefile.in
+++ b/content/media/video/Makefile.in
@@ -41,14 +41,14 @@ VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS		= \
 		public \
 		src \
 		$(NULL)
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS            += test
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/content/svg/content/Makefile.in
+++ b/content/svg/content/Makefile.in
@@ -40,14 +40,14 @@ DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS		= src
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS += test
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/content/xbl/Makefile.in
+++ b/content/xbl/Makefile.in
@@ -39,13 +39,13 @@ DEPTH		= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS		= public src builtin
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS		+= test
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/content/xml/document/Makefile.in
+++ b/content/xml/document/Makefile.in
@@ -39,14 +39,14 @@ DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS		= public resources src
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS            += test
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/content/xslt/Makefile.in
+++ b/content/xslt/Makefile.in
@@ -40,16 +40,13 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS = public src
 
 ifdef ENABLE_TESTS
-DIRS += tests/buster
-endif
-
-ifdef MOZ_MOCHITEST
-DIRS += tests/mochitest
+DIRS += tests/buster \
+	tests/mochitest
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/content/xul/document/Makefile.in
+++ b/content/xul/document/Makefile.in
@@ -40,14 +40,14 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= xuldoc
 DIRS		= public src
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS		+= test
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/docshell/Makefile.in
+++ b/docshell/Makefile.in
@@ -46,13 +46,13 @@ include $(DEPTH)/config/autoconf.mk
 MODULE = docshell
 DIRS = \
 	base \
 	shistory \
 	build \
 	resources \
 	$(NULL)
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS		+= test
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/dom/src/jsurl/Makefile.in
+++ b/dom/src/jsurl/Makefile.in
@@ -82,14 +82,14 @@ EXTRA_DSO_LDOPTS = \
 		$(MOZ_JS_LIBS) \
 		$(NULL)
 
 ifdef BUILD_DEBUG_GC
 DEFINES		+= -DDEBUG_GC
 endif
 
 DIRS            = $(NULL)
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS            += test
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/dom/src/threads/Makefile.in
+++ b/dom/src/threads/Makefile.in
@@ -70,13 +70,13 @@ CPPSRCS = \
   nsDOMWorkerThread.cpp \
   nsDOMWorkerTimeout.cpp \
   $(NULL)
 
 LOCAL_INCLUDES = \
   -I$(topsrcdir)/dom/src/base \
   $(NULL)
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS += test
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/dom/tests/Makefile.in
+++ b/dom/tests/Makefile.in
@@ -39,18 +39,15 @@ DEPTH		= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE = test_dom
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS		+= mochitest
-endif
-
-ifdef ENABLE_TESTS
 XPCSHELL_TESTS = unit
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/editor/composer/Makefile.in
+++ b/editor/composer/Makefile.in
@@ -43,17 +43,17 @@ VPATH		= @srcdir@
 include $(DEPTH)/config/autoconf.mk
 
 DIRS		= public
 
 ifndef MOZ_PLAINTEXT_EDITOR_ONLY
 DIRS		+= src
 endif
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS		+= test
 endif
 
 # Enable Editor API Logging!
 ENABLE_EDITOR_API_LOG=1
 
 ifdef ENABLE_EDITOR_API_LOG
 DEFINES += -DENABLE_EDITOR_API_LOG
--- a/embedding/Makefile.in
+++ b/embedding/Makefile.in
@@ -45,15 +45,12 @@ include $(DEPTH)/config/autoconf.mk
 
 MODULE       = embed
 PACKAGE_FILE = embed.pkg
 
 DIRS = base components browser
 
 ifdef ENABLE_TESTS
 XPCSHELL_TESTS = tests/unit
-endif
-
-ifdef MOZ_MOCHITEST
 DIRS += test
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/extensions/universalchardet/tests/Makefile.in
+++ b/extensions/universalchardet/tests/Makefile.in
@@ -62,17 +62,16 @@ include $(topsrcdir)/config/config.mk
 LIBS		+= \
 		$(LIBS_DIR) \
 		../src/base/$(LIB_PREFIX)universalchardet_s.$(LIB_SUFFIX) \
 		$(NSPR_LIBS) \
 		$(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
-ifdef MOZ_MOCHITEST
 relativesrcdir = extensions/universalchardet/tests
 
 _TEST_FILES =	\
 		CharsetDetectionTests.js \
 		bug9357_text.html \
 		test_bug9357.html \
 		bug171813_text.html \
 		test_bug171813.html \
@@ -83,10 +82,8 @@ relativesrcdir = extensions/universalcha
 		bug426271_text-euc-jp.html \
 		test_bug426271-euc-jp.html \
 		bug426271_text-utf-8.html \
 		test_bug426271-utf-8.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
-
-endif # MOZ_MOCHITEST
--- a/intl/uconv/tests/Makefile.in
+++ b/intl/uconv/tests/Makefile.in
@@ -64,27 +64,24 @@ CPPSRCS		= \
 ifeq ($(OS_ARCH),WINNT)
 CPPSRCS		+= convperf.cpp
 endif
 
 SIMPLE_PROGRAMS	= $(CPPSRCS:.cpp=$(BIN_SUFFIX))
 
 endif # MOZ_ENABLE_LIBXUL
 
-ifdef MOZ_MOCHITEST
 relativesrcdir	= intl/uconv/tests
 
 _TEST_FILES =	\
 		test_bug335816.html \
 		$(NULL)
 libs:: $(_TEST_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
-endif # MOZ_MOCHITEST
-
 include $(topsrcdir)/config/rules.mk
 
 ifndef MOZ_ENABLE_LIBXUL
 INCLUDES	+= \
 		-I$(srcdir)/../ucvlatin \
 		-I$(srcdir)/../ucvja \
 		-I$(srcdir)/../util \
 		$(NULL)
--- a/js/src/xpconnect/tests/Makefile.in
+++ b/js/src/xpconnect/tests/Makefile.in
@@ -48,30 +48,23 @@ SIMPLE_PROGRAMS = TestXPC$(BIN_SUFFIX)
 
 REQUIRES	= xpconnect \
 		  xpcom \
 		  string \
 		  js \
 		  xpconnect_tests \
 		  $(NULL)
 
-DIRS		= idl
+DIRS		= idl mochitest
 
 ifndef MOZ_ENABLE_LIBXUL
 DIRS += components
 endif
 
-ifdef MOZ_MOCHITEST
-DIRS += mochitest \
-	$(NULL)
-endif
-
-ifdef ENABLE_TESTS
 XPCSHELL_TESTS = unit
-endif
 
 CPPSRCS		= TestXPC.cpp
 
 LIBS		= \
 		$(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
 		$(LIBS_DIR) \
 		$(MOZ_JS_LIBS) \
 		$(MOZ_COMPONENT_LIBS) \
--- a/layout/base/Makefile.in
+++ b/layout/base/Makefile.in
@@ -37,17 +37,17 @@
 
 DEPTH		= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS		+= tests
 endif
 
 MODULE		= layout
 XPIDL_MODULE	= layout_base
 GRE_MODULE	= 1
 LIBRARY_NAME	= gkbase_s
 LIBXUL_LIBRARY	= 1
--- a/layout/base/tests/Makefile.in
+++ b/layout/base/tests/Makefile.in
@@ -73,18 +73,16 @@ LIBS		+= \
 		$(NULL)
 
 endif # false
 
 include $(topsrcdir)/config/rules.mk
 
 DEFINES += -D_IMPL_NS_LAYOUT
 
-ifdef MOZ_MOCHITEST
-
 _TEST_FILES =	\
 		test_bug66619.html \
 		test_bug386575.xhtml \
 		test_bug388019.html \
 		test_bug394057.html \
 		test_bug396024.html \
 		test_bug399284.html \
 		test_bug399951.html \
@@ -96,10 +94,8 @@ ifdef MOZ_MOCHITEST
 		test_bug449781.html \
 		$(NULL)
 # test_bug396024.html is currently disabled because it interacts badly with
 # the "You can't print-preview while the page is loading" dialog.
 # (See bug 407080)
 
 libs:: $(_TEST_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
-
-endif # MOZ_MOCHITEST
--- a/layout/forms/Makefile.in
+++ b/layout/forms/Makefile.in
@@ -39,17 +39,17 @@ DEPTH		= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS = $(NULL)
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS		+= test
 endif
 
 MODULE		= layout
 LIBRARY_NAME	= gkforms_s
 LIBXUL_LIBRARY	= 1
 
 REQUIRES	= xpcom \
--- a/layout/generic/Makefile.in
+++ b/layout/generic/Makefile.in
@@ -36,17 +36,17 @@
 
 DEPTH		= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS		+= test
 endif
 
 MODULE		= layout
 LIBRARY_NAME	= gkgeneric_s
 LIBXUL_LIBRARY	= 1
 
 REQUIRES	= xpcom \
--- a/layout/style/Makefile.in
+++ b/layout/style/Makefile.in
@@ -38,17 +38,17 @@ DEPTH		= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS = xbl-marquee
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS		+= test
 endif
 
 MODULE		= layout
 LIBRARY_NAME	= gkstyle_s
 LIBXUL_LIBRARY	= 1
 
 REQUIRES	= xpcom \
--- a/layout/tables/Makefile.in
+++ b/layout/tables/Makefile.in
@@ -84,17 +84,17 @@ CPPSRCS		= \
 		nsTableRowFrame.cpp \
 		nsTableRowGroupFrame.cpp \
 		nsTablePainter.cpp \
 		$(NULL)
 
 # we don't want the shared lib, but we want to force the creation of a static lib.
 FORCE_STATIC_LIB = 1
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS  = test
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 DEFINES         += -DDEBUG_TABLE_STRATEGY_off -D_IMPL_NS_LAYOUT
 
 LOCAL_INCLUDES	= \
--- a/layout/xul/Makefile.in
+++ b/layout/xul/Makefile.in
@@ -39,14 +39,14 @@ DEPTH		= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS		= base
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS		+= test
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/layout/xul/base/Makefile.in
+++ b/layout/xul/base/Makefile.in
@@ -39,14 +39,14 @@ DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS		= public src
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS		+= test
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/modules/libjar/test/Makefile.in
+++ b/modules/libjar/test/Makefile.in
@@ -42,13 +42,11 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= test_libjar
 
 XPCSHELL_TESTS = unit
 
-ifdef MOZ_MOCHITEST
-DIRS		+= mochitest
-endif
+DIRS		= mochitest
 
 include $(topsrcdir)/config/rules.mk
--- a/modules/libpr0n/test/Makefile.in
+++ b/modules/libpr0n/test/Makefile.in
@@ -43,17 +43,15 @@ relativesrcdir  = modules/libpr0n/test
 
 include $(DEPTH)/config/autoconf.mk
 
 # Module name for xpcshell tests.
 MODULE		= test_libpr0n
 
 XPCSHELL_TESTS  = unit
 
-#ifdef MOZ_MOCHITEST
 DIRS            += mochitest
-#endif
 
 include $(topsrcdir)/config/rules.mk
 
 # Note: Invoke any additional (non-xpcshell) test programs here.
 check::
 
--- a/parser/htmlparser/tests/Makefile.in
+++ b/parser/htmlparser/tests/Makefile.in
@@ -40,22 +40,18 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS = \
 	grabpage \
 	html \
+	mochitest \
 	$(NULL)
 
 ifndef MOZ_ENABLE_LIBXUL
 DIRS += \
 	outsinks \
 	$(NULL)
 endif
 
-ifdef MOZ_MOCHITEST
-DIRS += mochitest \
-        $(NULL)
-endif
-
 include $(topsrcdir)/config/rules.mk
--- a/testing/mochitest/Makefile.in
+++ b/testing/mochitest/Makefile.in
@@ -128,13 +128,10 @@ automation.py: $(topsrcdir)/build/pgo/au
 	$(PYTHON) $(topsrcdir)/config/Preprocessor.py \
 	$(TEST_DRIVER_PPARGS) $(DEFINES) $(ACDEFINES) $^ > $@
 
 GARBAGE += runtests.py automation.py
 
 libs:: $(_SERV_FILES)
 	$(INSTALL) $^ $(_DEST_DIR)
 
-#XXX: need to fix bug 447642
-ifdef ENABLE_TESTS
 libs::
 	$(PYTHON) $(DEPTH)/_profile/pgo/genpgocert.py --gen-server
-endif
\ No newline at end of file
--- a/toolkit/components/microformats/Makefile.in
+++ b/toolkit/components/microformats/Makefile.in
@@ -38,14 +38,14 @@ DEPTH     = ../../..
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS = src
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS += tests
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/toolkit/components/places/tests/Makefile.in
+++ b/toolkit/components/places/tests/Makefile.in
@@ -57,21 +57,19 @@ XPCSHELL_TESTS = \
 # Simple MochiTests
 MOCHI_TESTS = mochitest/test_bug_405924.html \
 							mochitest/test_bug_411966.html \
 							$(NULL)
 
 MOCHI_CONTENT = mochitest/prompt_common.js \
 								$(NULL)
 
-ifdef MOZ_MOCHITEST
 DIRS = \
 	chrome \
 	mochitest/bug_411966 \
 # These tests are disabled for the time being, see bug 416066
 #	browser \
 	$(NULL)
-endif
 
 include $(topsrcdir)/config/rules.mk
 
 libs:: $(MOCHI_TESTS) $(MOCHI_CONTENT)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/toolkit/content/tests/Makefile.in
+++ b/toolkit/content/tests/Makefile.in
@@ -42,13 +42,11 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= test_toolkit_general
 
 XPCSHELL_TESTS = unit
 
-ifdef MOZ_MOCHITEST
 DIRS = chrome widgets
-endif
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/themes/pinstripe/Makefile.in
+++ b/toolkit/themes/pinstripe/Makefile.in
@@ -43,13 +43,13 @@ VPATH     = @srcdir@
 include $(DEPTH)/config/autoconf.mk
 
 DIRS	= global mozapps
 
 ifdef MOZ_HELP_VIEWER
 DIRS	+= help
 endif
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS  += tests
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/toolkit-tiers.mk
+++ b/toolkit/toolkit-tiers.mk
@@ -263,11 +263,11 @@ endif
 ifdef MOZ_LEAKY
 tier_toolkit_dirs        += tools/leaky
 endif
 
 ifdef MOZ_MAPINFO
 tier_toolkit_dirs	+= tools/codesighs
 endif
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 tier_toolkit_dirs	+= testing/mochitest
 endif
--- a/widget/Makefile.in
+++ b/widget/Makefile.in
@@ -39,14 +39,14 @@ DEPTH		= ..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS	= public src
 
-ifdef MOZ_MOCHITEST
+ifdef ENABLE_TESTS
 DIRS  += tests
 endif
 
 include $(topsrcdir)/config/rules.mk