ottoland
author Gregory Szorc <gps@mozilla.com>
Tue, 12 Jan 2016 15:07:29 -0800
changeset 362099 64bc74f4b91a7730c7d03c4fcbe9f4a723813a75
parent 360484 3b8a10644a71ffe21fc02b21c1baaab7c1bd2b56
permissions -rwxr-xr-x
mozreview: copy more read-only processing code (bug 1229468); r=smacleod, dminor This is basically copying a lot of code from pushhooks.py. We don't yet make any database modification as part of this code. This just proves that a rough 1:1 copy continues to work.

#!/usr/bin/env 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/.

import os
import sys

HERE = os.path.abspath(os.path.dirname(__file__))

def main(args):
    if 'VIRTUAL_ENV' not in os.environ:
        activate = os.path.join(HERE, 'venv', 'bin', 'activate_this.py')
        execfile(activate, dict(__file__=activate))
        sys.executable = os.path.join(HERE, 'venv', 'bin', 'python')

    from mach.main import Mach

    m = Mach(os.getcwd())

    m.define_category('autoland', 'Autoland',
        'Control and interact with Autoland', 50)
    import vcttesting.autoland_mach_commands

    return m.run(args)

if __name__ == '__main__':
    sys.exit(main(sys.argv[1:]))