fune/taskcluster/scripts/builder/build-sm-package.sh
Gregory Szorc a83c0b81cd Bug 1377216 - Unset MOZ_AUTOMATION when building SpiderMonkey from package; r=glandium
We're about to make MOZ_AUTOMATION more strict about things like having
a source checkout.

The whole point of build-sm-package.sh is to verify that SpiderMonkey
can be built outside of Mozilla's source repo and automation from a
standalone package. Since the presence of MOZ_AUTOMATION can influence
so much behavior in the build system, unset it so that the job
tests a !Mozilla environment more accurately.

MozReview-Commit-ID: EMfyLKfY0uU

--HG--
extra : rebase_source : 3632a9abf9fac3f916ed9043f30d4b6aa4abb390
2017-07-18 17:39:27 -07:00

33 lines
834 B
Bash
Executable file

#!/bin/bash
set -xe
source $(dirname $0)/sm-tooltool-config.sh
mkdir -p $UPLOAD_DIR
# Package up the sources into the release tarball.
AUTOMATION=1 DIST=$UPLOAD_DIR $SRCDIR/js/src/make-source-package.sh
# Extract the tarball into a new directory in the workspace.
PACKAGE_DIR=$WORK/sm-package
mkdir -p $PACKAGE_DIR
pushd $PACKAGE_DIR
tar -xjvf $UPLOAD_DIR/mozjs-*.tar.bz2
: ${PYTHON:=python2.7}
# Build the freshly extracted, packaged SpiderMonkey.
pushd ./mozjs-*/js/src
# MOZ_AUTOMATION enforces certain requirements that don't apply to
# packaged builds. Unset it.
unset MOZ_AUTOMATION
AUTOMATION=1 $PYTHON ./devtools/automation/autospider.py --skip-tests=checks $SPIDERMONKEY_VARIANT
popd
# Copy artifacts for upload by TaskCluster
cp -rL ./mozjs-*/obj-spider/dist/bin/{js,jsapi-tests,js-gdb.py,libmozjs*} $UPLOAD_DIR