tox_env.sh
author Armen Zambrano Gasparnian <armenzg@mozilla.com>
Fri, 27 Mar 2015 16:59:29 -0400
changeset 11857 05c0f42e3e6770655fb9ec7b4c5bd79fdad64042
parent 11598 222b655abc77b015f2e4f1ba450c1e75f976cf0b
child 11858 df468d1dc88d4f0612be16b6894deaa5294e29d4
permissions -rwxr-xr-x
Bug 1148528 - Add buildbot-configs test to prevent removing build builders without removing their associated testers. r=rail

#!/bin/bash -e
[ -z "${1}" ] || [ -z "${2}" ] && exit 1
TOX_INI_DIR="${1}"
TOX_WORK_DIR="${2}"

function hgme {
    repo="${1}"
    if [ ! -d "${TOX_WORK_DIR}/${repo}" ]; then
        hg clone https://hg.mozilla.org/build/${repo} "${TOX_WORK_DIR}/${repo}"
    else
        # this is equivalent to hg purge but doesn't require the hg purge plugin to be enabled
        hg status -un0 -R "${TOX_WORK_DIR}/${repo}" | xargs rm -rf
        hg pull -u -R "${TOX_WORK_DIR}/${repo}"
    fi
}

hgme tools
hgme buildbotcustom
hgme buildbot
hgme braindump

hg -R "${TOX_WORK_DIR}/buildbot" checkout production-0.8
cd "${TOX_WORK_DIR}/buildbot/master" && python setup.py install
rm -rf "${TOX_INI_DIR}/test-output"
rm -rf "${TOX_INI_DIR}/run/shm/buildbot"
mkdir -p "${TOX_INI_DIR}/run/shm/buildbot"
cd ${TOX_INI_DIR} && "${TOX_WORK_DIR}/braindump/buildbot-related/dump_allthethings.sh"