[autoninja] upload ninjalog even in failed build

I noticed current autoninja does not upload build log in failed build.

Change-Id: Ie58646b483e130769ad22113953c0b95b3145548
Reviewed-on: https://chromium-review.googlesource.com/c/1441892
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
changes/92/1441892/3
Takuto Ikuta 6 years ago committed by Commit Bot
parent b69515579d
commit 687c59d3a4

@ -21,6 +21,10 @@ if eval "$command"; then
"$(dirname -- "$0")/ninjalog_uploader_wrapper.py" --cmd $command "$(dirname -- "$0")/ninjalog_uploader_wrapper.py" --cmd $command
exit exit
fi fi
# Collect ninjalog from googler.
"$(dirname -- "$0")/ninjalog_uploader_wrapper.py" --cmd $command
# Return an error code of 1 so that if a developer types: # Return an error code of 1 so that if a developer types:
# "autoninja chrome && chrome" then chrome won't run if the build fails. # "autoninja chrome && chrome" then chrome won't run if the build fails.
exit 1 exit 1

@ -17,6 +17,9 @@ REM Use call to invoke python script here, because we use python via python.bat.
exit /b exit /b
:buildfailure :buildfailure
@call python.bat %~dp0ninjalog_uploader_wrapper.py --cmdline %*
REM Return an error code of 1 so that if a developer types: 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. REM "autoninja chrome && chrome" then chrome won't run if the build fails.
cmd /c exit 1 cmd /c exit 1

Loading…
Cancel
Save