reviewboard
author Gregory Szorc <gps@mozilla.com>
Sat, 24 Jan 2015 19:42:03 -0800
changeset 360256 17f4091a1f7b876e4d3a4f50ef06e3886ba80e03
parent 359827 4c4cbd58691a6f1d615c62f2bb2f23cac32266c2
child 360276 7db4622ae530570abaf69b6ce2ffc6b08bdaa3d8
permissions -rwxr-xr-x
testing: prevent double virtualenv activation The bootstrap code was potentially activating a virtualenv on top of itself. This results in the virtualenv's bin directory always being first in PATH. This threw off hg binary detection when running under --with-hg. Prevent double virtualenv activation.

#!/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):
    sys.path.insert(0, os.path.join(HERE, 'testing'))

    from mach.main import Mach

    m = Mach(os.getcwd())
    m.define_category('reviewboard', 'Review Board',
        'Interface with Review Board', 50)
    import vcttesting.reviewboard.mach_commands

    return m.run(args)

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