Revert "Add in missing protobuf code."
This reverts commit 0a663bf9f1332c2ea92b7b49cdb3716472c29590.
Reason for revert: Breaks isolate tests
Original change's description:
> Add in missing protobuf code.
>
> Turns out the import of histogram_pb2 failed not on the stub itself
> (which I thought for a long, long time), but because of the protobuf
> support code it includes in turn. This is a drawback of catching
> the ImportError in histogram_proto.py.
>
> This has a decent chance of fixing the problem.
>
> Tbr: mbonadei@webrtc.org
> Bug: chromium:1029452
> Change-Id: I3c07a362dcfd174a388b3cc34449c08951cea626
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171860
> Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30912}
TBR=phoglund@webrtc.org,mbonadei@webrtc.org
Change-Id: I05bf2f65905afcb7dfdc1e3fca7c01b4af377410
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1029452
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171866
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30915}
diff --git a/audio/BUILD.gn b/audio/BUILD.gn
index 64416a2..739016e 100644
--- a/audio/BUILD.gn
+++ b/audio/BUILD.gn
@@ -215,18 +215,16 @@
group("low_bandwidth_audio_perf_test") {
testonly = true
- deps = [
- ":low_bandwidth_audio_test",
- "//third_party/catapult/tracing/tracing/proto:histogram_proto",
- ]
+ deps = [ ":low_bandwidth_audio_test" ]
data = [
"test/low_bandwidth_audio_test.py",
"../resources/voice_engine/audio_tiny16.wav",
"../resources/voice_engine/audio_tiny48.wav",
- "${root_out_dir}/pyproto/tracing/tracing/proto/histogram_pb2.py",
- "//third_party/protobuf:py_proto_runtime",
]
+ deps += [ "//third_party/catapult/tracing/tracing/proto:histogram_proto" ]
+ data +=
+ [ "${root_out_dir}/pyproto/tracing/tracing/proto/histogram_pb2.py" ]
# TODO(http://crbug.com/1029452): Create a cleaner target with just the
# tracing python code. We don't need Polymer for instance.
diff --git a/audio/test/low_bandwidth_audio_test.py b/audio/test/low_bandwidth_audio_test.py
index 4e21969..c995cd6 100755
--- a/audio/test/low_bandwidth_audio_test.py
+++ b/audio/test/low_bandwidth_audio_test.py
@@ -234,10 +234,8 @@
sys.path.insert(0, histogram_proto_path)
# Fail early in case the proto hasn't been built.
- try:
- import histogram_pb2
- except ImportError as e:
- logging.exception(e)
+ from tracing.proto import histogram_proto
+ if not histogram_proto.HAS_PROTO:
raise ImportError('Could not find histogram_pb2. You need to build the '
'low_bandwidth_audio_perf_test target before invoking '
'this script. Expected to find '
@@ -247,7 +245,6 @@
def main():
# pylint: disable=W0101
logging.basicConfig(level=logging.INFO)
- logging.info('Invoked with %s', str(sys.argv))
args = _ParseArgs()