mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 07:45:30 +00:00
Bug 1597005 - autospider.py: Run with Python3
Differential Revision: https://phabricator.services.mozilla.com/D57393 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
ed478e84dd
commit
28b7bb1932
@ -32,7 +32,7 @@ fn main() {
|
||||
"plain"
|
||||
};
|
||||
|
||||
let python = env::var("PYTHON").unwrap_or("python2.7".into());
|
||||
let python = env::var("PYTHON3").unwrap_or("python3".into());
|
||||
let mut cmd = Command::new(&python);
|
||||
cmd.args(&["./devtools/automation/autospider.py",
|
||||
// Only build SpiderMonkey, don't run all the tests.
|
||||
|
@ -129,7 +129,7 @@ def set_vars_from_script(script, vars):
|
||||
script_text += '; echo VAR SETTINGS:; '
|
||||
script_text += '; '.join('echo $' + var for var in vars)
|
||||
parse_state = 'scanning'
|
||||
stdout = subprocess.check_output(['sh', '-x', '-c', script_text])
|
||||
stdout = subprocess.check_output(['sh', '-x', '-c', script_text]).decode()
|
||||
tograb = vars[:]
|
||||
for line in stdout.splitlines():
|
||||
if parse_state == 'scanning':
|
||||
@ -345,7 +345,7 @@ REPLACEMENTS = {
|
||||
# Add in environment variable settings for this variant. Normally used to
|
||||
# modify the flags passed to the shell or to set the GC zeal mode.
|
||||
for k, v in variant.get('env', {}).items():
|
||||
env[k.encode('ascii')] = v.encode('ascii').format(**REPLACEMENTS)
|
||||
env[k] = v.format(**REPLACEMENTS)
|
||||
|
||||
if AUTOMATION:
|
||||
# Currently only supported on linux64.
|
||||
@ -457,7 +457,7 @@ else:
|
||||
|
||||
# Override environment variant settings conditionally.
|
||||
for k, v in variant.get('conditional-env', {}).get(variant_platform, {}).items():
|
||||
env[k.encode('ascii')] = v.encode('ascii').format(**REPLACEMENTS)
|
||||
env[k] = v.format(**REPLACEMENTS)
|
||||
|
||||
# Skip any tests that are not run on this platform (or the 'all' platform).
|
||||
test_suites -= set(normalize_tests(variant.get('skip-tests', {}).get(variant_platform, [])))
|
||||
|
@ -17,7 +17,7 @@ pushd $PACKAGE_DIR
|
||||
|
||||
tar -xjvf $UPLOAD_DIR/mozjs-*.tar.bz2
|
||||
|
||||
: ${PYTHON:=python2.7}
|
||||
: ${PYTHON3:=python3}
|
||||
|
||||
# Build the freshly extracted, packaged SpiderMonkey.
|
||||
pushd ./mozjs-*/js/src
|
||||
@ -26,7 +26,7 @@ pushd ./mozjs-*/js/src
|
||||
# packaged builds. Unset it.
|
||||
unset MOZ_AUTOMATION
|
||||
|
||||
AUTOMATION=1 $PYTHON ./devtools/automation/autospider.py --skip-tests=checks $SPIDERMONKEY_VARIANT
|
||||
AUTOMATION=1 $PYTHON3 ./devtools/automation/autospider.py --skip-tests=checks $SPIDERMONKEY_VARIANT
|
||||
popd
|
||||
|
||||
# Copy artifacts for upload by TaskCluster
|
||||
|
@ -4,11 +4,11 @@ set -x
|
||||
|
||||
source $(dirname $0)/sm-tooltool-config.sh
|
||||
|
||||
: ${PYTHON:=python2.7}
|
||||
: ${PYTHON3:=python3}
|
||||
|
||||
# Run the script
|
||||
export MOZ_UPLOAD_DIR="$(cd "$UPLOAD_DIR"; pwd)"
|
||||
AUTOMATION=1 $PYTHON $SRCDIR/js/src/devtools/automation/autospider.py ${SPIDERMONKEY_PLATFORM:+--platform=$SPIDERMONKEY_PLATFORM} $SPIDERMONKEY_VARIANT
|
||||
AUTOMATION=1 $PYTHON3 $SRCDIR/js/src/devtools/automation/autospider.py ${SPIDERMONKEY_PLATFORM:+--platform=$SPIDERMONKEY_PLATFORM} $SPIDERMONKEY_VARIANT
|
||||
BUILD_STATUS=$?
|
||||
|
||||
# Ensure upload dir exists
|
||||
|
Loading…
Reference in New Issue
Block a user