aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-autoroll <android-autoroll@skia-public.iam.gserviceaccount.com>2023-08-25 20:32:36 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-08-25 20:32:36 +0000
commit5ba15e540e5a99f14b06e29cbb62679d0e888536 (patch)
tree7e8a3abbeb641bc2b04816eeaa8d6bf120e980bc
parent55eaae6e686d404806185b1699d0679d8f3b7357 (diff)
parent47324d6fe8b7319b5ddaf3b31979c24c7c43b821 (diff)
downloadswiftshader-5ba15e540e5a99f14b06e29cbb62679d0e888536.tar.gz
Roll SwiftShader from 97bdc453fbed to 32f9332d1d7a (2 revisions) am: 411cb0f1c8 am: 353c73f78b am: 47324d6fe8
Original change: https://android-review.googlesource.com/c/platform/external/swiftshader/+/2726460 Change-Id: I0c757dde49695a620dd315ae1bac5f044536f39a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rwxr-xr-xthird_party/SPIRV-Tools/utils/update_build_version.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/third_party/SPIRV-Tools/utils/update_build_version.py b/third_party/SPIRV-Tools/utils/update_build_version.py
index 5a78ada26..0ee5c082a 100755
--- a/third_party/SPIRV-Tools/utils/update_build_version.py
+++ b/third_party/SPIRV-Tools/utils/update_build_version.py
@@ -59,12 +59,14 @@ def mkdir_p(directory):
else:
raise
-def command_output(cmd, directory):
+def command_output(cmd, directory, may_fail=False):
"""Runs a command in a directory and returns its standard output stream.
Captures the standard error stream.
- Raises a RuntimeError if the command fails to launch or otherwise fails.
+ Raises a RuntimeError if the command fails to launch or otherwise fails. If
+ `may_fail` is true, suppresses the log message when running the command
+ succeeds but returns a non-zero error code.
"""
try:
# Set shell=True on Windows so that Chromium's git.bat can be found when
@@ -75,7 +77,7 @@ def command_output(cmd, directory):
stderr=subprocess.PIPE,
shell=os.name == 'nt')
(stdout, stderr) = p.communicate()
- if p.returncode != 0:
+ if p.returncode != 0 and not may_fail:
logging.error('Failed to run "{}" in "{}": {}'.format(cmd, directory, stderr.decode()))
except Exception as e:
logging.error('Failed to run "{}" in "{}": {}'.format(cmd, directory, str(e)))
@@ -111,7 +113,7 @@ def describe(repo_path):
Runs 'git describe', or alternately 'git rev-parse HEAD', in directory. If
successful, returns the output; otherwise returns 'unknown hash, <date>'."""
- success, output = command_output(['git', 'describe'], repo_path)
+ success, output = command_output(['git', 'describe'], repo_path, may_fail=True)
if not success:
output = command_output(['git', 'rev-parse', 'HEAD'], repo_path)