~mozillateam/thunderbird/thunderbird-beta.lucid

« back to all changes in this revision

Viewing changes to debian/build/testsuite.mk

  • Committer: Chris Coulson
  • Date: 2013-02-20 10:31:40 UTC
  • Revision ID: chris.coulson@canonical.com-20130220103140-ryo3kr6z27mxmkhv
* New upstream release from the beta channel (THUNDERBIRD_20_0b1_BUILD1)
* Drop patches fixed upstream
  - remove debian/patches/ionmonkey-hardfp-support.patch
  - update debian/patches/series.in
* thunderbird-gnome-support needs explicit dependency on libnotify
  - update debian/control{,.in}
* Add support for autopkgtest, and package the xpcshell and mozmill
  testsuites. Note that tests that can't be ran as an autopkgtest (eg, if
  they require write permissions to the application directory) will still
  be ran at build time
  - add thunderbird-testsuite package in debian/control.in
  - update debian/control
  - add debian/thunderbird-testsuite.install.in
  - add debian/thunderbird-testsuite.links.in
  - update debian/build/mozbuild.mk
  - update debian/rules
  - add debian/tests/control
  - add debian/tests/mozmill
  - add debian/tests/xpcshell-tests
  - add debian/testing/run_mozmill.in
  - add debian/testing/run_xpcshell_tests.in
  - add debian/testing/testrunhelper.py
  - update debian/config/mozconfig.in to always build with --enable-tests
  - update debian/build/testsuite.mk to add the ability to run xpcshell-tests
    with our own reduced manifest
  - add debian/testing/xpcshell-build.ini
* Fix various tests that assume that either the application directory or
  test directory can be written to
  - add d/p/test-fixes/xpcshell-docshell-no-writes-to-appdir.patch
  - add d/p/test-fixes/xpcshell-contentprefs-no-writes-to-appdir.patch
  - add d/p/test-fixes/xpcshell-exthandler-no-writes-to-appdir.patch
  - add d/p/test-fixes/xpcshell-ctypes-no-writes-to-appdir.patch
  - add d/p/test-fixes/xpcshell-xpcom-no-writes-to-testdir-or-appdir.patch
  - add d/p/test-fixes/xpcshell-libpref-no-writes-to-testdir.patch
  - add d/p/test-fixes/xpcshell-mailnews-local-no-writes-to-testdir.patch
  - update debian/patches/series.in
* Export NO_PNG_PKG_MANGLE as optipng breaks tests that are dependent
  on image format / size
  - update debian/build/mozbuild.mk
* Add support for skipping xpcshell tests that require write access to the
  application directory, when running the tests on a real install (but
  allow them to run if running tests from the build tree)
  - add debian/patches/xpcshell-allow-omit-tests-on-real-install.patch
  - update debian/patches/series.in
* Don't test that the addon selection dialog appears in test_bug596343.js,
  as we disable this
  - add d/p/test-overrides/xpcshell-disable-addon-select-dialog-test.patch
  - update debian/patches/series
* Fix a failure in test_nodb_pluschanges.js due to const redeclaration
  - add d/p/test-fixes/xpcshell-search-fix-const-redeclaration.patch
  - update debian/patches/series.in
* Disable failing test_geolocation_provider.js xpcshell test
  - add d/p/test-overrides/xpcshell-disable-geolocation-provider-test.patch
  - update debian/patches/series.in
* Disable test_upgrade.js and test_upgrade_strictcompat.js xpcshell tests
  for now as they require write access to the application directory
  - add d/p/test-overrides/xpcshell-disable-extension-upgrade-test.patch
  - update debian/patches/series.in
* Update python-virtualenv to 1.8.2
  - add debian/patches/update-python-virtualenv.patch
  - update debian/patches/series.in
* Workaround the bash shebang 80 character limit when executing scripts in
  a virtualenv, by invoking the interpreter directly
  - add debian/patches/workaround-shebang-char-limit.patch
  - update debian/patches/series.in
* Disable test_autoconfigFetchDisk.js xpcshell test, as it requires write
  access to the application directory
  - add d/p/test-overrides/xpcshell-disable-isp-autoconfig-test.patch
  - update debian/patches/series.in
* Disable test_mailGlue_distribution.js xpcshell test, as it requires write
  access to the application directory
  - add d/p/test-overrides/xpcshell-disable-mailglue-distribution-test.patch
  - update debian/patches/series.in
* Disable autopkgtest for Thunderbird for now
  - update debian/control.in

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
2
 
3
 
LOCALE          := en_US.UTF-8
4
 
LOCDIR          = $(CURDIR)/$(MOZ_DISTDIR)/.locales
5
 
 
6
 
ifeq (1,$(MOZ_WANT_UNIT_TESTS))
7
 
ifeq (,$(MOZ_TESTS))
8
 
TESTS = check xpcshell-tests jstestbrowser reftest crashtest mochitest
9
 
else
10
 
TESTS = $(MOZ_TESTS)
11
 
endif
12
 
endif
13
 
 
14
 
run-tests: $(addprefix debian/stamp-,$(TESTS))
15
 
 
16
 
$(addprefix debian/stamp-,$(TESTS)): debian/stamp-makefile-build
17
 
 
18
 
# Required for js/src/trace-tests/sunspider/check-date-format-tofte.js
19
 
$(addprefix debian/stamp-,check jstestbrowser): export TZ = :/usr/share/zoneinfo/posix/US/Pacific
20
 
 
21
 
$(LOCDIR)/%:
22
 
        mkdir -p $(LOCDIR)
 
3
MOZ_TEST_LOCALE ?= en_US.UTF-8
 
4
 
 
5
MOZ_TESTS ?= check xpcshell-tests-build
 
6
MOZ_TEST_FAILURES_FATAL ?= 1
 
7
 
 
8
MOZ_TEST_X_WRAPPER ?= xvfb-run -a -s "-screen 0 1024x768x24" dbus-launch --exit-with-session
 
9
MOZ_TESTS_NEED_X ?= xpcshell-tests xpcshell-tests-build jstestbrowser reftest crashtest mochitest
 
10
 
 
11
MOZ_TESTS_TZ_ENV ?= TZ=:/usr/share/zoneinfo/posix/US/Pacific
 
12
MOZ_TESTS_NEED_TZ ?= check jstestbrowser
 
13
 
 
14
MOZ_TESTS_NEED_LOCALE ?= xpcshell-tests jstestbrowser reftest
 
15
 
 
16
TEST_LOCALES = $(CURDIR)/$(MOZ_OBJDIR)/_ubuntu_build_test_tmp/locales
 
17
TEST_HOME = $(CURDIR)/$(MOZ_OBJDIR)/_ubuntu_build_test_tmp/home
 
18
 
 
19
GET_WRAPPER = $(if $(filter $(1),$(MOZ_TESTS_NEED_X)),$(MOZ_TEST_X_WRAPPER))
 
20
GET_TZ = $(if $(filter $(1),$(MOZ_TESTS_NEED_TZ)),$(MOZ_TESTS_TZ_ENV))
 
21
 
 
22
DOIF_NEEDS_LOCALE = $(if $(filter $(1),$(MOZ_TESTS_NEED_LOCALE)),$(call $(2)))
 
23
MAKE_LOCALE = $(TEST_LOCALES)/$(MOZ_TEST_LOCALE)
 
24
GET_LOCALE_ENV = LOCPATH=$(TEST_LOCALES) LC_ALL=$(MOZ_TEST_LOCALE)
 
25
 
 
26
ifneq (1,$(MOZ_TEST_FAILURES_FATAL))
 
27
CMD_APPEND = || true
 
28
endif
 
29
 
 
30
ifneq (1,$(MOZ_WANT_UNIT_TESTS))
 
31
MOZ_TESTS =
 
32
endif
 
33
 
 
34
$(TEST_LOCALES) $(TEST_HOME)::
 
35
        mkdir -p $@
 
36
 
 
37
$(TEST_LOCALES)/$(MOZ_TEST_LOCALE): $(TEST_LOCALES)
23
38
        localedef -f $(shell echo $(notdir $@) | cut -d '.' -f 2) -i $(shell echo $(notdir $@) | cut -d '.' -f 1) $@
24
39
 
25
 
# Setup locales for tests which need it
26
 
$(addprefix debian/stamp-,xpcshell-tests jstestbrowser reftest): $(LOCDIR)/$(LOCALE)
27
 
$(addprefix debian/stamp-,xpcshell-tests jstestbrowser reftest): export LOCPATH=$(LOCDIR)
28
 
$(addprefix debian/stamp-,xpcshell-tests jstestbrowser reftest): export LC_ALL=$(LOCALE)
29
 
 
30
 
# Disable tests that are known to fail
31
 
$(addprefix debian/stamp-,xpcshell-tests): debian/stamp-xpcshell-tests-disable
32
 
 
33
 
# Tests that need a X server
34
 
$(addprefix debian/stamp-,xpcshell-tests jstestbrowser reftest crashtest mochitest): WRAPPER = xvfb-run -a -s "-screen 0 1024x768x24" dbus-launch --exit-with-session
35
 
 
36
 
# Run the test!
37
 
$(addprefix debian/stamp-,$(TESTS)):
38
 
        HOME="$(CURDIR)/$(MOZ_DISTDIR)" \
39
 
        $(WRAPPER) $(MAKE) -C $(CURDIR)/$(MOZ_OBJDIR) $(subst debian/stamp-,,$@) || true
40
 
        touch $@
41
 
 
42
 
debian/stamp-xpcshell-tests-disable:: debian/stamp-makefile-build
43
 
        # Hangs without network access
44
 
        rm -f $(CURDIR)/$(MOZ_OBJDIR)$(MOZ_MOZDIR)/_tests/xpcshell/toolkit/components/places/tests/unit/test_404630.js
45
 
 
46
 
        # Needs GConf to be running. I guess we need to start with dbus-launch to fix this
47
 
        rm -f $(CURDIR)/$(MOZ_OBJDIR)$(MOZ_MOZDIR)/_tests/xpcshell/browser/components/shell/test/unit/test_421977.js
48
 
        rm -f $(CURDIR)/$(MOZ_OBJDIR)$(MOZ_MOZDIR)/_tests/xpcshell/uriloader/exthandler/tests/unit/test_handlerService.js
49
 
        touch $@
 
40
run-tests: $(MOZ_TESTS)
 
41
 
 
42
$(MOZ_TESTS):: %: debian/stamp-test-%
 
43
 
 
44
$(patsubst %,debian/stamp-test-%,$(MOZ_TESTS)):: TZ=$(call GET_TZ,$*)
 
45
$(patsubst %,debian/stamp-test-%,$(MOZ_TESTS)):: WRAPPER=$(call GET_WRAPPER,$*)
 
46
$(patsubst %,debian/stamp-test-%,$(MOZ_TESTS)):: $(call DOIF_NEEDS_LOCALE,$*,MAKE_LOCALE)
 
47
$(patsubst %,debian/stamp-test-%,$(MOZ_TESTS)):: LOCALE_ENV=$(call DOIF_NEEDS_LOCALE,$*,GET_LOCALE_ENV)
 
48
$(patsubst %,debian/stamp-test-%,$(MOZ_TESTS)):: $(TEST_HOME)
 
49
$(patsubst %,debian/stamp-test-%,$(MOZ_TESTS)):: TEST_CMD=HOME=$(TEST_HOME) $(LOCALE_ENV) $(TZ) $(WRAPPER) $(if $(findstring -build,$*),debian/rules run-$*,$(MAKE) -C $(CURDIR)/$(MOZ_OBJDIR) $*)
 
50
$(patsubst %,debian/stamp-test-%,$(MOZ_TESTS)):: debian/stamp-test-%: debian/stamp-makefile-build
 
51
        @echo "\nRunning $(TEST_CMD)\n"
 
52
        $(TEST_CMD) $(CMD_APPEND)
 
53
        touch $@
 
54
 
 
55
$(CURDIR)/$(MOZ_OBJDIR)/$(MOZ_MOZDIR)/_tests/xpcshell/xpcshell-build.ini:
 
56
        cp $(CURDIR)/debian/testing/xpcshell-build.ini $@
 
57
 
 
58
run-xpcshell-tests-build: $(CURDIR)/$(MOZ_OBJDIR)/$(MOZ_MOZDIR)/_tests/xpcshell/xpcshell-build.ini
 
59
        $(MOZ_PYTHON) -u $(CURDIR)/$(MOZ_MOZDIR)/config/pythonpath.py \
 
60
          -I$(CURDIR)/$(MOZ_MOZDIR)/build \
 
61
          -I$(CURDIR)/$(MOZ_OBJDIR)/$(MOZ_MOZDIR)/_tests/mozbase/mozinfo \
 
62
          $(CURDIR)/$(MOZ_MOZDIR)/testing/xpcshell/runxpcshelltests.py \
 
63
          --manifest=$(CURDIR)/$(MOZ_OBJDIR)/$(MOZ_MOZDIR)/_tests/xpcshell/xpcshell-build.ini \
 
64
          --build-info-json=$(CURDIR)/$(MOZ_OBJDIR)/$(MOZ_MOZDIR)/mozinfo.json \
 
65
          --no-logfiles \
 
66
          --tests-root-dir=$(CURDIR)/$(MOZ_OBJDIR)/$(MOZ_MOZDIR)/_tests/xpcshell \
 
67
          --testing-modules-dir=$(CURDIR)/$(MOZ_OBJDIR)/$(MOZ_MOZDIR)/_tests/modules \
 
68
          $(CURDIR)/$(MOZ_DISTDIR)/bin/xpcshell
 
69
 
 
70
.PHONY: run-tests $(MOZ_TESTS) run-xpcshell-tests-build