2012-05-23 00:45:24 +04:00
|
|
|
# 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/.
|
|
|
|
|
|
|
|
# Avoid recursive make to avoid having to add files to the gtest/ subdirectory
|
|
|
|
# (which is third-party code), and to make the build faster.
|
|
|
|
|
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
2014-06-09 06:00:58 +04:00
|
|
|
# Bug 1028035: Linking xul-gtest.dll takes too long, so we disable GTest on
|
|
|
|
# Windows PGO builds.
|
2014-06-26 02:59:24 +04:00
|
|
|
ifeq (1_WINNT,$(MOZ_PGO)_$(OS_ARCH))
|
2014-06-09 06:00:58 +04:00
|
|
|
SKIP_GTEST_DURING_MAKE_CHECK ?= 1
|
|
|
|
endif
|
|
|
|
|
2013-03-11 22:47:40 +04:00
|
|
|
ifeq (browser,$(MOZ_BUILD_APP))
|
2013-11-07 05:37:45 +04:00
|
|
|
ifdef COMPILE_ENVIRONMENT
|
2014-06-04 23:17:44 +04:00
|
|
|
gtest::
|
|
|
|
$(MAKE) -C $(DEPTH)/toolkit/library gtestxul
|
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
$(MAKE) -C $(DEPTH)/browser/app repackage
|
|
|
|
endif
|
2014-06-09 06:00:58 +04:00
|
|
|
ifneq (1,$(SKIP_GTEST_DURING_MAKE_CHECK))
|
2014-06-04 23:17:44 +04:00
|
|
|
check::
|
2013-03-11 22:47:40 +04:00
|
|
|
$(MAKE) -C $(DEPTH)/toolkit/library gtestxul
|
2013-11-08 06:42:22 +04:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
$(MAKE) -C $(DEPTH)/browser/app repackage
|
2014-10-02 17:01:34 +04:00
|
|
|
$(PYTHON) $(topsrcdir)/testing/gtest/rungtests.py \
|
|
|
|
--cwd=$(DEPTH)/_tests/gtest \
|
|
|
|
--xre-path=$(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources \
|
|
|
|
--symbols-path=$(DIST)/crashreporter-symbols \
|
|
|
|
$(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/$(MOZ_APP_NAME)$(BIN_SUFFIX)
|
2014-09-29 22:51:21 +04:00
|
|
|
else
|
2014-10-02 17:01:34 +04:00
|
|
|
$(PYTHON) $(topsrcdir)/testing/gtest/rungtests.py \
|
|
|
|
--cwd=$(DEPTH)/_tests/gtest \
|
|
|
|
--xre-path=$(DIST)/bin \
|
|
|
|
--symbols-path=$(DIST)/crashreporter-symbols \
|
|
|
|
$(DIST)/bin/$(MOZ_APP_NAME)$(BIN_SUFFIX)
|
2014-09-29 22:51:21 +04:00
|
|
|
endif
|
2014-06-09 06:00:58 +04:00
|
|
|
else
|
|
|
|
check::
|
|
|
|
echo GTest skipped during make check
|
2013-03-11 22:47:40 +04:00
|
|
|
endif
|
|
|
|
endif
|
2014-02-12 17:23:41 +04:00
|
|
|
endif
|