mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-11 13:48:23 +02:00
Bug 1479672 - Remove need to set GECKO_DIR when running build-haz-linux.sh, and fix shell lint warnings, r=jonco
--HG-- extra : rebase_source : 6febe5d20e6ee20e58e987616d20c623c64b6e3c
This commit is contained in:
parent
5c8fc14131
commit
1257659212
1 changed files with 14 additions and 10 deletions
|
|
@ -27,7 +27,7 @@ while [[ $# -gt 0 ]]; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
SCRIPT_FLAGS="$@"
|
SCRIPT_FLAGS=$*
|
||||||
|
|
||||||
# Ensure all the scripts in this dir are on the path....
|
# Ensure all the scripts in this dir are on the path....
|
||||||
DIRNAME=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
DIRNAME=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||||
|
|
@ -36,14 +36,14 @@ PATH=$DIRNAME:$PATH
|
||||||
# Use GECKO_BASE_REPOSITORY as a signal for whether we are running in automation.
|
# Use GECKO_BASE_REPOSITORY as a signal for whether we are running in automation.
|
||||||
export AUTOMATION=${GECKO_BASE_REPOSITORY:+1}
|
export AUTOMATION=${GECKO_BASE_REPOSITORY:+1}
|
||||||
|
|
||||||
: ${GECKO_DIR:=$WORKSPACE/gecko}
|
: "${GECKO_DIR:="$DIRNAME"/../../..}"
|
||||||
: ${TOOLTOOL_CACHE:=$WORKSPACE/tt-cache}
|
: "${TOOLTOOL_CACHE:=$WORKSPACE/tt-cache}"
|
||||||
|
|
||||||
if ! [ -d $GECKO_DIR ]; then
|
if ! [ -d "$GECKO_DIR" ]; then
|
||||||
echo "GECKO_DIR must be set to a directory containing a gecko source checkout" >&2
|
echo "GECKO_DIR must be set to a directory containing a gecko source checkout" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
GECKO_DIR=$( cd "$GECKO_DIR" && pwd )
|
GECKO_DIR="$( cd "$GECKO_DIR" && pwd )"
|
||||||
|
|
||||||
# Directory to populate with tooltool-installed tools
|
# Directory to populate with tooltool-installed tools
|
||||||
export TOOLTOOL_DIR="$WORKSPACE"
|
export TOOLTOOL_DIR="$WORKSPACE"
|
||||||
|
|
@ -52,9 +52,13 @@ export TOOLTOOL_DIR="$WORKSPACE"
|
||||||
export MOZ_OBJDIR="$WORKSPACE/obj-analyzed"
|
export MOZ_OBJDIR="$WORKSPACE/obj-analyzed"
|
||||||
mkdir -p "$MOZ_OBJDIR"
|
mkdir -p "$MOZ_OBJDIR"
|
||||||
|
|
||||||
if [ -n "$DO_TOOLTOOL" ]; then
|
if [ -n "$DO_TOOLTOOL" ]; then (
|
||||||
( cd $TOOLTOOL_DIR; $GECKO_DIR/mach artifact toolchain -v${TOOLTOOL_MANIFEST:+ --tooltool-url https://tooltool.mozilla-releng.net/ --tooltool-manifest $GECKO_DIR/$TOOLTOOL_MANIFEST} --cache-dir $TOOLTOOL_CACHE${MOZ_TOOLCHAINS:+ ${MOZ_TOOLCHAINS}} )
|
cd "$TOOLTOOL_DIR"
|
||||||
fi
|
"$GECKO_DIR"/mach artifact toolchain -v\
|
||||||
|
${TOOLTOOL_MANIFEST:+ --tooltool-url https://tooltool.mozilla-releng.net/ \
|
||||||
|
--tooltool-manifest "$GECKO_DIR/$TOOLTOOL_MANIFEST"} \
|
||||||
|
--cache-dir "$TOOLTOOL_CACHE"${MOZ_TOOLCHAINS:+ ${MOZ_TOOLCHAINS}}
|
||||||
|
) fi
|
||||||
|
|
||||||
export NO_MERCURIAL_SETUP_CHECK=1
|
export NO_MERCURIAL_SETUP_CHECK=1
|
||||||
|
|
||||||
|
|
@ -64,14 +68,14 @@ if [[ "$PROJECT" = "browser" ]]; then (
|
||||||
# Mozbuild config:
|
# Mozbuild config:
|
||||||
export MOZBUILD_STATE_PATH=$WORKSPACE/mozbuild/
|
export MOZBUILD_STATE_PATH=$WORKSPACE/mozbuild/
|
||||||
# Create .mozbuild so mach doesn't complain about this
|
# Create .mozbuild so mach doesn't complain about this
|
||||||
mkdir -p $MOZBUILD_STATE_PATH
|
mkdir -p "$MOZBUILD_STATE_PATH"
|
||||||
) fi
|
) fi
|
||||||
. hazard-analysis.sh
|
. hazard-analysis.sh
|
||||||
|
|
||||||
build_js_shell
|
build_js_shell
|
||||||
|
|
||||||
# Artifacts folder is outside of the cache.
|
# Artifacts folder is outside of the cache.
|
||||||
mkdir -p $HOME/artifacts/ || true
|
mkdir -p "$HOME"/artifacts/ || true
|
||||||
|
|
||||||
function onexit () {
|
function onexit () {
|
||||||
grab_artifacts "$WORKSPACE/analysis" "$HOME/artifacts"
|
grab_artifacts "$WORKSPACE/analysis" "$HOME/artifacts"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue