summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorcclauss <cclauss@me.com>2019-10-27 15:36:21 +0100
committercclauss <cclauss@me.com>2019-10-31 23:19:21 +0100
commit2d8307e1996ee0c45d3630c1716b5fbfa08ac380 (patch)
tree84c16b8af51d6b11cbfa1133b66f59034806bbda /tools
parentdb1aab9df6bfad1d1601d474a1f978bedd9382d5 (diff)
downloadnode-new-2d8307e1996ee0c45d3630c1716b5fbfa08ac380.tar.gz
tools: use print() function in buildbot_run.py
PR-URL: https://github.com/nodejs/node/pull/30148 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/gyp/buildbot/buildbot_run.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/tools/gyp/buildbot/buildbot_run.py b/tools/gyp/buildbot/buildbot_run.py
index 9a2b71f1b3..cdd347d0bc 100755
--- a/tools/gyp/buildbot/buildbot_run.py
+++ b/tools/gyp/buildbot/buildbot_run.py
@@ -4,6 +4,7 @@
# found in the LICENSE file.
"""Argument-less script to select what to run on the buildbots."""
+from __future__ import print_function
import os
import shutil
@@ -24,14 +25,14 @@ def CallSubProcess(*args, **kwargs):
with open(os.devnull) as devnull_fd:
retcode = subprocess.call(stdin=devnull_fd, *args, **kwargs)
if retcode != 0:
- print '@@@STEP_EXCEPTION@@@'
+ print('@@@STEP_EXCEPTION@@@')
sys.exit(1)
def PrepareCmake():
"""Build CMake 2.8.8 since the version in Precise is 2.8.7."""
if os.environ['BUILDBOT_CLOBBER'] == '1':
- print '@@@BUILD_STEP Clobber CMake checkout@@@'
+ print('@@@BUILD_STEP Clobber CMake checkout@@@')
shutil.rmtree(CMAKE_DIR)
# We always build CMake 2.8.8, so no need to do anything
@@ -39,10 +40,10 @@ def PrepareCmake():
if os.path.isdir(CMAKE_DIR):
return
- print '@@@BUILD_STEP Initialize CMake checkout@@@'
+ print('@@@BUILD_STEP Initialize CMake checkout@@@')
os.mkdir(CMAKE_DIR)
- print '@@@BUILD_STEP Sync CMake@@@'
+ print('@@@BUILD_STEP Sync CMake@@@')
CallSubProcess(
['git', 'clone',
'--depth', '1',
@@ -53,7 +54,7 @@ def PrepareCmake():
CMAKE_DIR],
cwd=CMAKE_DIR)
- print '@@@BUILD_STEP Build CMake@@@'
+ print('@@@BUILD_STEP Build CMake@@@')
CallSubProcess(
['/bin/bash', 'bootstrap', '--prefix=%s' % CMAKE_DIR],
cwd=CMAKE_DIR)
@@ -74,7 +75,7 @@ def GypTestFormat(title, format=None, msvs_version=None, tests=[]):
if not format:
format = title
- print '@@@BUILD_STEP ' + title + '@@@'
+ print('@@@BUILD_STEP ' + title + '@@@')
sys.stdout.flush()
env = os.environ.copy()
if msvs_version:
@@ -89,17 +90,17 @@ def GypTestFormat(title, format=None, msvs_version=None, tests=[]):
retcode = subprocess.call(command, cwd=ROOT_DIR, env=env, shell=True)
if retcode:
# Emit failure tag, and keep going.
- print '@@@STEP_FAILURE@@@'
+ print('@@@STEP_FAILURE@@@')
return 1
return 0
def GypBuild():
# Dump out/ directory.
- print '@@@BUILD_STEP cleanup@@@'
- print 'Removing %s...' % OUT_DIR
+ print('@@@BUILD_STEP cleanup@@@')
+ print('Removing %s...' % OUT_DIR)
shutil.rmtree(OUT_DIR, ignore_errors=True)
- print 'Done.'
+ print('Done.')
retcode = 0
if sys.platform.startswith('linux'):
@@ -128,7 +129,7 @@ def GypBuild():
# after the build proper that could be used for cumulative failures),
# use that instead of this. This isolates the final return value so
# that it isn't misattributed to the last stage.
- print '@@@BUILD_STEP failures@@@'
+ print('@@@BUILD_STEP failures@@@')
sys.exit(retcode)