Bug 1438250 - Make mozunit pip installable; r?ahal draft
authorDave Hunt <dhunt@mozilla.com>
Thu, 29 Mar 2018 14:18:00 +0100
changeset 774746 973bc222521798b963eae5da6a5d579c986208a1
parent 773797 a456475502b80a1264642d9eaee9394a8fad8315
push id104489
push userbmo:dave.hunt@gmail.com
push dateThu, 29 Mar 2018 13:53:53 +0000
reviewersahal
bugs1438250
milestone61.0a1
Bug 1438250 - Make mozunit pip installable; r?ahal MozReview-Commit-ID: BT4ciGT82bp
build/virtualenv_packages.txt
config/moz.build
config/mozunit.py
config/mozunit/mozunit/__init__.py
config/mozunit/mozunit/mozunit.py
config/mozunit/setup.py
taskcluster/ci/source-test/python.yml
tools/lint/flake8.yml
--- a/build/virtualenv_packages.txt
+++ b/build/virtualenv_packages.txt
@@ -29,16 +29,17 @@ mozilla.pth:third_party/python/pytoml
 mozilla.pth:third_party/python/redo
 mozilla.pth:third_party/python/six
 mozilla.pth:third_party/python/voluptuous
 mozilla.pth:third_party/python/json-e
 mozilla.pth:build
 objdir:build
 mozilla.pth:build/pymake
 mozilla.pth:config
+mozilla.pth:config/mozunit
 mozilla.pth:dom/bindings
 mozilla.pth:dom/bindings/parser
 mozilla.pth:layout/tools/reftest
 mozilla.pth:other-licenses/ply/
 mozilla.pth:taskcluster
 mozilla.pth:testing
 mozilla.pth:testing/firefox-ui/harness
 mozilla.pth:testing/marionette/client
--- a/config/moz.build
+++ b/config/moz.build
@@ -2,17 +2,17 @@
 # vim: set filetype=python:
 # 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/.
 
 with Files('**'):
     BUG_COMPONENT = ('Firefox Build System', 'General')
 
-with Files('mozunit.py'):
+with Files('mozunit/**'):
     BUG_COMPONENT = ('Testing', 'Python Test')
 
 DIST_INSTALL = False
 # For sanity's sake, we compile nsinstall without the wrapped system
 # headers, so that we can use it to set up the wrapped system headers.
 NoVisibilityFlags()
 
 CONFIGURE_SUBST_FILES += [
new file mode 100644
--- /dev/null
+++ b/config/mozunit/mozunit/__init__.py
@@ -0,0 +1,8 @@
+# flake8: noqa
+# 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/.
+
+from __future__ import absolute_import
+
+from .mozunit import *
rename from config/mozunit.py
rename to config/mozunit/mozunit/mozunit.py
new file mode 100644
--- /dev/null
+++ b/config/mozunit/setup.py
@@ -0,0 +1,19 @@
+# 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/.
+
+from __future__ import absolute_import
+
+from setuptools import setup
+
+setup(name='mozunit',
+      version='1.0',
+      description="Make unit tests report the way Mozilla infrastructure expects",
+      classifiers=['Programming Language :: Python :: 2.7'],
+      keywords='mozilla',
+      author='Mozilla Automation and Tools team',
+      author_email='tools@lists.mozilla.org',
+      license='MPL',
+      packages=['mozunit'],
+      include_package_data=True,
+      zip_safe=False)
--- a/taskcluster/ci/source-test/python.yml
+++ b/taskcluster/ci/source-test/python.yml
@@ -11,17 +11,17 @@ job-defaults:
                 max-run-time: 3600
     treeherder:
         kind: test
         tier: 2
     run:
         using: mach
     when:
         files-changed:
-            - 'config/mozunit.py'
+            - 'config/mozunit/**'
             - 'python/mach_commands.py'
 
 taskgraph-tests:
     description: taskcluster/taskgraph unit tests
     treeherder:
         symbol: py(tg)
     run:
         mach: python-test --subsuite taskgraph
--- a/tools/lint/flake8.yml
+++ b/tools/lint/flake8.yml
@@ -1,16 +1,16 @@
 ---
 flake8:
     description: Python linter
     include:
         - build/*.py
         - build/moz.configure/*.configure
         - config/check_macroassembler_style.py
-        - config/mozunit.py
+        - config/mozunit
         - configure.py
         - layout/tools/reftest
         - python/mach
         - python/mach_commands.py
         - python/mozboot
         - python/mozbuild/mozpack/path.py
         - python/mozlint
         - python/mozterm