Commit 59a3b2fd authored by Edward Lemur's avatar Edward Lemur Committed by LUCI CQ

Run autoninja scripts using vpython.

Bug: 1002153
Change-Id: I769a5370d726f4ce478035f59bfd1df50fef452e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1992315Reviewed-by: 's avatarTakuto Ikuta <tikuta@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
parent 22470358
......@@ -20,16 +20,16 @@ if [ "$NINJA_SUMMARIZE_BUILD" == "1" ]; then
fi
if eval "$command"; then
if [ "$NINJA_SUMMARIZE_BUILD" == "1" ]; then
python "$(dirname -- "$0")/post_build_ninja_summary.py" "$@"
vpython "$(dirname -- "$0")/post_build_ninja_summary.py" "$@"
fi
# Collect ninjalog from googler.
"$(dirname -- "$0")/ninjalog_uploader_wrapper.py" --cmd $command
vpython "$(dirname -- "$0")/ninjalog_uploader_wrapper.py" --cmd $command
exit
fi
# Collect ninjalog from googler.
"$(dirname -- "$0")/ninjalog_uploader_wrapper.py" --cmd $command
vpython "$(dirname -- "$0")/ninjalog_uploader_wrapper.py" --cmd $command
# Return an error code of 1 so that if a developer types:
# "autoninja chrome && chrome" then chrome won't run if the build fails.
......
......@@ -19,14 +19,14 @@ REM Also print it to reassure that the right settings are being used.
FOR /f "usebackq tokens=*" %%a in (`vpython %~dp0autoninja.py "%*"`) do echo %%a & %%a
@if errorlevel 1 goto buildfailure
REM Use call to invoke python script here, because we use python via python.bat.
@if "%NINJA_SUMMARIZE_BUILD%" == "1" call python.bat %~dp0post_build_ninja_summary.py %*
@call python.bat %~dp0ninjalog_uploader_wrapper.py --cmdline %*
REM Use call to invoke vpython script here, because we use vpython via vpython.bat.
@if "%NINJA_SUMMARIZE_BUILD%" == "1" call vpython.bat %~dp0post_build_ninja_summary.py %*
@call vpython.bat %~dp0ninjalog_uploader_wrapper.py --cmdline %*
exit /b
:buildfailure
@call python.bat %~dp0ninjalog_uploader_wrapper.py --cmdline %*
@call vpython.bat %~dp0ninjalog_uploader_wrapper.py --cmdline %*
REM Return an error code of 1 so that if a developer types:
REM "autoninja chrome && chrome" then chrome won't run if the build fails.
......
......@@ -27,10 +27,6 @@ import subprocess
import sys
import time
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, os.path.join(ROOT_DIR, 'third_party'))
import httplib2
# These build configs affect build performance a lot.
......
#!/usr/bin/env python
#!/usr/bin/env vpython
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
......@@ -6,11 +6,11 @@
from __future__ import print_function
import os
import subprocess
import json
import sys
import ninjalog_uploader
import subprocess2
THIS_DIR = os.path.dirname(__file__)
UPLOADER = os.path.join(THIS_DIR, 'ninjalog_uploader.py')
......@@ -110,8 +110,8 @@ def main():
# Run upload script without wait.
devnull = open(os.devnull, "w")
subprocess.Popen([sys.executable, UPLOADER] + sys.argv[1:],
stdout=devnull, stderr=devnull)
subprocess2.Popen(['vpython', UPLOADER] + sys.argv[1:],
stdout=devnull, stderr=devnull)
if __name__ == '__main__':
......
#!/usr/bin/env vpython
# Copyright (c) 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment