Bug 733530: Use .tar.gz for test archives r=gps

Differential Revision: https://phabricator.services.mozilla.com/D1743

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Chris AtLee 2018-07-03 18:33:02 +00:00
parent ac43f2bc5c
commit 8745339529
17 changed files with 60 additions and 56 deletions

View file

@ -933,7 +933,7 @@ def run_test_harness(parser, options):
# We have to validate options.app here for the case when the mach # We have to validate options.app here for the case when the mach
# command is able to find it after argument parsing. This can happen # command is able to find it after argument parsing. This can happen
# when running from a tests.zip. # when running from a tests archive.
if not options.app: if not options.app:
parser.error("could not find the application path, --appname must be specified") parser.error("could not find the application path, --appname must be specified")

View file

@ -573,7 +573,7 @@ def find_files(archive):
if archive == 'common': if archive == 'common':
# Construct entries ensuring all our generated harness files are # Construct entries ensuring all our generated harness files are
# packaged in the common tests zip. # packaged in the common tests archive.
packaged_paths = set() packaged_paths = set()
for entry in OBJDIR_TEST_FILES.values(): for entry in OBJDIR_TEST_FILES.values():
pat = mozpath.join(entry['base'], entry['pattern']) pat = mozpath.join(entry['base'], entry['pattern'])

View file

@ -67,15 +67,17 @@ mochitest-harness:
use-artifacts: use-artifacts:
build: build:
- target.tar.bz2 - target.tar.bz2
- target.common.tests.zip - target.common.tests.tar.gz
- target.mochitest.tests.zip - target.mochitest.tests.tar.gz
command: > command: >
source /builds/worker/scripts/xvfb.sh && source /builds/worker/scripts/xvfb.sh &&
start_xvfb '1600x1200x24' 0 && start_xvfb '1600x1200x24' 0 &&
cd $USE_ARTIFACT_PATH/build && cd $USE_ARTIFACT_PATH/build &&
tar -xf target.tar.bz2 && tar -xf target.tar.bz2 &&
unzip -q -d tests target.common.tests.zip && mkdir -p tests &&
unzip -q -d tests target.mochitest.tests.zip && (cd tests &&
tar xf ../target.common.tests.tar.gz &&
tar xf ../target.mochitest.tests.tar.gz) &&
export GECKO_BINARY_PATH=$USE_ARTIFACT_PATH/build/firefox/firefox && export GECKO_BINARY_PATH=$USE_ARTIFACT_PATH/build/firefox/firefox &&
export TEST_HARNESS_ROOT=$USE_ARTIFACT_PATH/build/tests && export TEST_HARNESS_ROOT=$USE_ARTIFACT_PATH/build/tests &&
cd /builds/worker/checkouts/gecko && cd /builds/worker/checkouts/gecko &&
@ -184,15 +186,17 @@ reftest-harness:
use-artifacts: use-artifacts:
build: build:
- target.tar.bz2 - target.tar.bz2
- target.common.tests.zip - target.common.tests.tar.gz
- target.reftest.tests.zip - target.reftest.tests.tar.gz
command: > command: >
source /builds/worker/scripts/xvfb.sh && source /builds/worker/scripts/xvfb.sh &&
start_xvfb '1600x1200x24' 0 && start_xvfb '1600x1200x24' 0 &&
cd $USE_ARTIFACT_PATH/build && cd $USE_ARTIFACT_PATH/build &&
tar -xf target.tar.bz2 && tar -xf target.tar.bz2 &&
unzip -q -d tests target.common.tests.zip && mkdir -p tests &&
unzip -q -d tests target.reftest.tests.zip && (cd tests &&
tar xf ../target.common.tests.tar.gz &&
tar xf ../target.reftest.tests.tar.gz) &&
export GECKO_BINARY_PATH=$USE_ARTIFACT_PATH/build/firefox/firefox && export GECKO_BINARY_PATH=$USE_ARTIFACT_PATH/build/firefox/firefox &&
export TEST_HARNESS_ROOT=$USE_ARTIFACT_PATH/build/tests && export TEST_HARNESS_ROOT=$USE_ARTIFACT_PATH/build/tests &&
cd /builds/worker/checkouts/gecko && cd /builds/worker/checkouts/gecko &&

View file

@ -498,15 +498,15 @@ if [ "${USE_MC}" == "true" ]; then
fi fi
BROWSER_ARCHIVE="${PRODUCT}-${VERSION}.en-US.${PLATFORM}.${PLATFORM_EXT}" BROWSER_ARCHIVE="${PRODUCT}-${VERSION}.en-US.${PLATFORM}.${PLATFORM_EXT}"
TESTS_ARCHIVE="${PRODUCT}-${VERSION}.en-US.${PLATFORM}.common.tests.zip" TESTS_ARCHIVE="${PRODUCT}-${VERSION}.en-US.${PLATFORM}.common.tests.tar.gz"
if [ "${USE_MC}" == "true" ]; then if [ "${USE_MC}" == "true" ]; then
BROWSER_ARCHIVE="${PRODUCT}-${MCVERSION}.en-US.${PLATFORM}.${PLATFORM_EXT}" BROWSER_ARCHIVE="${PRODUCT}-${MCVERSION}.en-US.${PLATFORM}.${PLATFORM_EXT}"
TESTS_ARCHIVE="${PRODUCT}-${MCVERSION}.en-US.${PLATFORM}.common.tests.zip" TESTS_ARCHIVE="${PRODUCT}-${MCVERSION}.en-US.${PLATFORM}.common.tests.tar.gz"
fi fi
# Simple name builds on >=53.0.0 # Simple name builds on >=53.0.0
if [ "${MAJOR_VERSION}" -ge 53 ] ; then if [ "${MAJOR_VERSION}" -ge 53 ] ; then
BROWSER_ARCHIVE="target.${PLATFORM_EXT}" BROWSER_ARCHIVE="target.${PLATFORM_EXT}"
TESTS_ARCHIVE="target.common.tests.zip" TESTS_ARCHIVE="target.common.tests.tar.gz"
fi fi
# End 'remove once 52esr is off support' # End 'remove once 52esr is off support'

View file

@ -25,19 +25,19 @@ from voluptuous import Any, Required, Optional
# See example in bug 1348286 # See example in bug 1348286
_DESKTOP_UPSTREAM_ARTIFACTS_UNSIGNED_EN_US = [ _DESKTOP_UPSTREAM_ARTIFACTS_UNSIGNED_EN_US = [
'buildhub.json', 'buildhub.json',
"target.common.tests.zip", "target.common.tests.tar.gz",
"target.cppunittest.tests.zip", "target.cppunittest.tests.tar.gz",
"target.crashreporter-symbols.zip", "target.crashreporter-symbols.zip",
"target.json", "target.json",
"target.mochitest.tests.zip", "target.mochitest.tests.tar.gz",
"target.mozinfo.json", "target.mozinfo.json",
"target.reftest.tests.zip", "target.reftest.tests.tar.gz",
"target.talos.tests.zip", "target.talos.tests.tar.gz",
"target.awsy.tests.zip", "target.awsy.tests.tar.gz",
"target.test_packages.json", "target.test_packages.json",
"target.txt", "target.txt",
"target.web-platform.tests.tar.gz", "target.web-platform.tests.tar.gz",
"target.xpcshell.tests.zip", "target.xpcshell.tests.tar.gz",
"target_info.txt", "target_info.txt",
"target.jsshell.zip", "target.jsshell.zip",
"mozharness.zip", "mozharness.zip",
@ -71,19 +71,19 @@ _DESKTOP_UPSTREAM_ARTIFACTS_SIGNED_L10N = [
# See example in bug 1348286 # See example in bug 1348286
_MOBILE_UPSTREAM_ARTIFACTS_UNSIGNED_EN_US = [ _MOBILE_UPSTREAM_ARTIFACTS_UNSIGNED_EN_US = [
"en-US/buildhub.json", "en-US/buildhub.json",
"en-US/target.common.tests.zip", "en-US/target.common.tests.tar.gz",
"en-US/target.cppunittest.tests.zip", "en-US/target.cppunittest.tests.tar.gz",
"en-US/target.crashreporter-symbols.zip", "en-US/target.crashreporter-symbols.zip",
"en-US/target.json", "en-US/target.json",
"en-US/target.mochitest.tests.zip", "en-US/target.mochitest.tests.tar.gz",
"en-US/target.mozinfo.json", "en-US/target.mozinfo.json",
"en-US/target.reftest.tests.zip", "en-US/target.reftest.tests.tar.gz",
"en-US/target.talos.tests.zip", "en-US/target.talos.tests.tar.gz",
"en-US/target.awsy.tests.zip", "en-US/target.awsy.tests.tar.gz",
"en-US/target.test_packages.json", "en-US/target.test_packages.json",
"en-US/target.txt", "en-US/target.txt",
"en-US/target.web-platform.tests.tar.gz", "en-US/target.web-platform.tests.tar.gz",
"en-US/target.xpcshell.tests.zip", "en-US/target.xpcshell.tests.tar.gz",
"en-US/target_info.txt", "en-US/target_info.txt",
"en-US/mozharness.zip", "en-US/mozharness.zip",
"en-US/robocop.apk", "en-US/robocop.apk",

View file

@ -41,19 +41,19 @@ _WINDOWS_BUILD_PLATFORMS = [
# See example in bug 1348286 # See example in bug 1348286
_DESKTOP_UPSTREAM_ARTIFACTS_UNSIGNED_EN_US = [ _DESKTOP_UPSTREAM_ARTIFACTS_UNSIGNED_EN_US = [
"buildhub.json", "buildhub.json",
"target.common.tests.zip", "target.common.tests.tar.gz",
"target.cppunittest.tests.zip", "target.cppunittest.tests.tar.gz",
"target.crashreporter-symbols.zip", "target.crashreporter-symbols.zip",
"target.json", "target.json",
"target.mochitest.tests.zip", "target.mochitest.tests.tar.gz",
"target.mozinfo.json", "target.mozinfo.json",
"target.reftest.tests.zip", "target.reftest.tests.tar.gz",
"target.talos.tests.zip", "target.talos.tests.tar.gz",
"target.awsy.tests.zip", "target.awsy.tests.tar.gz",
"target.test_packages.json", "target.test_packages.json",
"target.txt", "target.txt",
"target.web-platform.tests.tar.gz", "target.web-platform.tests.tar.gz",
"target.xpcshell.tests.zip", "target.xpcshell.tests.tar.gz",
"target_info.txt", "target_info.txt",
"target.jsshell.zip", "target.jsshell.zip",
"mozharness.zip", "mozharness.zip",

View file

@ -186,7 +186,7 @@ possibly to run the Marionette tests _without_ a local build and
with a downloaded test archive from <Taskcluster.html>. with a downloaded test archive from <Taskcluster.html>.
If you want to run tests from a downloaded test archive, you will If you want to run tests from a downloaded test archive, you will
need to download the `target.common.tests.zip` artifact attached to need to download the `target.common.tests.tar.gz` artifact attached to
Treeherder [build jobs] `B` for your system. Extract the archive Treeherder [build jobs] `B` for your system. Extract the archive
and set up the Python Marionette client and harness by executing and set up the Python Marionette client and harness by executing
the following command in a virtual environment: the following command in a virtual environment:

View file

@ -753,7 +753,7 @@ class MochitestArguments(ArgumentContainer):
options.testingModulesDir = p options.testingModulesDir = p
break break
# Paths to specialpowers and mochijar from the tests zip. # Paths to specialpowers and mochijar from the tests archive.
options.stagedAddons = [ options.stagedAddons = [
os.path.join(here, 'extensions', 'specialpowers'), os.path.join(here, 'extensions', 'specialpowers'),
os.path.join(here, 'mochijar'), os.path.join(here, 'mochijar'),

View file

@ -1,7 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public # 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 # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
"""Pytest fixtures to help set up Firefox and a tests.zip """Pytest fixtures to help set up Firefox and a tests archive
in test harness selftests. in test harness selftests.
""" """

View file

@ -89,7 +89,7 @@ class MakeUploadOutputParser(OutputParser):
# key: property name, value: condition # key: property name, value: condition
('symbolsUrl', "m.endswith('crashreporter-symbols.zip') or " ('symbolsUrl', "m.endswith('crashreporter-symbols.zip') or "
"m.endswith('crashreporter-symbols-full.zip')"), "m.endswith('crashreporter-symbols-full.zip')"),
('testsUrl', "m.endswith(('tests.tar.bz2', 'tests.zip'))"), ('testsUrl', "m.endswith(('tests.tar.bz2', 'tests.zip', 'tests.tar.gz'))"),
('robocopApkUrl', "m.endswith('apk') and 'robocop' in m"), ('robocopApkUrl', "m.endswith('apk') and 'robocop' in m"),
('jsshellUrl', "'jsshell-' in m and m.endswith('.zip')"), ('jsshellUrl', "'jsshell-' in m and m.endswith('.zip')"),
('partialMarUrl', "m.endswith('.mar') and '.partial.' in m"), ('partialMarUrl', "m.endswith('.mar') and '.partial.' in m"),

View file

@ -359,7 +359,7 @@ You can set this by specifying --test-url URL
] ]
for req_file in required_files: for req_file in required_files:
if req_file not in unpack_dirs: if req_file not in unpack_dirs:
self.info("Adding '{}' for extraction from common.tests zip file" self.info("Adding '{}' for extraction from common.tests archive"
.format(req_file)) .format(req_file))
unpack_dirs.append(req_file) unpack_dirs.append(req_file)

View file

@ -696,7 +696,7 @@ class AndroidEmulatorTest(TestingMixin, BaseScript, MozbaseMixin, CodeCoverageMi
def download_and_extract(self): def download_and_extract(self):
""" """
Download and extract fennec APK, tests.zip, host utils, and robocop (if required). Download and extract fennec APK, tests, host utils, and robocop (if required).
""" """
super(AndroidEmulatorTest, self).download_and_extract( super(AndroidEmulatorTest, self).download_and_extract(
suite_categories=self._query_suite_categories()) suite_categories=self._query_suite_categories())

View file

@ -554,7 +554,7 @@ class DesktopUnittest(TestingMixin, MercurialScript, MozbaseMixin,
def download_and_extract(self): def download_and_extract(self):
""" """
download and extract test zip / download installer download and extract test zip / download installer
optimizes which subfolders to extract from tests zip optimizes which subfolders to extract from tests archive
""" """
c = self.config c = self.config

View file

@ -113,6 +113,9 @@ stage-all: stage-cppunittests
endif endif
TEST_PKGS_ZIP := \ TEST_PKGS_ZIP := \
$(NULL)
TEST_PKGS_TARGZ := \
common \ common \
cppunittest \ cppunittest \
mochitest \ mochitest \
@ -121,9 +124,6 @@ TEST_PKGS_ZIP := \
raptor \ raptor \
awsy \ awsy \
xpcshell \ xpcshell \
$(NULL)
TEST_PKGS_TARGZ := \
web-platform \ web-platform \
$(NULL) $(NULL)

View file

@ -133,11 +133,11 @@ And on macOS with homebrew using:
brew install nss brew install nss
``` ```
On other platforms, download the firefox archive and common.tests.zip On other platforms, download the firefox archive and common.tests.tar.gz
archive for your platform from archive for your platform from
[Mozilla CI](https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/). [Mozilla CI](https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/).
Then extract `certutil[.exe]` from the tests.zip package and Then extract `certutil[.exe]` from the tests.tar.gz package and
`libnss3[.so|.dll|.dynlib]` and put the former on your path and the latter on `libnss3[.so|.dll|.dynlib]` and put the former on your path and the latter on
your library path. your library path.

View file

@ -533,7 +533,7 @@ def verifyRemoteOptions(parser, options):
elif options['objdir']: elif options['objdir']:
options['localLib'] = os.path.join(options['objdir'], 'dist/bin') options['localLib'] = os.path.join(options['objdir'], 'dist/bin')
elif os.path.isfile(os.path.join(here, '..', 'bin', 'xpcshell')): elif os.path.isfile(os.path.join(here, '..', 'bin', 'xpcshell')):
# assume tests are being run from a tests.zip # assume tests are being run from a tests archive
options['localLib'] = os.path.abspath(os.path.join(here, '..', 'bin')) options['localLib'] = os.path.abspath(os.path.join(here, '..', 'bin'))
else: else:
parser.error("Couldn't find local library dir, specify --local-lib-dir") parser.error("Couldn't find local library dir, specify --local-lib-dir")
@ -547,7 +547,7 @@ def verifyRemoteOptions(parser, options):
else: else:
parser.error("Couldn't find local binary dir, specify --local-bin-dir") parser.error("Couldn't find local binary dir, specify --local-bin-dir")
elif os.path.isfile(os.path.join(here, '..', 'bin', 'xpcshell')): elif os.path.isfile(os.path.join(here, '..', 'bin', 'xpcshell')):
# assume tests are being run from a tests.zip # assume tests are being run from a tests archive
options['localBin'] = os.path.abspath(os.path.join(here, '..', 'bin')) options['localBin'] = os.path.abspath(os.path.join(here, '..', 'bin'))
else: else:
parser.error("Couldn't find local binary dir, specify --local-bin-dir") parser.error("Couldn't find local binary dir, specify --local-bin-dir")

View file

@ -94,15 +94,15 @@ MOZSEARCH_RUST_ANALYSIS_BASENAME = $(PKG_BASENAME).mozsearch-rust
MOZHARNESS_PACKAGE = mozharness.zip MOZHARNESS_PACKAGE = mozharness.zip
# Test package naming # Test package naming
TEST_PACKAGE = $(PKG_BASENAME).common.tests.zip TEST_PACKAGE = $(PKG_BASENAME).common.tests.tar.gz
CPP_TEST_PACKAGE = $(PKG_BASENAME).cppunittest.tests.zip CPP_TEST_PACKAGE = $(PKG_BASENAME).cppunittest.tests.tar.gz
XPC_TEST_PACKAGE = $(PKG_BASENAME).xpcshell.tests.zip XPC_TEST_PACKAGE = $(PKG_BASENAME).xpcshell.tests.tar.gz
MOCHITEST_PACKAGE = $(PKG_BASENAME).mochitest.tests.zip MOCHITEST_PACKAGE = $(PKG_BASENAME).mochitest.tests.tar.gz
REFTEST_PACKAGE = $(PKG_BASENAME).reftest.tests.zip REFTEST_PACKAGE = $(PKG_BASENAME).reftest.tests.tar.gz
WP_TEST_PACKAGE = $(PKG_BASENAME).web-platform.tests.tar.gz WP_TEST_PACKAGE = $(PKG_BASENAME).web-platform.tests.tar.gz
TALOS_PACKAGE = $(PKG_BASENAME).talos.tests.zip TALOS_PACKAGE = $(PKG_BASENAME).talos.tests.tar.gz
AWSY_PACKAGE = $(PKG_BASENAME).awsy.tests.zip AWSY_PACKAGE = $(PKG_BASENAME).awsy.tests.tar.gz
GTEST_PACKAGE = $(PKG_BASENAME).gtest.tests.zip GTEST_PACKAGE = $(PKG_BASENAME).gtest.tests.tar.gz
ifneq (,$(wildcard $(DIST)/bin/application.ini)) ifneq (,$(wildcard $(DIST)/bin/application.ini))
BUILDID = $(shell $(PYTHON) $(MOZILLA_DIR)/config/printconfigsetting.py $(DIST)/bin/application.ini App BuildID) BUILDID = $(shell $(PYTHON) $(MOZILLA_DIR)/config/printconfigsetting.py $(DIST)/bin/application.ini App BuildID)