Bug 446300 - move tools/test-harness/xpcshell-simple to testing/xpcshell; (Av1a-MC) Move the source harness directory; r=ted.mielczarek
authorSerge Gautherie <sgautherie.bz@free.fr>
Thu, 22 Jan 2009 19:39:02 +0100
changeset 24070 42c8844fe563e8318ecc24acb6e6b7b696901c3d
parent 24069 a8079cef66ef4343fa949f13d2767462b92aaed8
child 24071 6d17fc16e66f4cd09bb8557c8b0f8ee54c6b6996
push idunknown
push userunknown
push dateunknown
reviewersted.mielczarek
bugs446300
milestone1.9.2a1pre
Bug 446300 - move tools/test-harness/xpcshell-simple to testing/xpcshell; (Av1a-MC) Move the source harness directory; r=ted.mielczarek
Makefile.in
config/rules.mk
js/src/config/rules.mk
testing/xpcshell/Makefile.in
testing/xpcshell/README
testing/xpcshell/example/Makefile.in
testing/xpcshell/example/unit/test_sample.js
testing/xpcshell/execute_test.js
testing/xpcshell/head.js
testing/xpcshell/tail.js
testing/xpcshell/test_all.sh
testing/xpcshell/test_one.sh
tools/test-harness/Makefile.in
tools/test-harness/xpcshell-simple/Makefile.in
tools/test-harness/xpcshell-simple/README
tools/test-harness/xpcshell-simple/example/Makefile.in
tools/test-harness/xpcshell-simple/example/unit/test_sample.js
tools/test-harness/xpcshell-simple/execute_test.js
tools/test-harness/xpcshell-simple/head.js
tools/test-harness/xpcshell-simple/tail.js
tools/test-harness/xpcshell-simple/test_all.sh
tools/test-harness/xpcshell-simple/test_one.sh
--- a/Makefile.in
+++ b/Makefile.in
@@ -60,17 +60,17 @@ tier_base_dirs += memory/jemalloc
 endif
 
 include $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk
 
 TIERS += testharness
 
 # test harnesses
 ifdef ENABLE_TESTS
-tier_testharness_dirs += tools/test-harness
+tier_testharness_dirs += testing/xpcshell
 endif
 
 include $(topsrcdir)/config/config.mk
 
 GARBAGE_DIRS += dist _javagen _profile _tests staticlib
 DIST_GARBAGE = config.cache config.log config.status config-defs.h \
    dependencies.beos config/autoconf.mk config/myrules.mk config/myconfig.mk \
    unallmakefiles mozilla-config.h \
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -148,44 +148,46 @@ else
 FWDSLASH_TOPSRCDIR := $(topsrcdir)
 ifeq ($(HOST_OS_ARCH),WINNT)
 NATIVE_TOPSRCDIR   := $(subst /,\\,$(WIN_TOP_SRC))
 else 
 NATIVE_TOPSRCDIR   := $(topsrcdir)
 endif
 endif # CYGWIN_WRAPPER
 
+testxpcdir = $(topsrcdir)/testing/xpcshell
+
 # Test execution
 check::
 	@$(EXIT_ON_ERROR) \
 	for testdir in $(XPCSHELL_TESTS); do \
 	  $(RUN_TEST_PROGRAM) \
-	    $(topsrcdir)/tools/test-harness/xpcshell-simple/test_all.sh \
+	    $(testxpcdir)/test_all.sh \
 	      $(DIST)/bin/xpcshell \
 	      $(FWDSLASH_TOPSRCDIR) \
 	      $(NATIVE_TOPSRCDIR) \
 	      $(DEPTH)/_tests/xpcshell-simple/$(MODULE)/$$testdir; \
 	done
 
 # Test execution
 check-interactive::
 	@$(EXIT_ON_ERROR) \
 	$(RUN_TEST_PROGRAM) \
-	  $(topsrcdir)/tools/test-harness/xpcshell-simple/test_one.sh \
+	  $(testxpcdir)/test_one.sh \
 	    $(DIST)/bin/xpcshell \
 	    $(FWDSLASH_TOPSRCDIR) \
 	    $(NATIVE_TOPSRCDIR) \
 	    $(DEPTH)/_tests/xpcshell-simple/$(MODULE)/$$testdir \
 	    $(SOLO_FILE) 1;
 
 # Test execution
 check-one::
 	@$(EXIT_ON_ERROR) \
 	$(RUN_TEST_PROGRAM) \
-	  $(topsrcdir)/tools/test-harness/xpcshell-simple/test_one.sh \
+	  $(testxpcdir)/test_one.sh \
 	    $(DIST)/bin/xpcshell \
 	    $(FWDSLASH_TOPSRCDIR) \
 	    $(NATIVE_TOPSRCDIR) \
 	    $(DEPTH)/_tests/xpcshell-simple/$(MODULE)/$$testdir \
 	    $(SOLO_FILE) 0;
 
 endif # XPCSHELL_TESTS
 
--- a/js/src/config/rules.mk
+++ b/js/src/config/rules.mk
@@ -148,44 +148,46 @@ else
 FWDSLASH_TOPSRCDIR := $(topsrcdir)
 ifeq ($(HOST_OS_ARCH),WINNT)
 NATIVE_TOPSRCDIR   := $(subst /,\\,$(WIN_TOP_SRC))
 else 
 NATIVE_TOPSRCDIR   := $(topsrcdir)
 endif
 endif # CYGWIN_WRAPPER
 
+testxpcdir = $(topsrcdir)/testing/xpcshell
+
 # Test execution
 check::
 	@$(EXIT_ON_ERROR) \
 	for testdir in $(XPCSHELL_TESTS); do \
 	  $(RUN_TEST_PROGRAM) \
-	    $(topsrcdir)/tools/test-harness/xpcshell-simple/test_all.sh \
+	    $(testxpcdir)/test_all.sh \
 	      $(DIST)/bin/xpcshell \
 	      $(FWDSLASH_TOPSRCDIR) \
 	      $(NATIVE_TOPSRCDIR) \
 	      $(DEPTH)/_tests/xpcshell-simple/$(MODULE)/$$testdir; \
 	done
 
 # Test execution
 check-interactive::
 	@$(EXIT_ON_ERROR) \
 	$(RUN_TEST_PROGRAM) \
-	  $(topsrcdir)/tools/test-harness/xpcshell-simple/test_one.sh \
+	  $(testxpcdir)/test_one.sh \
 	    $(DIST)/bin/xpcshell \
 	    $(FWDSLASH_TOPSRCDIR) \
 	    $(NATIVE_TOPSRCDIR) \
 	    $(DEPTH)/_tests/xpcshell-simple/$(MODULE)/$$testdir \
 	    $(SOLO_FILE) 1;
 
 # Test execution
 check-one::
 	@$(EXIT_ON_ERROR) \
 	$(RUN_TEST_PROGRAM) \
-	  $(topsrcdir)/tools/test-harness/xpcshell-simple/test_one.sh \
+	  $(testxpcdir)/test_one.sh \
 	    $(DIST)/bin/xpcshell \
 	    $(FWDSLASH_TOPSRCDIR) \
 	    $(NATIVE_TOPSRCDIR) \
 	    $(DEPTH)/_tests/xpcshell-simple/$(MODULE)/$$testdir \
 	    $(SOLO_FILE) 0;
 
 endif # XPCSHELL_TESTS
 
rename from tools/test-harness/xpcshell-simple/Makefile.in
rename to testing/xpcshell/Makefile.in
--- a/tools/test-harness/xpcshell-simple/Makefile.in
+++ b/testing/xpcshell/Makefile.in
@@ -31,24 +31,24 @@
 # 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		= ../../..
+DEPTH		= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE		= test_harness_xpcshell_simple
+MODULE		= testing_xpcshell
 
 # Here's how you let the build system know there are tests in the
 # "example" folder:
 ifdef ENABLE_TESTS
 DIRS  += example
 endif
 
 include $(topsrcdir)/config/rules.mk
rename from tools/test-harness/xpcshell-simple/README
rename to testing/xpcshell/README
rename from tools/test-harness/xpcshell-simple/example/Makefile.in
rename to testing/xpcshell/example/Makefile.in
--- a/tools/test-harness/xpcshell-simple/example/Makefile.in
+++ b/testing/xpcshell/example/Makefile.in
@@ -41,25 +41,25 @@
 # Makefile for installing and running xpcshell-based tests. You can use 
 # this file as template when creating tests for a new module. Don't 
 # forget to change the lines marked below. See 
 # http://developer.mozilla.org/en/docs/Writing_xpcshell-based_unit_tests
 # for detailed instructions.
 #
 
 # Note: DEPTH should be set to the relative path to mozilla/
-DEPTH		= ../../../..
+DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 # Note: set the test module's name to test_<yourmodule>
-MODULE		= test_harness_xpcshell_simple
+MODULE		= test_testing_xpcshell_example
 
 # This is a list of directories containing tests to run, separated by spaces.
 # Most likely, tho, you won't use more than one directory here.
 XPCSHELL_TESTS = \
                  unit \
                  $(NULL)
 
 include $(topsrcdir)/config/rules.mk
rename from tools/test-harness/xpcshell-simple/example/unit/test_sample.js
rename to testing/xpcshell/example/unit/test_sample.js
rename from tools/test-harness/xpcshell-simple/execute_test.js
rename to testing/xpcshell/execute_test.js
rename from tools/test-harness/xpcshell-simple/head.js
rename to testing/xpcshell/head.js
rename from tools/test-harness/xpcshell-simple/tail.js
rename to testing/xpcshell/tail.js
rename from tools/test-harness/xpcshell-simple/test_all.sh
rename to testing/xpcshell/test_all.sh
--- a/tools/test-harness/xpcshell-simple/test_all.sh
+++ b/testing/xpcshell/test_all.sh
@@ -64,43 +64,45 @@ topsrcdir="$2"
 # Tests which depend on files in the source directory will need a native path
 # to actually access those files, or otherwise they must rely on hacks such as
 # getting the current working/process directory and committing other atrocities.
 # This argument is a native path to the top-level source directory, useful for
 # tests which require access to files so that they can access them in a vaguely
 # clean manner.
 native_topsrcdir="$3"
 
-# The sample Makefile for the xpcshell-simple harness adds the directory where
+# The sample Makefile for the xpcshell harness adds the directory where
 # the test_*.js files reside as an arg.  If no arg is specified, assume the
 # current directory is where the *.js files live.
 testdir="$4"
 if [ "x$testdir" = "x" ]; then
     testdir=.
 fi
 
 
 ###############################
 # SETUP FOR RUNNING THE TESTS #
 ###############################
 
+testxpcdir=$topsrcdir/testing/xpcshell
+
 # files matching the pattern head_*.js are treated like test setup files
 # - they are run after head.js but before the test file
-headfiles="-f $topsrcdir/tools/test-harness/xpcshell-simple/head.js"
+headfiles="-f $testxpcdir/head.js"
 for h in $testdir/head_*.js
 do
     if [ -f $h ]; then
 	headfiles="$headfiles -f $h"
     fi
 done
 
 # files matching the pattern tail_*.js are treated like teardown files
 # - they are run after tail.js
-tailfiles="-f $topsrcdir/tools/test-harness/xpcshell-simple/tail.js"
-tailfiles="$tailfiles -f $topsrcdir/tools/test-harness/xpcshell-simple/execute_test.js"
+tailfiles="-f $testxpcdir/tail.js"
+tailfiles="$tailfiles -f $testxpcdir/execute_test.js"
 for t in $testdir/tail_*.js
 do
     if [ -f $t ]; then
 	tailfiles="$tailfiles -f $t"
     fi
 done
 
 
rename from tools/test-harness/xpcshell-simple/test_one.sh
rename to testing/xpcshell/test_one.sh
--- a/tools/test-harness/xpcshell-simple/test_one.sh
+++ b/testing/xpcshell/test_one.sh
@@ -71,17 +71,17 @@ topsrcdir="$2"
 # Tests which depend on files in the source directory will need a native path
 # to actually access those files, or otherwise they must rely on hacks such as
 # getting the current working/process directory and committing other atrocities.
 # This argument is a native path to the top-level source directory, useful for
 # tests which require access to files so that they can access them in a vaguely
 # clean manner.
 native_topsrcdir="$3"
 
-# The sample Makefile for the xpcshell-simple harness adds the directory where
+# The sample Makefile for the xpcshell harness adds the directory where
 # the test_*.js files reside as an arg.  If no arg is specified, assume the
 # current directory is where the *.js files live.
 testdir="$4"
 if [ "x$testdir" = "x" ]; then
     testdir=.
 fi
 
 # Get the actual JS test to run.  Also get the directory it lives in, to load
@@ -97,32 +97,34 @@ fi
 
 # Says if the test should be launch in interactive mode or not
 interactive_mode="$6"
 
 ###############################
 # SETUP FOR RUNNING THE TESTS #
 ###############################
 
+testxpcdir=$topsrcdir/testing/xpcshell
+
 # files matching the pattern head_*.js are treated like test setup files
 # - they are run after head.js but before the test file
-headfiles="-f $topsrcdir/tools/test-harness/xpcshell-simple/head.js"
+headfiles="-f $testxpcdir/head.js"
 for h in $testdir/$target_dir/head_*.js
 do
     if [ -f $h ]; then
         headfiles="$headfiles -f $h"
     fi
 done
 
 # files matching the pattern tail_*.js are treated like teardown files
 # - they are run after tail.js
-tailfiles="-f $topsrcdir/tools/test-harness/xpcshell-simple/tail.js"
+tailfiles="-f $testxpcdir/tail.js"
 
 if [ ! "$interactive_mode" = "1" ]; then
-    tailfiles="$tailfiles -f $topsrcdir/tools/test-harness/xpcshell-simple/execute_test.js"
+    tailfiles="$tailfiles -f $testxpcdir/execute_test.js"
 fi
 
 for t in $testdir/$target_dir/tail_*.js
 do
     if [ -f $t ]; then
         tailfiles="$tailfiles -f $t"
     fi
 done
deleted file mode 100644
--- a/tools/test-harness/Makefile.in
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# ***** 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):
-#     David Liebreich <davel@mozilla.com>  (Original author)
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either of 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
-
-MODULE		= test_harness
-DIRS		= xpcshell-simple
-
-include $(topsrcdir)/config/rules.mk
-