Bug 1243231 - Implement a taskcluster-based b2g hazard build, r=garndt,terrence

--HG--
extra : rebase_source : efea260753e90a021f4572fbfdef1c7989fa1146
extra : amend_source : f23583b0bf694f2404d0cc1e05b0628e671c9680
This commit is contained in:
Steve Fink 2016-02-22 17:09:02 -08:00
Родитель e97ab5fc01
Коммит 0032e886d6
7 изменённых файлов: 154 добавлений и 4 удалений

Просмотреть файл

@ -0,0 +1,13 @@
MOZ_AUTOMATION_L10N_CHECK=0
MOZ_AUTOMATION_UPLOAD_SYMBOLS=0
MOZ_AUTOMATION_UPDATE_PACKAGING=0
MOZ_AUTOMATION_SDK=0
. "$topsrcdir/browser/config/mozconfigs/linux64/nightly"
ac_add_options --enable-application=b2g/dev
ac_add_options --with-compiler-wrapper=$(cd $topsrcdir/sixgill/usr/libexec/sixgill/scripts/wrap_gcc && echo $PWD)/basecc
ac_add_options --without-ccache
ac_add_options --disable-warnings-as-errors
# Include Firefox OS fonts.
MOZTTDIR=$topsrcdir/moz-tt

Просмотреть файл

@ -1,4 +1,8 @@
#!/bin/bash -e
cd $B2G_SOURCE
exec ./build.sh -j3 MOZCONFIG_PATH=$MOZCONFIG_PATH gecko
cd $SOURCE
TOP=$(cd .. && echo $PWD)
export MOZBUILD_STATE_PATH=$TOP/mozbuild-state
[ -d $MOZBUILD_STATE_PATH ] || mkdir $MOZBUILD_STATE_PATH
exec ./mach build -v -j8

Просмотреть файл

@ -0,0 +1,69 @@
#!/bin/bash -ex
################################### build-mulet-haz-linux.sh ###################################
# Ensure all the scripts in this dir are on the path....
DIRNAME=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
PATH=$DIRNAME:$PATH
. desktop-setup.sh
# Install the sixgill tool
TOOLTOOL_MANIFEST=js/src/devtools/rootAnalysis/build/sixgill.manifest
. install-packages.sh "$GECKO_DIR"
# Build a shell to use to run the analysis
HAZARD_SHELL_OBJDIR=$MOZ_OBJDIR/obj-haz-shell
JS_SRCDIR=$GECKO_DIR/js/src
ANALYSIS_SRCDIR=$JS_SRCDIR/devtools/rootAnalysis
( cd $JS_SRCDIR; autoconf-2.13 )
mkdir -p $HAZARD_SHELL_OBJDIR || true
cd $HAZARD_SHELL_OBJDIR
export CC="$GECKO_DIR/gcc/bin/gcc"
export CXX="$GECKO_DIR/gcc/bin/g++"
$JS_SRCDIR/configure --enable-optimize --disable-debug --enable-ctypes --enable-nspr-build --without-intl-api --with-ccache
make -j4
# configure the analysis
mkdir -p $WORKSPACE/analysis || true
cd $WORKSPACE/analysis
cat > defaults.py <<EOF
js = "$HAZARD_SHELL_OBJDIR/dist/bin/js"
analysis_scriptdir = "$ANALYSIS_SRCDIR"
objdir = "$MOZ_OBJDIR"
source = "$GECKO_DIR"
sixgill = "$GECKO_DIR/sixgill/usr/libexec/sixgill"
sixgill_bin = "$GECKO_DIR/sixgill/usr/bin"
EOF
# run the analysis (includes building the tree)
python $ANALYSIS_SRCDIR/analyze.py --buildcommand=$GECKO_DIR/testing/mozharness/scripts/spidermonkey/build.b2g
### Extract artifacts
# Artifacts folder is outside of the cache.
mkdir -p $HOME/artifacts/ || true
cd $WORKSPACE/analysis
ls -lah
for f in *.txt *.lst; do
gzip -9 -c "$f" > "$HOME/artifacts/$f.gz"
done
# Check whether the user requested .xdb file upload in the top commit comment
if hg log -l1 --template '{desc}\n' | grep -q 'haz: --upload-xdbs'; then
for f in *.xdb; do
bzip2 -c "$f" > "$HOME/artifacts/$f.bz2"
done
fi
### Check for hazards
if grep 'Function.*has unrooted.*live across GC call' rootingHazards.txt; then
echo "TEST-UNEXPECTED-FAIL hazards detected" >&2
exit 1
fi
################################### script end ###################################

Просмотреть файл

@ -20,5 +20,5 @@ mkdir -p $MOZBUILD_STATE_PATH
install-packages.sh $GECKO_DIR
# Ensure object-folder exists
export MOZ_OBJDIR=$(get-objdir.py $GECKO_DIR $WORKSPACE/object-folder/)
export MOZ_OBJDIR=$WORKSPACE/object-folder/
mkdir -p $MOZ_OBJDIR

Просмотреть файл

@ -9,4 +9,4 @@ test -n "$TOOLTOOL_REV"
tc-vcs checkout $gecko_dir/tooltool $TOOLTOOL_REPO $TOOLTOOL_REPO $TOOLTOOL_REV
(cd $gecko_dir; python $gecko_dir/tooltool/tooltool.py --url https://api.pub.build.mozilla.org/tooltool/ --overwrite -m $gecko_dir/$TOOLTOOL_MANIFEST fetch -c $TOOLTOOL_CACHE)
(cd $gecko_dir; python $gecko_dir/tooltool/tooltool.py --url https://api.pub.build.mozilla.org/tooltool/ -m $gecko_dir/$TOOLTOOL_MANIFEST fetch -c $TOOLTOOL_CACHE)

Просмотреть файл

@ -17,6 +17,12 @@ builds:
types:
opt:
task: tasks/builds/b2g_emulator_x86_l_opt.yml
linux64-mulet-haz:
platforms:
- Mulet Linux
types:
debug:
task: tasks/builds/mulet_haz_linux.yml
dolphin:
platforms:
- b2g

Просмотреть файл

@ -0,0 +1,58 @@
$inherits:
from: 'tasks/builds/b2g_base.yml'
variables:
build_name: 'mulet-haz'
build_type: 'debug'
task:
metadata:
name: '[TC] Mulet Hazard Linux'
description: Mulet Hazard Analysis Linux
workerType: mulet-debug
routes:
- 'index.buildbot.branches.{{project}}.linux64-haz-mulet'
- 'index.buildbot.revisions.{{head_rev}}.{{project}}.linux64-haz-mulet'
scopes:
- 'docker-worker:cache:level-{{level}}-{{project}}-build-mulet-linux-workspace'
- 'docker-worker:cache:tooltool-cache'
- 'docker-worker:relengapi-proxy:tooltool.download.public'
payload:
cache:
level-{{level}}-{{project}}-build-mulet-haz-linux-workspace: '/home/worker/workspace'
tooltool-cache: '/home/worker/tools/tooltool-cache'
features:
relengAPIProxy: true
env:
MOZCONFIG: 'b2g/dev/config/mozconfigs/linux64/mulet-hazards'
TOOLTOOL_MANIFEST: 'b2g/dev/config/tooltool-manifests/linux64/releng.manifest'
maxRunTime: 36000
command:
- /bin/bash
- -c
- >
checkout-gecko workspace &&
cd ./workspace/gecko/testing/taskcluster/scripts/builder &&
buildbot_step 'Build' ./build-mulet-haz-linux.sh $HOME/workspace
extra:
treeherderEnv:
- production
- staging
treeherder:
groupSymbol: "tc"
symbol: "H"
machine:
platform: mulet-linux64
# Rather then enforcing particular conventions we require that all build
# tasks provide the "build" extra field to specify where the build and tests
# files are located.
locations:
build: null
tests: null