Commit 842e7c17 authored by Steve Fink's avatar Steve Fink
Browse files

Bug 1250709 - Clobber builds, r=terrence

--HG--
extra : rebase_source : c0eaa726c093d35de253df29ca60c13366ccab31
parent 029f79cc
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -106,6 +106,10 @@ JOBS = { 'dbs':
               '.'),
              ()),

         'list-dbs':
             (('ls', '-l'),
              ()),

         'callgraph':
             (('%(js)s', '%(analysis_scriptdir)s/computeCallgraph.js'),
              'callgraph.txt'),
+23 −1
Original line number Diff line number Diff line
@@ -16,8 +16,19 @@ fi
export CC="$GECKO_DIR/gcc/bin/gcc"
export CXX="$GECKO_DIR/gcc/bin/g++"

function check_commit_msg () {
    hg --cwd "$GECKO_DIR" log -r. --template '{desc}\n' | grep -q -- "$1"
}

if check_commit_msg "--dep"; then
    HAZ_DEP=1
fi

function build_js_shell () {
    ( cd $JS_SRCDIR; autoconf-2.13 )
    if [[ -z "$HAZ_DEP" ]]; then
        [ -d $HAZARD_SHELL_OBJDIR ] && rm -rf $HAZARD_SHELL_OBJDIR
    fi
    mkdir -p $HAZARD_SHELL_OBJDIR || true
    cd $HAZARD_SHELL_OBJDIR
    $JS_SRCDIR/configure --enable-optimize --disable-debug --enable-ctypes --enable-nspr-build --without-intl-api --with-ccache
@@ -28,6 +39,10 @@ function configure_analysis () {
    local analysis_dir
    analysis_dir="$1"

    if [[ -z "$HAZ_DEP" ]]; then
        [ -d "$analysis_dir" ] && rm -rf "$analysis_dir"
    fi

    mkdir -p "$analysis_dir" || true
    (
        cd "$analysis_dir"
@@ -48,6 +63,10 @@ function run_analysis () {
    local build_type
    build_type="$2"

    if [[ -z "$HAZ_DEP" ]]; then
        [ -d $MOZ_OBJDIR ] && rm -rf $MOZ_OBJDIR
    fi

    (
        cd "$analysis_dir"
        $PYTHON "$ANALYSIS_SRCDIR/analyze.py" --buildcommand="$GECKO_DIR/testing/mozharness/scripts/spidermonkey/build.${build_type}"
@@ -72,8 +91,11 @@ function grab_artifacts () {
        done

        # Check whether the user requested .xdb file upload in the top commit comment
        if check_commit_msg "--upload-xdbs"; then
            HAZ_UPLOAD_XDBS=1
        fi

        if hg --cwd "$GECKO_DIR" log -l1 --template '{desc}\n' | grep -q -- '--upload-xdbs'; then
        if [ -n "$HAZ_UPLOAD_XDBS" ]; then
            for f in *.xdb; do
                bzip2 -c "$f" > "${artifacts}/$f.bz2"
            done