/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. DEPTH = ../../../..
  38. topsrcdir = @top_srcdir@
  39. srcdir = @srcdir@
  40. VPATH = @srcdir@
  41. relativesrcdir = toolkit/mozapps/update/test
  42. include $(DEPTH)/config/autoconf.mk
  43. XPCSHELL_TESTS = \
  44. unit \
  45. $(NULL)
  46. TESTROOT = $(call core_abspath,$(DEPTH))/_tests/xpcshell/$(relativesrcdir)
  47. DEFINES += \
  48. -DAB_CD=$(AB_CD) \
  49. -DMOZ_APP_NAME=$(MOZ_APP_NAME) \
  50. -DBIN_SUFFIX=$(BIN_SUFFIX) \
  51. -DNS_NO_XPCOM \
  52. $(NULL)
  53. # Android doesn't build the updater binary, so it skips the things that test it.
  54. ifneq ($(OS_TARGET),Android)
  55. DIRS = \
  56. chrome \
  57. $(NULL)
  58. CPPSRCS = \
  59. TestAUSReadStrings.cpp \
  60. TestAUSHelper.cpp \
  61. $(NULL)
  62. SIMPLE_PROGRAMS = $(CPPSRCS:.cpp=$(BIN_SUFFIX))
  63. INI_TEST_FILES = \
  64. TestAUSReadStrings1.ini \
  65. TestAUSReadStrings2.ini \
  66. TestAUSReadStrings3.ini \
  67. $(NULL)
  68. LOCAL_INCLUDES += \
  69. -I$(srcdir) \
  70. -I$(topsrcdir)/toolkit/mozapps/update \
  71. -I$(topsrcdir)/toolkit/mozapps/update/common \
  72. $(NULL)
  73. MOZ_WINCONSOLE = 1
  74. LIBS += \
  75. ../../readstrings/$(LIB_PREFIX)readstrings.$(LIB_SUFFIX) \
  76. $(NULL)
  77. ifeq ($(OS_ARCH),WINNT)
  78. USE_STATIC_LIBS = 1
  79. DEFINES += -DUNICODE -D_UNICODE
  80. endif
  81. endif # Not Android
  82. include $(topsrcdir)/config/rules.mk
  83. ifneq ($(OS_TARGET),Android)
  84. # TestAUSReadStrings runs during check in the following directory with a Unicode
  85. # char in order to test bug 473417 on Windows.
  86. ifeq ($(OS_ARCH),WINNT)
  87. bug473417dir = test_bug473417-ó
  88. else
  89. bug473417dir = test_bug473417
  90. endif
  91. check::
  92. $(RM) -rf $(DEPTH)/_tests/updater/ && $(NSINSTALL) -D $(DEPTH)/_tests/updater/$(bug473417dir)/
  93. for i in $(INI_TEST_FILES); do \
  94. $(INSTALL) $(srcdir)/$$i $(DEPTH)/_tests/updater/$(bug473417dir)/; \
  95. done
  96. $(INSTALL) $(FINAL_TARGET)/TestAUSReadStrings$(BIN_SUFFIX) $(DEPTH)/_tests/updater/$(bug473417dir)/
  97. @$(RUN_TEST_PROGRAM) $(DEPTH)/_tests/updater/$(bug473417dir)/TestAUSReadStrings$(BIN_SUFFIX)
  98. endif # Not Android
  99. libs:: unit/head_update.js.in
  100. $(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py -Fsubstitution $(DEFINES) $(ACDEFINES) $^ > $(TESTROOT)/unit/head_update.js
  101. ifneq ($(OS_TARGET),Android)
  102. ifndef MOZ_PROFILE_GENERATE
  103. libs::
  104. $(INSTALL) TestAUSHelper$(BIN_SUFFIX) $(DEPTH)/_tests/xpcshell/$(relativesrcdir)/unit
  105. endif
  106. endif # Not Android