From e2b7dea38440774b82cd414530e17a86b72c7eda Mon Sep 17 00:00:00 2001 From: "sayrer%gmail.com" Date: Wed, 17 Jan 2007 20:38:57 +0000 Subject: [PATCH] Bug 359999. Add an enable-mochitest option. r=bsmedberg git-svn-id: svn://10.0.0.236/trunk@218535 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/client.mk | 1 + mozilla/config/autoconf.mk.in | 1 + mozilla/configure.in | 10 +++ mozilla/testing/mochitest/Makefile.in | 58 +++++++++++++++ .../testing/mochitest/MochiKit/Makefile.in | 71 +++++++++++++++++++ mozilla/testing/mochitest/static/Makefile.in | 53 ++++++++++++++ mozilla/testing/mochitest/tests/Makefile.in | 48 +++++++++++++ .../mochitest/tests/SimpleTest/Makefile.in | 56 +++++++++++++++ mozilla/toolkit/toolkit-tiers.mk | 4 ++ 9 files changed, 302 insertions(+) create mode 100644 mozilla/testing/mochitest/Makefile.in create mode 100644 mozilla/testing/mochitest/MochiKit/Makefile.in create mode 100644 mozilla/testing/mochitest/static/Makefile.in create mode 100644 mozilla/testing/mochitest/tests/Makefile.in create mode 100644 mozilla/testing/mochitest/tests/SimpleTest/Makefile.in diff --git a/mozilla/client.mk b/mozilla/client.mk index 8ee1c242e20..60565662a11 100644 --- a/mozilla/client.mk +++ b/mozilla/client.mk @@ -223,6 +223,7 @@ MODULES_NS_toolkit := \ MODULES_toolkit := \ $(MODULES_core) \ mozilla/chrome \ + mozilla/testing/mochitest \ $(NULL) LOCALES_toolkit := \ diff --git a/mozilla/config/autoconf.mk.in b/mozilla/config/autoconf.mk.in index 82e35c7b8b5..1595e49b22a 100644 --- a/mozilla/config/autoconf.mk.in +++ b/mozilla/config/autoconf.mk.in @@ -156,6 +156,7 @@ MOZ_NO_XPCOM_OBSOLETE = @MOZ_NO_XPCOM_OBSOLETE@ MOZ_NO_FAST_LOAD = @MOZ_NO_FAST_LOAD@ NS_PRINTING = @NS_PRINTING@ MOZ_AIRBAG = @MOZ_AIRBAG@ +MOZ_MOCHITEST = @MOZ_MOCHITEST@ MOZ_JAVAXPCOM = @MOZ_JAVAXPCOM@ JAVA_INCLUDE_PATH="@JAVA_INCLUDE_PATH@" diff --git a/mozilla/configure.in b/mozilla/configure.in index eedfab482e7..b6a49f70f04 100644 --- a/mozilla/configure.in +++ b/mozilla/configure.in @@ -4047,6 +4047,7 @@ MOZ_LIBART_CFLAGS= MOZ_LIBART_LIBS= MOZ_MAIL_NEWS= MOZ_MATHML=1 +MOZ_MOCHITEST=1 MOZ_MORK=1 MOZ_MORKREADER= MOZ_AUTH_EXTENSION=1 @@ -5584,6 +5585,14 @@ if test -n "$MOZ_AIRBAG"; then AC_DEFINE(MOZ_AIRBAG) fi +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 ======================================================== @@ -7694,6 +7703,7 @@ AC_SUBST(MOZ_SPELLCHECK) AC_SUBST(MOZ_XPFE_COMPONENTS) AC_SUBST(MOZ_USER_DIR) AC_SUBST(MOZ_AIRBAG) +AC_SUBST(MOZ_MOCHITEST) AC_SUBST(ENABLE_STRIP) AC_SUBST(USE_ELF_DYNSTR_GC) diff --git a/mozilla/testing/mochitest/Makefile.in b/mozilla/testing/mochitest/Makefile.in new file mode 100644 index 00000000000..2780902184b --- /dev/null +++ b/mozilla/testing/mochitest/Makefile.in @@ -0,0 +1,58 @@ +# +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is +# Netscape Communications Corporation. +# Portions created by the Initial Developer are Copyright (C) 1998 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 2 or later (the "GPL"), or +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** + +DEPTH = ../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ +relativesrcdir = testing/mochitest + +include $(DEPTH)/config/autoconf.mk + +DIRS = MochiKit \ + static \ + tests \ + $(NULL) + +include $(topsrcdir)/config/rules.mk + +_SERV_FILES = runtests.pl \ + gen_template.pl \ + $(NULL) + +libs:: $(_SERV_FILES) + $(INSTALL) $^ $(DEPTH)/_tests/$(relativesrcdir) diff --git a/mozilla/testing/mochitest/MochiKit/Makefile.in b/mozilla/testing/mochitest/MochiKit/Makefile.in new file mode 100644 index 00000000000..99e4554df67 --- /dev/null +++ b/mozilla/testing/mochitest/MochiKit/Makefile.in @@ -0,0 +1,71 @@ +# +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is +# Netscape Communications Corporation. +# Portions created by the Initial Developer are Copyright (C) 1998 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 2 or later (the "GPL"), or +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** + +DEPTH = ../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ +relativesrcdir = testing/mochitest/MochiKit + +include $(DEPTH)/config/autoconf.mk +include $(topsrcdir)/config/rules.mk + +_JS_FILES = Async.js \ + Base.js \ + Color.js \ + Controls.js \ + DateTime.js \ + DOM.js \ + DragAndDrop.js \ + Format.js \ + Iter.js \ + Logging.js \ + LoggingPane.js \ + MochiKit.js \ + MockDOM.js \ + New.js \ + __package__.js \ + packed.js \ + Signal.js \ + Sortable.js \ + Style.js \ + Test.js \ + Visual.js \ + $(NULL) + +libs:: $(_JS_FILES) + $(INSTALL) $^ $(DEPTH)/_tests/$(relativesrcdir) diff --git a/mozilla/testing/mochitest/static/Makefile.in b/mozilla/testing/mochitest/static/Makefile.in new file mode 100644 index 00000000000..409e96966ea --- /dev/null +++ b/mozilla/testing/mochitest/static/Makefile.in @@ -0,0 +1,53 @@ +# +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is +# Netscape Communications Corporation. +# Portions created by the Initial Developer are Copyright (C) 1998 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 2 or later (the "GPL"), or +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** + +DEPTH = ../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ +relativesrcdir = testing/mochitest/static + +include $(DEPTH)/config/autoconf.mk +include $(topsrcdir)/config/rules.mk + +_STATIC_FILES = test.template.txt \ + xhtml.template.txt \ + xul.template.txt \ + $(NULL) + +libs:: $(_STATIC_FILES) + $(INSTALL) $^ $(DEPTH)/_tests/$(relativesrcdir) diff --git a/mozilla/testing/mochitest/tests/Makefile.in b/mozilla/testing/mochitest/tests/Makefile.in new file mode 100644 index 00000000000..29fcc05bb63 --- /dev/null +++ b/mozilla/testing/mochitest/tests/Makefile.in @@ -0,0 +1,48 @@ +# +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is +# Netscape Communications Corporation. +# Portions created by the Initial Developer are Copyright (C) 1998 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 2 or later (the "GPL"), or +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** + +DEPTH = ../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +DIRS = SimpleTest \ + $(NULL) + +include $(topsrcdir)/config/rules.mk diff --git a/mozilla/testing/mochitest/tests/SimpleTest/Makefile.in b/mozilla/testing/mochitest/tests/SimpleTest/Makefile.in new file mode 100644 index 00000000000..f247edfe157 --- /dev/null +++ b/mozilla/testing/mochitest/tests/SimpleTest/Makefile.in @@ -0,0 +1,56 @@ +# +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is +# Netscape Communications Corporation. +# Portions created by the Initial Developer are Copyright (C) 1998 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 2 or later (the "GPL"), or +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** + +DEPTH = ../../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ +relativesrcdir = testing/mochitest/tests/SimpleTest + +include $(DEPTH)/config/autoconf.mk +include $(topsrcdir)/config/rules.mk + +_SIMPLETEST_FILES = MozillaFileLogger.js \ + quit.js \ + SimpleTest.js \ + test.css \ + TestRunner.js \ + $(NULL) + +libs:: $(_SIMPLETEST_FILES) + $(INSTALL) $^ $(DEPTH)/_tests/$(relativesrcdir) + diff --git a/mozilla/toolkit/toolkit-tiers.mk b/mozilla/toolkit/toolkit-tiers.mk index 792ecde4f37..b5a7ac5b4bc 100644 --- a/mozilla/toolkit/toolkit-tiers.mk +++ b/mozilla/toolkit/toolkit-tiers.mk @@ -283,3 +283,7 @@ endif ifdef MOZ_MAPINFO tier_toolkit_dirs += tools/codesighs endif + +ifdef MOZ_MOCHITEST +tier_toolkit_dirs += testing/mochitest +endif