Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey@blender.org>2020-11-12 12:00:08 +0300
committerSergey Sharybin <sergey@blender.org>2020-11-12 12:00:08 +0300
commit72cf67ca64e8be18bd090a98ba6f208635630089 (patch)
treefcaf879f99866224faf3bb30ae86d8f9d3c8ddf6
parent0900e95a04762cb4f8eca0473c5463436a20cd26 (diff)
Codesign: Make Windows codesign check more strictcodesign_error_tracker
Check that signtool reported number of files successfulyl signed, and that the number equals to 1.
-rw-r--r--build_files/buildbot/codesign/windows_code_signer.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/build_files/buildbot/codesign/windows_code_signer.py b/build_files/buildbot/codesign/windows_code_signer.py
index b5d97044468..251dd856c8a 100644
--- a/build_files/buildbot/codesign/windows_code_signer.py
+++ b/build_files/buildbot/codesign/windows_code_signer.py
@@ -67,16 +67,27 @@ class WindowsCodeSigner(BaseCodeSigner):
codesign_output = self.check_output_or_mock(command, util.Platform.WINDOWS)
logger_server.info(f'signtool output:\n{codesign_output}')
+ got_number_of_success = False
+
for line in codesign_output.split('\n'):
line_clean = line.strip()
line_clean_lower = line_clean.lower()
+
if line_clean_lower.startswith('number of warnings') or \
line_clean_lower.startswith('number of errors'):
- tokens = line_clean_lower.split(':')
- number = int(tokens[1])
+ number = int(line_clean_lower.split(':')[1])
if number != 0:
raise SigntoolException('Non-clean success of signtool')
+ if line_clean_lower.startswith('number of files successfully signed'):
+ got_number_of_success = True
+ number = int(line_clean_lower.split(':')[1])
+ if number != 1:
+ raise SigntoolException('Signtool did not consider codesign a success')
+
+ if not got_number_of_success:
+ raise SigntoolException('Signtool did not report number of files signed')
+
def sign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> None:
# NOTE: Sign files one by one to avoid possible command line length