tools_webrtc dir converted to py3 + top level PRESUBMIT script

Bug: webrtc:13607
Change-Id: Ib018e43ea977cc24dd71048e68e3343741f7f31b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249083
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Christoffer Jansson <jansson@google.com>
Cr-Commit-Position: refs/heads/main@{#35953}
This commit is contained in:
Christoffer Jansson
2022-02-08 09:01:12 +01:00
committed by WebRTC LUCI CQ
parent b5cba85c2f
commit 4e8a773b4b
50 changed files with 4570 additions and 4673 deletions

View File

@ -1,3 +1,5 @@
#!/usr/bin/env vpython3
# Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
@ -16,19 +18,19 @@ WEBRTC_VERSION_RE = re.compile(
if __name__ == '__main__':
args = sys.argv
if len(args) != 2:
print('Usage: binary_version_test.py <FILE_NAME>')
exit(1)
filename = sys.argv[1]
output = subprocess.check_output(['strings', filename])
strings_in_binary = output.decode('utf-8').splitlines()
for symbol in strings_in_binary:
if WEBRTC_VERSION_RE.match(symbol):
with open('webrtc_binary_version_check', 'w') as f:
f.write(symbol)
exit(0)
print('WebRTC source timestamp not found in "%s"' % filename)
print('Check why "kSourceTimestamp" from call/version.cc is not linked '
'(or why it has been optimized away by the compiler/linker)')
exit(1)
args = sys.argv
if len(args) != 2:
print('Usage: binary_version_test.py <FILE_NAME>')
sys.exit(1)
filename = sys.argv[1]
output = subprocess.check_output(['strings', filename])
strings_in_binary = output.decode('utf-8').splitlines()
for symbol in strings_in_binary:
if WEBRTC_VERSION_RE.match(symbol):
with open('webrtc_binary_version_check', 'w') as f:
f.write(symbol)
sys.exit(0)
print('WebRTC source timestamp not found in "%s"' % filename)
print('Check why "kSourceTimestamp" from call/version.cc is not linked '
'(or why it has been optimized away by the compiler/linker)')
sys.exit(1)