Bug 1277413: add a task to run taskgraph unit tests; r=Callek
authorDustin J. Mitchell <dustin@mozilla.com>
Mon, 13 Jun 2016 03:37:23 +0100
changeset 342245 7599603d0edf2aac6f2ac6b52bd7f2e77f283098
parent 342244 b3acfc1fa613c6febd943a0875fcc22f406e4b88
child 342246 64e87814ba7e01a2897169fb2f42d8f4882614d8
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCallek
bugs1277413
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1277413: add a task to run taskgraph unit tests; r=Callek MozReview-Commit-ID: n8122F3ocx
taskcluster/ci/legacy/tasks/branches/base_jobs.yml
taskcluster/ci/legacy/tasks/tests/taskgraph-tests.yml
taskcluster/mach_commands.py
--- a/taskcluster/ci/legacy/tasks/branches/base_jobs.yml
+++ b/taskcluster/ci/legacy/tasks/branches/base_jobs.yml
@@ -540,16 +540,24 @@ tasks:
     root: true
     when:
       file_patterns:
         - '**/*.py'
         - '**/.flake8'
         - 'python/mozlint/**'
         - 'tools/lint/**'
         - 'testing/docker/lint/**'
+  taskgraph-tests:
+    task: tasks/tests/taskgraph-tests.yml
+    root: true
+    when:
+      file_patterns:
+        - 'taskcluster/**.py'
+        - 'config/mozunit.py'
+        - 'python/mach/**.py'
   android-api-15-gradle-dependencies:
     task: tasks/builds/android_api_15_gradle_dependencies.yml
     root: true
     when:
       file_patterns:
         - 'mobile/android/config/**'
         - 'testing/docker/android-gradle-build/**'
         - 'testing/mozharness/configs/builds/releng_sub_android_configs/*gradle_dependencies.py'
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/legacy/tasks/tests/taskgraph-tests.yml
@@ -0,0 +1,39 @@
+---
+$inherits:
+  from: 'tasks/lint.yml'
+  variables:
+    build_product: 'lint'
+    build_name: 'taskgraph-tests'
+    build_type: 'opt'
+
+docker-image: lint
+task:
+  metadata:
+    name: '[TC] - Taskgraph Tests'
+    description: 'Run test suite for taskcluster/taskgraph'
+  payload:
+    image:
+      type: 'task-image'
+      path: 'public/image.tar'
+      taskId:
+        task-reference: "<docker-image>"
+    command:
+      - bash
+      - -cx
+      - >
+          tc-vcs checkout ./gecko {{base_repository}} {{head_repository}} {{head_rev}} {{head_ref}} &&
+          cd gecko &&
+          ./mach taskgraph python-tests
+  extra:
+    locations:
+      build: null
+      tests: null
+    treeherder:
+      machine:
+        # this should probably get a fresh new platform, but linux64 is what, for example, marionette uses
+        platform: linux64
+      symbol: tg
+      tier: 2
+    treeherderEnv:
+      - production
+      - staging
--- a/taskcluster/mach_commands.py
+++ b/taskcluster/mach_commands.py
@@ -69,17 +69,17 @@ class MachCommands(MachCommandBase):
     @SubCommand('taskgraph', 'python-tests',
                 description='Run the taskgraph unit tests')
     def taskgraph_python_tests(self, **options):
         import unittest
         import mozunit
         suite = unittest.defaultTestLoader.discover('taskgraph.test')
         runner = mozunit.MozTestRunner(verbosity=2)
         result = runner.run(suite)
-        if not result.wasSuccessful:
+        if not result.wasSuccessful():
             sys.exit(1)
 
     @ShowTaskGraphSubCommand('taskgraph', 'tasks',
                          description="Show all tasks in the taskgraph")
     def taskgraph_tasks(self, **options):
         return self.show_taskgraph('full_task_set', options)
 
     @ShowTaskGraphSubCommand('taskgraph', 'full',