toolkit/mozapps/update/tests/moz.build
author Emilio Cobos Álvarez <emilio@crisal.io>
Thu, 31 May 2018 17:09:47 +0200
changeset 475078 73a2ea4007a0fe8706801a1a73011fa4a5c27a7f
parent 461437 b3d94aa6bbd8e0e784adb05966df183fd4e7837e
child 487770 568230ce860e86538ee9d567fdd6fcec46142c8d
permissions -rw-r--r--
Bug 1465585: Disable stl wrapping in some places under toolkit/mozapps/update. r=glandium This is disabled already in updater-common.build and similar places, so that they can use UniquePtr and include <new>. These files were getting around it because they didn't include the stl at all, but now they include <utility> transitively for std::move. MozReview-Commit-ID: IaU9mRbbCAk

# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.

HAS_MISC_RULE = True

FINAL_TARGET = '_tests/xpcshell/toolkit/mozapps/update/tests/data'

if not CONFIG['MOZ_SUITE']:
  BROWSER_CHROME_MANIFESTS += ['browser/browser.ini']

MOCHITEST_CHROME_MANIFESTS += ['chrome/chrome.ini']

XPCSHELL_TESTS_MANIFESTS += [
    'unit_aus_update/xpcshell.ini',
    'unit_base_updater/xpcshell.ini'
]

if CONFIG['MOZ_MAINTENANCE_SERVICE']:
    XPCSHELL_TESTS_MANIFESTS += ['unit_service_updater/xpcshell.ini']

SimplePrograms([
    'TestAUSHelper',
    'TestAUSReadStrings',
])

LOCAL_INCLUDES += [
    '/toolkit/mozapps/update',
    '/toolkit/mozapps/update/common',
]

if CONFIG['OS_ARCH'] == 'WINNT':
    OS_LIBS += [
        'shlwapi',
      ]

USE_LIBS += [
    'updatecommon',
]

for var in ('MOZ_APP_NAME', 'MOZ_APP_BASENAME', 'MOZ_APP_DISPLAYNAME',
            'MOZ_APP_VENDOR', 'BIN_SUFFIX', 'MOZ_DEBUG'):
    DEFINES[var] = CONFIG[var]

DEFINES['NS_NO_XPCOM'] = True

DisableStlWrapping()

if CONFIG['MOZ_MAINTENANCE_SERVICE']:
    DEFINES['MOZ_MAINTENANCE_SERVICE'] = CONFIG['MOZ_MAINTENANCE_SERVICE']

# For debugging purposes only
#DEFINES['DISABLE_UPDATER_AUTHENTICODE_CHECK'] = True

if CONFIG['OS_ARCH'] == 'WINNT':
    DEFINES['UNICODE'] = True
    DEFINES['_UNICODE'] = True
    USE_STATIC_LIBS = True
    if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
        WIN32_EXE_LDFLAGS += ['-municode']

TEST_HARNESS_FILES.testing.mochitest.browser.toolkit.mozapps.update.tests.browser += [
    'chrome/update.sjs',
    'data/shared.js',
    'data/sharedUpdateXML.js',
    'data/simple.mar',
]

TEST_HARNESS_FILES.testing.mochitest.chrome.toolkit.mozapps.update.tests.data += [
    'data/shared.js',
    'data/sharedUpdateXML.js',
    'data/simple.mar',
]

FINAL_TARGET_FILES += [
    'data/complete.exe',
    'data/complete.mar',
    'data/complete.png',
    'data/complete_log_success_mac',
    'data/complete_log_success_win',
    'data/complete_mac.mar',
    'data/complete_precomplete',
    'data/complete_precomplete_mac',
    'data/complete_removed-files',
    'data/complete_removed-files_mac',
    'data/complete_update_manifest',
    'data/old_version.mar',
    'data/partial.exe',
    'data/partial.mar',
    'data/partial.png',
    'data/partial_log_failure_mac',
    'data/partial_log_failure_win',
    'data/partial_log_success_mac',
    'data/partial_log_success_win',
    'data/partial_mac.mar',
    'data/partial_precomplete',
    'data/partial_precomplete_mac',
    'data/partial_removed-files',
    'data/partial_removed-files_mac',
    'data/partial_update_manifest',
    'data/replace_log_success',
    'data/shared.js',
    'data/sharedUpdateXML.js',
    'data/simple.mar',
    'data/wrong_product_channel.mar',
    'data/xpcshellUtilsAUS.js',
    'TestAUSReadStrings1.ini',
    'TestAUSReadStrings2.ini',
    'TestAUSReadStrings3.ini',
]

with Files("browser/browser_TelemetryUpdatePing.js"):
    BUG_COMPONENT = ("Toolkit", "Telemetry")

if CONFIG['CC_TYPE'] == 'gcc':
    CXXFLAGS += ['-Wno-format-truncation']