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}
diff --git a/tools_webrtc/binary_version_check.py b/tools_webrtc/binary_version_check.py
index cc5d961..563fe36 100644
--- a/tools_webrtc/binary_version_check.py
+++ b/tools_webrtc/binary_version_check.py
@@ -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 @@
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)