2 # ***** BEGIN LICENSE BLOCK *****
3 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 # The contents of this file are subject to the Mozilla Public License Version
6 # 1.1 (the "License"); you may not use this file except in compliance with
7 # the License. You may obtain a copy of the License at
8 # http://www.mozilla.org/MPL/
10 # Software distributed under the License is distributed on an "AS IS" basis,
11 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 # for the specific language governing rights and limitations under the
15 # The Original Code is mozilla.org code.
17 # The Initial Developer of the Original Code is
18 # Netscape Communications Corporation.
19 # Portions created by the Initial Developer are Copyright (C) 1998
20 # the Initial Developer. All Rights Reserved.
24 # Alternatively, the contents of this file may be used under the terms of
25 # either the GNU General Public License Version 2 or later (the "GPL"), or
26 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 # in which case the provisions of the GPL or the LGPL are applicable instead
28 # of those above. If you wish to allow use of your version of this file only
29 # under the terms of either the GPL or the LGPL, and not to allow others to
30 # use your version of this file under the terms of the MPL, indicate your
31 # decision by deleting the provisions above and replace them with the notice
32 # and other provisions required by the GPL or the LGPL. If you do not delete
33 # the provisions above, a recipient may use your version of this file under
34 # the terms of any one of the MPL, the GPL or the LGPL.
36 # ***** END LICENSE BLOCK *****
39 topsrcdir
= @top_srcdir@
42 relativesrcdir
= testing
/mochitest
44 include $(DEPTH
)/config
/autoconf.mk
53 include $(topsrcdir
)/config
/rules.mk
55 # files that get copied into $objdir/_tests/
64 browser-test-overlay.xul \
70 $(topsrcdir
)/build
/pgo
/server-locations.txt \
71 $(topsrcdir
)/netwerk
/test/httpserver
/httpd.js \
76 _DEST_DIR
= $(DEPTH
)/_tests
/$(relativesrcdir
)
77 _CERTS_DIR
= $(DEPTH
)/_profile
/pgo
/certs
79 ifeq ($(USE_SHORT_LIBNAME
), 1)
80 PROGRAM
= $(MOZ_APP_NAME
)$(BIN_SUFFIX
)
82 PROGRAM
= $(MOZ_APP_NAME
)-bin
$(BIN_SUFFIX
)
85 ifeq ($(MOZ_BUILD_APP
),camino
)
86 browser_path
= \"..
/$(DIST
)/Camino.app
/Contents
/MacOS
/Camino
\"
88 ifeq ($(OS_ARCH
),Darwin
)
90 browser_path
= \"..
/$(DIST
)/$(MOZ_APP_DISPLAYNAME
)Debug.app
/Contents
/MacOS
/$(PROGRAM
)\"
92 browser_path
= \"..
/$(DIST
)/$(MOZ_APP_DISPLAYNAME
).app
/Contents
/MacOS
/$(PROGRAM
)\"
95 browser_path
= \"..
/$(DIST
)/bin
/$(PROGRAM
)\"
99 # These go in _tests/ so they need to go up an extra path segement
100 TEST_DRIVER_PPARGS
= \
101 -DBROWSER_PATH
=$(browser_path
) \
102 -DXPC_BIN_PATH
=\"$(LIBXUL_DIST
)/bin
\" \
103 -DBIN_SUFFIX
=\"$(BIN_SUFFIX
)\" \
104 -DCERTS_DIR
=\"..
/$(_CERTS_DIR
)\" \
107 ifeq ($(OS_ARCH
),Darwin
)
108 TEST_DRIVER_PPARGS
+= -DIS_MAC
=1
110 TEST_DRIVER_PPARGS
+= -DIS_MAC
=0
113 ifeq ($(MOZ_BUILD_APP
),camino
)
114 TEST_DRIVER_PPARGS
+= -DIS_CAMINO
=1
116 TEST_DRIVER_PPARGS
+= -DIS_CAMINO
=0
119 ifeq ($(host_os
), cygwin
)
120 TEST_DRIVER_PPARGS
+= -DIS_CYGWIN
=1
123 ifeq ($(ENABLE_TESTS
), 1)
124 TEST_DRIVER_PPARGS
+= -DIS_TEST_BUILD
=1
126 TEST_DRIVER_PPARGS
+= -DIS_TEST_BUILD
=0
129 runtests.py
: runtests.py.in
130 $(PYTHON
) $(topsrcdir
)/config
/Preprocessor.py \
131 $(TEST_DRIVER_PPARGS
) $(DEFINES
) $(ACDEFINES
) $^
> $@
133 automation.py
: $(topsrcdir
)/build
/pgo
/automation.py.in
134 $(PYTHON
) $(topsrcdir
)/config
/Preprocessor.py \
135 $(TEST_DRIVER_PPARGS
) $(DEFINES
) $(ACDEFINES
) $^
> $@
137 GARBAGE
+= runtests.py automation.py
139 libs
:: $(_SERV_FILES
)
140 $(INSTALL
) $^
$(_DEST_DIR
)