From beb21941b4cde53104cddc7988470f3f1d114f55 Mon Sep 17 00:00:00 2001 From: Serge Gautherie Date: Thu, 22 Jan 2009 19:39:02 +0100 Subject: [PATCH] Bug 446300 - move tools/test-harness/xpcshell-simple to testing/xpcshell; (Av1a-MC) Move the source harness directory; r=ted.mielczarek --HG-- rename : tools/test-harness/xpcshell-simple/Makefile.in => testing/xpcshell/Makefile.in rename : tools/test-harness/xpcshell-simple/README => testing/xpcshell/README rename : tools/test-harness/xpcshell-simple/example/Makefile.in => testing/xpcshell/example/Makefile.in rename : tools/test-harness/xpcshell-simple/example/unit/test_sample.js => testing/xpcshell/example/unit/test_sample.js rename : tools/test-harness/xpcshell-simple/execute_test.js => testing/xpcshell/execute_test.js rename : tools/test-harness/xpcshell-simple/head.js => testing/xpcshell/head.js rename : tools/test-harness/xpcshell-simple/tail.js => testing/xpcshell/tail.js rename : tools/test-harness/xpcshell-simple/test_all.sh => testing/xpcshell/test_all.sh rename : tools/test-harness/xpcshell-simple/test_one.sh => testing/xpcshell/test_one.sh --- Makefile.in | 2 +- config/rules.mk | 8 +-- js/src/config/rules.mk | 8 +-- .../xpcshell}/Makefile.in | 4 +- .../xpcshell}/README | 0 .../xpcshell}/example/Makefile.in | 4 +- .../xpcshell}/example/unit/test_sample.js | 0 .../xpcshell}/execute_test.js | 0 .../xpcshell}/head.js | 0 .../xpcshell}/tail.js | 0 .../xpcshell}/test_all.sh | 10 ++-- .../xpcshell}/test_one.sh | 10 ++-- tools/test-harness/Makefile.in | 50 ------------------- 13 files changed, 27 insertions(+), 69 deletions(-) rename {tools/test-harness/xpcshell-simple => testing/xpcshell}/Makefile.in (97%) rename {tools/test-harness/xpcshell-simple => testing/xpcshell}/README (100%) rename {tools/test-harness/xpcshell-simple => testing/xpcshell}/example/Makefile.in (97%) rename {tools/test-harness/xpcshell-simple => testing/xpcshell}/example/unit/test_sample.js (100%) rename {tools/test-harness/xpcshell-simple => testing/xpcshell}/execute_test.js (100%) rename {tools/test-harness/xpcshell-simple => testing/xpcshell}/head.js (100%) rename {tools/test-harness/xpcshell-simple => testing/xpcshell}/tail.js (100%) rename {tools/test-harness/xpcshell-simple => testing/xpcshell}/test_all.sh (92%) rename {tools/test-harness/xpcshell-simple => testing/xpcshell}/test_one.sh (94%) delete mode 100644 tools/test-harness/Makefile.in diff --git a/Makefile.in b/Makefile.in index d67971d9649..4e687d4b6ed 100644 --- a/Makefile.in +++ b/Makefile.in @@ -65,7 +65,7 @@ TIERS += testharness # test harnesses ifdef ENABLE_TESTS -tier_testharness_dirs += tools/test-harness +tier_testharness_dirs += testing/xpcshell endif include $(topsrcdir)/config/config.mk diff --git a/config/rules.mk b/config/rules.mk index 7e43c42e974..8f369a0e5a9 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -153,12 +153,14 @@ 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) \ @@ -169,7 +171,7 @@ check:: 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) \ @@ -180,7 +182,7 @@ check-interactive:: 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) \ diff --git a/js/src/config/rules.mk b/js/src/config/rules.mk index 7e43c42e974..8f369a0e5a9 100644 --- a/js/src/config/rules.mk +++ b/js/src/config/rules.mk @@ -153,12 +153,14 @@ 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) \ @@ -169,7 +171,7 @@ check:: 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) \ @@ -180,7 +182,7 @@ check-interactive:: 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) \ diff --git a/tools/test-harness/xpcshell-simple/Makefile.in b/testing/xpcshell/Makefile.in similarity index 97% rename from tools/test-harness/xpcshell-simple/Makefile.in rename to testing/xpcshell/Makefile.in index ae152ed0b5b..f77a23d03f3 100644 --- a/tools/test-harness/xpcshell-simple/Makefile.in +++ b/testing/xpcshell/Makefile.in @@ -36,14 +36,14 @@ # # ***** 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: diff --git a/tools/test-harness/xpcshell-simple/README b/testing/xpcshell/README similarity index 100% rename from tools/test-harness/xpcshell-simple/README rename to testing/xpcshell/README diff --git a/tools/test-harness/xpcshell-simple/example/Makefile.in b/testing/xpcshell/example/Makefile.in similarity index 97% rename from tools/test-harness/xpcshell-simple/example/Makefile.in rename to testing/xpcshell/example/Makefile.in index fa5ed97d3dc..865e7a32ab8 100644 --- a/tools/test-harness/xpcshell-simple/example/Makefile.in +++ b/testing/xpcshell/example/Makefile.in @@ -46,7 +46,7 @@ # # Note: DEPTH should be set to the relative path to mozilla/ -DEPTH = ../../../.. +DEPTH = ../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ @@ -54,7 +54,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk # Note: set the test module's name to test_ -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. diff --git a/tools/test-harness/xpcshell-simple/example/unit/test_sample.js b/testing/xpcshell/example/unit/test_sample.js similarity index 100% rename from tools/test-harness/xpcshell-simple/example/unit/test_sample.js rename to testing/xpcshell/example/unit/test_sample.js diff --git a/tools/test-harness/xpcshell-simple/execute_test.js b/testing/xpcshell/execute_test.js similarity index 100% rename from tools/test-harness/xpcshell-simple/execute_test.js rename to testing/xpcshell/execute_test.js diff --git a/tools/test-harness/xpcshell-simple/head.js b/testing/xpcshell/head.js similarity index 100% rename from tools/test-harness/xpcshell-simple/head.js rename to testing/xpcshell/head.js diff --git a/tools/test-harness/xpcshell-simple/tail.js b/testing/xpcshell/tail.js similarity index 100% rename from tools/test-harness/xpcshell-simple/tail.js rename to testing/xpcshell/tail.js diff --git a/tools/test-harness/xpcshell-simple/test_all.sh b/testing/xpcshell/test_all.sh similarity index 92% rename from tools/test-harness/xpcshell-simple/test_all.sh rename to testing/xpcshell/test_all.sh index af7d80468ed..152596ba220 100755 --- a/tools/test-harness/xpcshell-simple/test_all.sh +++ b/testing/xpcshell/test_all.sh @@ -69,7 +69,7 @@ topsrcdir="$2" # 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" @@ -82,9 +82,11 @@ 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 @@ -94,8 +96,8 @@ 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 diff --git a/tools/test-harness/xpcshell-simple/test_one.sh b/testing/xpcshell/test_one.sh similarity index 94% rename from tools/test-harness/xpcshell-simple/test_one.sh rename to testing/xpcshell/test_one.sh index 3c4ffe0df70..f87d548df18 100755 --- a/tools/test-harness/xpcshell-simple/test_one.sh +++ b/testing/xpcshell/test_one.sh @@ -76,7 +76,7 @@ topsrcdir="$2" # 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" @@ -102,9 +102,11 @@ 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 @@ -114,10 +116,10 @@ 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 diff --git a/tools/test-harness/Makefile.in b/tools/test-harness/Makefile.in deleted file mode 100644 index 859cd28c0fa..00000000000 --- 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 (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 -