Bug 917999 - Part 3.1 - Prepare taskcluster for a split test package.;r=jlal

This commit is contained in:
Chris Manchester 2015-06-29 11:16:51 -07:00
parent 060b38720a
commit 959882de28
23 changed files with 67 additions and 28 deletions

View File

@ -37,6 +37,9 @@ def parse_args():
parser.add_argument("--jsshell", required=True,
action="store", dest="jsshell",
help="Name of the jsshell zip.")
parser.add_argument("--use-short-names", action="store_true",
help="Use short names for packages (target.$name.tests.zip "
"instead of $(PACKAGE_BASENAME).$name.tests.zip)")
for harness in PACKAGE_SPECIFIED_HARNESSES:
parser.add_argument("--%s" % harness, required=True,
action="store", dest=harness,
@ -54,12 +57,18 @@ def generate_package_data(args):
# which will be an optimization once parts of the main zip are split to harness
# specific zips.
tests_common = args.tests_common
if args.use_short_names:
tests_common = 'target.common.tests.zip'
jsshell = args.jsshell
harness_requirements = dict([(k, [tests_common]) for k in ALL_HARNESSES])
harness_requirements['jittest'].append(jsshell)
for harness in PACKAGE_SPECIFIED_HARNESSES:
harness_requirements[harness].append(getattr(args, harness))
pkg_name = getattr(args, harness)
if args.use_short_names:
pkg_name = 'target.%s.tests.zip' % harness
harness_requirements[harness].append(pkg_name)
return harness_requirements
if __name__ == '__main__':

View File

@ -87,7 +87,7 @@ task:
# need to provide an easy way to lookup the correct aritfact path.
locations:
build: 'public/name_i_made_up.tar.gz'
tests: 'public/some_tests.zip'
tests: 'public/some_tests.zip' or test_packages: 'public/test_packages.json'
```
#### Templates properties

View File

@ -280,10 +280,19 @@ class Graph(object):
taskcluster_graph.build_task.validate(build_task)
graph['tasks'].append(build_task)
tests_url = ARTIFACT_URL.format(
build_parameters['build_slugid'],
build_task['task']['extra']['locations']['tests']
)
test_packages_url, tests_url = None, None
if 'test_packages' in build_task['task']['extra']['locations']:
test_packages_url = ARTIFACT_URL.format(
build_parameters['build_slugid'],
build_task['task']['extra']['locations']['test_packages']
)
if 'tests' in build_task['task']['extra']['locations']:
tests_url = ARTIFACT_URL.format(
build_parameters['build_slugid'],
build_task['task']['extra']['locations']['tests']
)
build_url = ARTIFACT_URL.format(
build_parameters['build_slugid'],
@ -327,7 +336,10 @@ class Graph(object):
test_parameters = copy.copy(build_parameters)
test_parameters['build_url'] = build_url
test_parameters['img_url'] = img_url
test_parameters['tests_url'] = tests_url
if tests_url:
test_parameters['tests_url'] = tests_url
if test_packages_url:
test_parameters['test_packages_url'] = test_packages_url
test_definition = templates.load(test['task'], {})['task']
chunk_config = test_definition['extra']['chunks']

View File

@ -27,7 +27,7 @@ cd $MOZ_OBJDIR/dist
ls -lah $MOZ_OBJDIR/dist/
# Target names are cached so make sure we discard them first if found.
rm -f target.linux-x86_64.tar.bz2 target.linux-x86_64.json target.tests.zip
rm -f target.linux-x86_64.tar.bz2 target.linux-x86_64.json target*.tests.zip
# Artifacts folder is outside of the cache.
mkdir -p $HOME/artifacts/
@ -36,7 +36,10 @@ mkdir -p $HOME/artifacts/
# the right filename in the task payload where artifacts are declared
mv *.linux-x86_64.tar.bz2 $HOME/artifacts/target.linux-x86_64.tar.bz2
mv *.linux-x86_64.json $HOME/artifacts/target.linux-x86_64.json
mv *.tests.zip $HOME/artifacts/target.tests.zip
for name in common cppunittest reftest mochitest xpcshell web-platform; do
mv *.$name.tests.zip $HOME/artifacts/target.$name.tests.zip ;
done
mv test_packages_tc.json $HOME/artifacts/test_packages.json
mv *.crashreporter-symbols.zip $HOME/artifacts/target.crashreporter-symbols.zip
# If the simulator does not exist don't fail

View File

@ -58,7 +58,7 @@ ls -lah $WORKSPACE/B2G/objdir-gecko/dist/
mv $WORKSPACE/B2G/sources.xml $HOME/artifacts/sources.xml
mv $WORKSPACE/B2G/out/target/product/generic_x86/tests/gaia-tests.zip $HOME/artifacts/gaia-tests.zip
mv $WORKSPACE/B2G/out/target/product/generic_x86/tests/b2g-*tests.zip $HOME/artifacts/b2g-tests.zip
mv $WORKSPACE/B2G/out/target/product/generic_x86/tests/b2g-*.zip $HOME/artifacts
mv $WORKSPACE/B2G/out/emulator.tar.gz $HOME/artifacts/emulator.tar.gz
mv $WORKSPACE/B2G/objdir-gecko/dist/b2g-*.crashreporter-symbols.zip $HOME/artifacts/b2g-crashreporter-symbols.zip

View File

@ -64,7 +64,7 @@ ls -lah $WORKSPACE/B2G/objdir-gecko/dist/
mv $WORKSPACE/B2G/sources.xml $HOME/artifacts/sources.xml
mv $WORKSPACE/B2G/out/target/product/generic/tests/gaia-tests.zip $HOME/artifacts/gaia-tests.zip
mv $WORKSPACE/B2G/out/target/product/generic/tests/b2g-*tests.zip $HOME/artifacts/b2g-tests.zip
mv $WORKSPACE/B2G/out/target/product/generic/tests/b2g-*.zip $HOME/artifacts
mv $WORKSPACE/B2G/out/emulator.tar.gz $HOME/artifacts/emulator.tar.gz
mv $WORKSPACE/B2G/objdir-gecko/dist/b2g-*.crashreporter-symbols.zip $HOME/artifacts/b2g-crashreporter-symbols.zip

View File

@ -21,7 +21,7 @@ cd $MOZ_OBJDIR/dist;
ls -lah $MOZ_OBJDIR/dist/
# Target names are cached so make sure we discard them first if found.
rm -f target.linux-x86_64.tar.bz2 target.linux-x86_64.json target.tests.zip
rm -f target.linux-x86_64.tar.bz2 target.linux-x86_64.json target*.tests.zip
# Artifacts folder is outside of the cache.
mkdir -p $HOME/artifacts/
@ -30,7 +30,10 @@ mkdir -p $HOME/artifacts/
# the right filename in the task payload where artifacts are declared
mv *.linux-x86_64.tar.bz2 $HOME/artifacts/target.linux-x86_64.tar.bz2
mv *.linux-x86_64.json $HOME/artifacts/target.linux-x86_64.json
mv *.tests.zip $HOME/artifacts/target.tests.zip
for name in common cppunittest reftest mochitest xpcshell web-platform; do
mv *.$name.tests.zip $HOME/artifacts/target.$name.tests.zip ;
done
mv test_packages_tc.json $HOME/artifacts/test_packages.json
mv *.crashreporter-symbols.zip $HOME/artifacts/target.crashreporter-symbols.zip
mv jsshell-linux-x86_64.zip $HOME/artifacts/jsshell-linux-x86_64.zip

View File

@ -29,5 +29,6 @@ def validate(task):
if 'build' not in locations:
raise BuildTaskValidationException('task.extra.locations.build missing')
if 'tests' not in locations:
raise BuildTaskValidationException('task.extra.locations.tests missing')
if 'tests' not in locations and 'test_packages' not in locations:
raise BuildTaskValidationException('task.extra.locations.tests or '
'task.extra.locations.tests_packages missing')

View File

@ -35,4 +35,4 @@ task:
# files are located.
locations:
build: 'public/build/target.linux-x86_64.tar.bz2'
tests: 'public/build/target.tests.zip'
test_packages: 'public/build/test_packages.json'

View File

@ -50,4 +50,4 @@ task:
# files are located.
locations:
build: 'public/build/target.linux-x86_64.tar.bz2'
tests: 'public/build/target.tests.zip'
test_packages: 'public/build/test_packages.json'

View File

@ -18,7 +18,7 @@ task:
--config-file ./mozharness_configs/remove_executables.py
--installer-url {{build_url}}
--no-pull
--test-url {{tests_url}}
--test-packages-url {{test_packages_url}}
--download-symbols ondemand
--gaia-repo https://hg.mozilla.org/integration/gaia-central
--gaia-dir /home/worker

View File

@ -20,7 +20,7 @@ task:
--no-pull
--download-symbols ondemand
--installer-url {{build_url}}
--test-url {{tests_url}}
--test-packages-url {{test_packages_url}}
--gaia-repo https://hg.mozilla.org/integration/gaia-central
--gaia-dir /home/worker
artifacts:

View File

@ -19,7 +19,7 @@ task:
--config-file ./mozharness_configs/remove_executables.py
--no-pull
--installer-url {{build_url}}
--test-url {{tests_url}}
--test-packages-url {{test_packages_url}}
--download-symbols ondemand
--total-chunk {{total_chunks}}
--this-chunk {{chunk}}

View File

@ -19,7 +19,7 @@ task:
--config-file ./mozharness_configs/remove_executables.py
--no-pull
--installer-url {{build_url}}
--test-url {{tests_url}}
--test-packages-url {{test_packages_url}}
--download-symbols ondemand
--gip-suite accessibility
--gaia-repo https://hg.mozilla.org/integration/gaia-central

View File

@ -19,7 +19,7 @@ task:
--config-file ./mozharness_configs/remove_executables.py
--no-pull
--installer-url {{build_url}}
--test-url {{tests_url}}
--test-packages-url {{test_packages_url}}
--download-symbols ondemand
--gip-suite functional
--total-chunk {{total_chunks}}

View File

@ -19,7 +19,7 @@ task:
--config-file ./mozharness_configs/remove_executables.py
--installer-url {{build_url}}
--no-pull
--test-url {{tests_url}}
--test-packages-url {{test_packages_url}}
--download-symbols ondemand
--gip-suite unit
--gaia-repo https://hg.mozilla.org/integration/gaia-central

View File

@ -20,7 +20,7 @@ task:
--download-symbols ondemand
--no-pull
--installer-url {{build_url}}
--test-url {{tests_url}}
--test-packages-url {{test_packages_url}}
--gaia-repo https://hg.mozilla.org/integration/gaia-central
--gaia-dir /home/worker
--xre-url https://queue.taskcluster.net/v1/task/wXAHAaxDQpqxoWF1iljJjg/runs/0/artifacts/public/cache/xulrunner-sdk-40.zip

View File

@ -20,7 +20,7 @@ task:
--no-pull
--app-arg -oop
--installer-url {{build_url}}
--test-url {{tests_url}}
--test-packages-url {{test_packages_url}}
--download-symbols ondemand
--gaia-repo https://hg.mozilla.org/integration/gaia-central
--gaia-dir /home/worker

View File

@ -18,7 +18,7 @@ task:
--download-symbols ondemand
--no-pull
--installer-url {{build_url}}
--test-url {{tests_url}}
--test-packages-url {{test_packages_url}}
--gaia-repo https://hg.mozilla.org/integration/gaia-central
--gaia-dir /home/worker
artifacts:

View File

@ -14,7 +14,7 @@ task:
--config-file ./mozharness/configs/unittests/linux_unittest.py
--config-file ./mozharness_configs/remove_executables.py
--installer-url {{build_url}}
--test-url {{tests_url}}
--test-packages-url {{test_packages_url}}
--download-symbols ondemand
--mochitest-suite plain-chunked
--total-chunk={{total_chunks}}

View File

@ -19,7 +19,7 @@ task:
--config-file ./mozharness_configs/remove_executables.py
--no-pull
--installer-url {{build_url}}
--test-url {{tests_url}}
--test-packages-url {{test_packages_url}}
--download-symbols ondemand
--test-suite reftest
--test-manifest tests/layout/reftests/reftest.list

View File

@ -407,6 +407,7 @@ package-tests: \
stage-web-platform-tests \
stage-luciddream \
test-packages-manifest \
test-packages-manifest-tc \
$(NULL)
ifdef MOZ_WEBRTC
package-tests: stage-steeplechase
@ -426,6 +427,14 @@ TEST_PKGS := \
PKG_ARG = --$(1) $(PKG_BASENAME).$(1).tests.zip
test-packages-manifest-tc:
$(PYTHON) $(topsrcdir)/build/gen_test_packages_manifest.py \
--jsshell $(JSSHELL_NAME) \
--dest-file $(MOZ_TEST_PACKAGES_FILE_TC) \
--use-short-names \
$(call PKG_ARG,common) \
$(foreach pkg,$(TEST_PKGS),$(call PKG_ARG,$(pkg)))
test-packages-manifest:
@rm -f $(MOZ_TEST_PACKAGES_FILE)
$(PYTHON) $(topsrcdir)/build/gen_test_packages_manifest.py \
@ -625,5 +634,6 @@ stage-instrumentation-tests: make-stage-dir
stage-instrumentation-tests \
stage-luciddream \
test-packages-manifest \
test-packages-manifest-tc \
$(NULL)

View File

@ -161,6 +161,7 @@ MOZ_SOURCESTAMP_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME).txt
MOZ_BUILDINFO_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME).json
MOZ_MOZINFO_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME).mozinfo.json
MOZ_TEST_PACKAGES_FILE = $(DIST)/$(PKG_PATH)/test_packages.json
MOZ_TEST_PACKAGES_FILE_TC = $(DIST)/$(PKG_PATH)/test_packages_tc.json
# JavaScript Shell
JSSHELL_NAME = jsshell-$(MOZ_PKG_PLATFORM).zip