PageRenderTime 24ms CodeModel.GetById 13ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 1ms

/toolkit/mozapps/update/test/Makefile.in

http://github.com/zpao/v8monkey
Autoconf | 124 lines | 67 code | 18 blank | 39 comment | 2 complexity | 98c984d1222cf0681251bbeb25fbede4 MD5 | raw file
  1# ***** BEGIN LICENSE BLOCK *****
  2# Version: MPL 1.1/GPL 2.0/LGPL 2.1
  3#
  4# The contents of this file are subject to the Mozilla Public License Version
  5# 1.1 (the "License"); you may not use this file except in compliance with
  6# the License. You may obtain a copy of the License at
  7# http://www.mozilla.org/MPL/
  8#
  9# Software distributed under the License is distributed on an "AS IS" basis,
 10# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 11# for the specific language governing rights and limitations under the
 12# License.
 13#
 14# The Original Code is the Application Update Service.
 15#
 16# The Initial Developer of the Original Code is
 17# Robert Strong <robert.bugzilla@gmail.com>.
 18#
 19# Portions created by the Initial Developer are Copyright (C) 2008
 20# the Mozilla Foundation <http://www.mozilla.org/>. All Rights Reserved.
 21#
 22# Contributor(s):
 23#
 24# Alternatively, the contents of this file may be used under the terms of
 25# either of the GNU General Public License Version 2 or later (the "GPL"),
 26# or 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.
 35#
 36# ***** END LICENSE BLOCK *****
 37
 38DEPTH     = ../../../..
 39topsrcdir = @top_srcdir@
 40srcdir    = @srcdir@
 41VPATH     = @srcdir@
 42relativesrcdir = toolkit/mozapps/update/test
 43
 44include $(DEPTH)/config/autoconf.mk
 45
 46XPCSHELL_TESTS = \
 47  unit \
 48  $(NULL)
 49
 50TESTROOT = $(call core_abspath,$(DEPTH))/_tests/xpcshell/$(relativesrcdir)
 51
 52DEFINES += \
 53  -DAB_CD=$(AB_CD) \
 54  -DMOZ_APP_NAME=$(MOZ_APP_NAME) \
 55  -DBIN_SUFFIX=$(BIN_SUFFIX) \
 56  -DNS_NO_XPCOM \
 57  $(NULL)
 58
 59# Android doesn't build the updater binary, so it skips the things that test it.
 60ifneq ($(OS_TARGET),Android)
 61DIRS = \
 62  chrome \
 63  $(NULL)
 64
 65CPPSRCS = \
 66  TestAUSReadStrings.cpp \
 67  TestAUSHelper.cpp \
 68  $(NULL)
 69
 70SIMPLE_PROGRAMS = $(CPPSRCS:.cpp=$(BIN_SUFFIX))
 71
 72INI_TEST_FILES = \
 73  TestAUSReadStrings1.ini \
 74  TestAUSReadStrings2.ini \
 75  TestAUSReadStrings3.ini \
 76  $(NULL)
 77
 78LOCAL_INCLUDES += \
 79  -I$(srcdir) \
 80  -I$(topsrcdir)/toolkit/mozapps/update \
 81  -I$(topsrcdir)/toolkit/mozapps/update/common \
 82  $(NULL)
 83
 84MOZ_WINCONSOLE = 1
 85
 86LIBS += \
 87  ../../readstrings/$(LIB_PREFIX)readstrings.$(LIB_SUFFIX) \
 88  $(NULL)
 89
 90ifeq ($(OS_ARCH),WINNT)
 91USE_STATIC_LIBS = 1
 92DEFINES += -DUNICODE -D_UNICODE
 93endif
 94endif # Not Android
 95
 96include $(topsrcdir)/config/rules.mk
 97
 98ifneq ($(OS_TARGET),Android)
 99# TestAUSReadStrings runs during check in the following directory with a Unicode
100# char in order to test bug 473417 on Windows.
101ifeq ($(OS_ARCH),WINNT)
102bug473417dir = test_bug473417-�
103else
104bug473417dir = test_bug473417
105endif
106
107check::
108	$(RM) -rf $(DEPTH)/_tests/updater/ && $(NSINSTALL) -D $(DEPTH)/_tests/updater/$(bug473417dir)/
109	for i in $(INI_TEST_FILES); do \
110	  $(INSTALL) $(srcdir)/$$i $(DEPTH)/_tests/updater/$(bug473417dir)/; \
111	done
112	$(INSTALL) $(FINAL_TARGET)/TestAUSReadStrings$(BIN_SUFFIX) $(DEPTH)/_tests/updater/$(bug473417dir)/
113	@$(RUN_TEST_PROGRAM) $(DEPTH)/_tests/updater/$(bug473417dir)/TestAUSReadStrings$(BIN_SUFFIX)
114endif # Not Android
115
116libs:: unit/head_update.js.in
117	$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py -Fsubstitution $(DEFINES) $(ACDEFINES) $^ > $(TESTROOT)/unit/head_update.js
118
119ifneq ($(OS_TARGET),Android)
120ifndef MOZ_PROFILE_GENERATE
121libs::
122	$(INSTALL) TestAUSHelper$(BIN_SUFFIX) $(DEPTH)/_tests/xpcshell/$(relativesrcdir)/unit
123endif
124endif # Not Android