Bug 1427210: Run check-sync-dirs.py as seperate task; r?Fallen
MozReview-Commit-ID: J9uHCKlO1g2
--- a/mail/Makefile.in
+++ b/mail/Makefile.in
@@ -1,25 +1,13 @@
# 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/.
include $(moztopsrcdir)/config/config.mk
-
-ifdef ENABLE_TESTS
-
-check-sync-dirs::
- @$(PYTHON) $(commtopsrcdir)/mail/check-sync-dirs.py \
- $(commtopsrcdir)/build $(moztopsrcdir)/build
- @$(PYTHON) $(commtopsrcdir)/mail/check-sync-dirs.py \
- $(srcdir)/config/tooltool-manifests $(moztopsrcdir)/browser/config/tooltool-manifests
-
-check:: check-sync-dirs
-endif
-
include $(moztopsrcdir)/config/rules.mk
ifdef MAKENSISU
# For Windows build the uninstaller during the application build since the
# uninstaller is included with the application for mar file generation.
libs::
$(MAKE) -C installer/windows uninstaller
ifdef MOZ_MAINTENANCE_SERVICE
--- a/mail/check-sync-dirs.py
+++ b/mail/check-sync-dirs.py
@@ -104,31 +104,42 @@ def check(logger, copy, original):
logger.test_end(
test=test_name,
status='FAIL' if differences_found else 'PASS',
expected='PASS',
)
return differences_found
+def test_build(logger):
+ return check(logger, "comm/build", "build")
+
+
+def test_tooltool(logger):
+ return check(
+ logger,
+ "comm/mail/config/tooltool-manifests/", "browser/config/tooltool-manifests/",
+ )
+
+
def get_parser():
parser = argparse.ArgumentParser()
- parser.add_argument('copy')
- parser.add_argument('original')
return parser
def main():
parser = get_parser()
commandline.add_logging_group(parser)
args = parser.parse_args()
logger = commandline.setup_logging("check-sync-dirs", args, {"tbpl": sys.stdout})
+ result = False
logger.suite_start(tests=[])
- result = check(logger, args.copy, args.original)
+ result |= test_build(logger)
+ result |= test_tooltool(logger)
logger.suite_end()
return result
if __name__ == '__main__':
sys.exit(main())
--- a/taskcluster/ci/source-test/kind.yml
+++ b/taskcluster/ci/source-test/kind.yml
@@ -7,8 +7,9 @@ loader: taskgraph.loader.transform:loade
transforms:
- taskgraph.transforms.try_job:transforms
- taskgraph.transforms.source_test:transforms
- taskgraph.transforms.job:transforms
- taskgraph.transforms.task:transforms
jobs-from:
- mozlint.yml
+ - python.yml
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/source-test/python.yml
@@ -0,0 +1,41 @@
+job-defaults:
+ platform: linux64/opt
+ always-target: true
+ worker-type:
+ by-platform:
+ linux64.*: aws-provisioner-v1/gecko-t-linux-xlarge
+ treeherder:
+ kind: test
+ tier: 1
+ run:
+ using: mach
+ comm-checkout: true
+ when:
+ files-changed:
+ - 'config/mozunit.py'
+ - 'python/mach_commands.py'
+
+check-sync:
+ description: check-sync
+ treeherder:
+ symbol: check-sync
+ worker:
+ docker-image: {in-tree: 'lint'}
+ max-run-time: 1800
+ artifacts:
+ - type: directory
+ name: 'public/logs/'
+ path: '/builds/worker/artifacts'
+ run:
+ mach: >
+ python comm/mail/check-sync-dirs.py
+ --log-tbpl -
+ --log-raw /builds/worker/artifacts/log_raw.log
+ --log-errorsummary /builds/worker/artifacts/log_errorsummary.log
+ when:
+ files-changed:
+ - 'comm/build/**'
+ - 'build/**'
+ - 'comm/mail/config/tooltool-manifests/**'
+ - 'browser/config/tooltool-manifests/**'
+ - 'comm/mail/check-sync-dirs.py'