mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1208320 - Produce common tests archive via Python; r=glandium
This doesn't change I/O or copy behavior at all. But it does remove a one-off make rule.
This commit is contained in:
parent
a9fa83ee3b
commit
9c28197084
@ -11,6 +11,7 @@
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
||||
import argparse
|
||||
import itertools
|
||||
import os
|
||||
import sys
|
||||
|
||||
@ -24,6 +25,21 @@ STAGE = mozpath.join(buildconfig.topobjdir, 'dist', 'test-stage')
|
||||
|
||||
|
||||
ARCHIVE_FILES = {
|
||||
'common': [
|
||||
{
|
||||
'source': STAGE,
|
||||
'base': '',
|
||||
'pattern': '**',
|
||||
'ignore': [
|
||||
'cppunittest/**',
|
||||
'mochitest/**',
|
||||
'reftest/**',
|
||||
'talos/**',
|
||||
'web-platform/**',
|
||||
'xpcshell/**',
|
||||
],
|
||||
},
|
||||
],
|
||||
'mochitest': [
|
||||
{
|
||||
'source': buildconfig.topobjdir,
|
||||
@ -79,6 +95,21 @@ ARCHIVE_FILES = {
|
||||
}
|
||||
|
||||
|
||||
# "common" is our catch all archive and it ignores things from other archives.
|
||||
# Verify nothing sneaks into ARCHIVE_FILES without a corresponding exclusion
|
||||
# rule in the "common" archive.
|
||||
for k, v in ARCHIVE_FILES.items():
|
||||
# Skip mozharness because it isn't staged.
|
||||
if k in ('common', 'mozharness'):
|
||||
continue
|
||||
|
||||
ignores = set(itertools.chain(*(e.get('ignore', [])
|
||||
for e in ARCHIVE_FILES['common'])))
|
||||
|
||||
if not any(p.startswith('%s/' % k) for p in ignores):
|
||||
raise Exception('"common" ignore list probably should contain %s' % k)
|
||||
|
||||
|
||||
def find_files(archive):
|
||||
for entry in ARCHIVE_FILES[archive]:
|
||||
source = entry['source']
|
||||
|
@ -398,6 +398,7 @@ TEST_PKGS := \
|
||||
$(NULL)
|
||||
|
||||
PYTHON_TEST_PKGS := \
|
||||
common \
|
||||
mochitest \
|
||||
talos \
|
||||
web-platform \
|
||||
@ -437,12 +438,6 @@ package-tests-mozharness: package-tests-prepare-dest
|
||||
$(abspath $(DIST))/$(PKG_PATH)/mozharness.zip)
|
||||
package-tests: package-tests-mozharness
|
||||
|
||||
package-tests-common: stage-all package-tests-prepare-dest
|
||||
cd $(abspath $(PKG_STAGE)) && \
|
||||
zip -rq9D '$(abspath $(DIST))/$(PKG_PATH)$(TEST_PACKAGE)' \
|
||||
* -x \*/.mkdir.done \*.pyc $(foreach name,$(ALL_TEST_PKGS),$(name)\*)
|
||||
package-tests: package-tests-common
|
||||
|
||||
define package_archive
|
||||
package-tests-$(1): stage-all package-tests-prepare-dest
|
||||
rm -f '$$(DIST)/$$(PKG_PATH)$$(PKG_BASENAME).$(1).tests.zip' && \
|
||||
|
Loading…
Reference in New Issue
Block a user