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

98 lines
2.5 KiB
Makefile

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = toolkit/mozapps/update/test
include $(DEPTH)/config/autoconf.mk
XPCSHELL_TESTS = \
unit \
$(NULL)
TESTROOT = $(call core_abspath,$(DEPTH))/_tests/xpcshell/$(relativesrcdir)
DEFINES += \
-DAB_CD=$(AB_CD) \
-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
-DMOZ_APP_DISPLAYNAME=$(MOZ_APP_DISPLAYNAME) \
-DBIN_SUFFIX=$(BIN_SUFFIX) \
-DNS_NO_XPCOM \
-DMOZ_DEBUG=$(MOZ_DEBUG) \
$(NULL)
ifdef MOZ_MAINTENANCE_SERVICE
DEFINES += -DMOZ_MAINTENANCE_SERVICE=$(MOZ_MAINTENANCE_SERVICE)
endif
# Android doesn't build the updater binary, so it skips the things that test it.
ifneq ($(OS_TARGET),Android)
DIRS = \
chrome \
$(NULL)
CPPSRCS = \
TestAUSReadStrings.cpp \
TestAUSHelper.cpp \
$(NULL)
SIMPLE_PROGRAMS = $(CPPSRCS:.cpp=$(BIN_SUFFIX))
INI_TEST_FILES = \
TestAUSReadStrings1.ini \
TestAUSReadStrings2.ini \
TestAUSReadStrings3.ini \
$(NULL)
LOCAL_INCLUDES += \
-I$(srcdir) \
-I$(topsrcdir)/toolkit/mozapps/update \
-I$(topsrcdir)/toolkit/mozapps/update/common \
$(NULL)
MOZ_WINCONSOLE = 1
LIBS += \
../common/$(LIB_PREFIX)updatecommon.$(LIB_SUFFIX) \
$(NULL)
ifeq ($(OS_ARCH),WINNT)
USE_STATIC_LIBS = 1
DEFINES += -DUNICODE -D_UNICODE
endif
endif # Not Android
include $(topsrcdir)/config/rules.mk
ifneq ($(OS_TARGET),Android)
# TestAUSReadStrings runs during check in the following directory with a Unicode
# char in order to test bug 473417 on Windows.
ifeq ($(OS_ARCH),WINNT)
bug473417dir = test_bug473417-รณ
else
bug473417dir = test_bug473417
endif
check::
$(RM) -rf $(DEPTH)/_tests/updater/ && $(NSINSTALL) -D $(DEPTH)/_tests/updater/$(bug473417dir)/
for i in $(INI_TEST_FILES); do \
$(INSTALL) $(srcdir)/$$i $(DEPTH)/_tests/updater/$(bug473417dir)/; \
done
$(INSTALL) $(FINAL_TARGET)/TestAUSReadStrings$(BIN_SUFFIX) $(DEPTH)/_tests/updater/$(bug473417dir)/
@$(RUN_TEST_PROGRAM) $(DEPTH)/_tests/updater/$(bug473417dir)/TestAUSReadStrings$(BIN_SUFFIX)
endif # Not Android
libs:: unit/head_update.js.in
$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py -Fsubstitution $(DEFINES) $(ACDEFINES) $^ > $(TESTROOT)/unit/head_update.js
ifneq ($(OS_TARGET),Android)
ifndef MOZ_PROFILE_GENERATE
libs::
$(INSTALL) TestAUSHelper$(BIN_SUFFIX) $(DEPTH)/_tests/xpcshell/$(relativesrcdir)/unit
endif
endif # Not Android