run-profileserver.sh (955B)
1 #! /bin/bash -vex 2 3 set -x -e 4 5 echo "running as" $(id) 6 7 : NEED_XVFB ${NEED_XVFB:=false} 8 : UPLOAD_PATH ${UPLOAD_PATH:=$HOME/artifacts} 9 export UPLOAD_PATH 10 11 #### 12 # Taskcluster friendly wrapper for running the profileserver 13 #### 14 15 PGO_RUNDIR=obj-firefox/dist 16 export JARLOG_FILE="en-US.log" 17 export LLVM_PROFDATA=$MOZ_FETCHES_DIR/clang/bin/llvm-profdata 18 19 set -v 20 21 if $NEED_XVFB; then 22 # run XVfb in the background 23 . /builds/worker/scripts/xvfb.sh 24 25 cleanup() { 26 local rv=$? 27 cleanup_xvfb 28 exit $rv 29 } 30 trap cleanup EXIT INT 31 32 start_xvfb '1024x768x24' 2 33 fi 34 35 # Move our fetched firefox into objdir/dist so the jarlog entries will match 36 # the paths when the final PGO stage packages the build. 37 mkdir -p $PGO_RUNDIR 38 mkdir -p $UPLOAD_PATH 39 mv $MOZ_FETCHES_DIR/firefox $PGO_RUNDIR 40 ./mach python build/pgo/profileserver.py --binary $PGO_RUNDIR/firefox/firefox 41 42 tar -acvf $UPLOAD_PATH/profdata.tar.xz merged.profdata en-US.log