1# Copyright 2022 The Pigweed Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15load("@rules_python//python:defs.bzl", "py_library") 16load("//pw_build:python.bzl", "pw_py_test") 17 18package(default_visibility = ["//visibility:public"]) 19 20py_library( 21 name = "pw_snapshot", 22 srcs = [ 23 "pw_snapshot/__init__.py", 24 "pw_snapshot/processor.py", 25 ], 26 imports = ["."], 27 deps = [ 28 ":pw_snapshot_metadata", 29 "//pw_build_info/py:pw_build_info", 30 "//pw_chrono/py:pw_chrono", 31 "//pw_cpu_exception_cortex_m/py:exception_analyzer", 32 "//pw_cpu_exception_risc_v/py:exception_analyzer", 33 "//pw_snapshot:snapshot_proto_py_pb2", 34 "//pw_symbolizer/py:pw_symbolizer", 35 "//pw_thread/py:pw_thread", 36 "//pw_tokenizer/py:pw_tokenizer", 37 ], 38) 39 40py_library( 41 name = "pw_snapshot_metadata", 42 srcs = [ 43 "pw_snapshot_metadata/__init__.py", 44 "pw_snapshot_metadata/metadata.py", 45 ], 46 imports = ["."], 47 deps = [ 48 "//pw_log_tokenized/py:pw_log_tokenized", 49 "//pw_snapshot:metadata_proto_py_pb2", 50 "//pw_tokenizer/py:pw_tokenizer", 51 ], 52) 53 54pw_py_test( 55 name = "metadata_test", 56 srcs = ["metadata_test.py"], 57 deps = [ 58 ":pw_snapshot_metadata", 59 "//pw_snapshot:snapshot_proto_py_pb2", 60 "//pw_tokenizer/py:pw_tokenizer", 61 ], 62) 63 64pw_py_test( 65 name = "processor_test", 66 srcs = ["processor_test.py"], 67 68 # TODO(b/336614211): Remove and re-enable tests. 69 tags = [ 70 "manual", 71 "noenv-failure", 72 ], 73 deps = [ 74 ":pw_snapshot", 75 ":pw_snapshot_metadata", 76 "//pw_build_info/py:pw_build_info", 77 "//pw_chrono/py:pw_chrono", 78 "//pw_cpu_exception_cortex_m/py:exception_analyzer", 79 "//pw_cpu_exception_risc_v/py:exception_analyzer", 80 "//pw_snapshot:snapshot_proto_py_pb2", 81 "//pw_symbolizer/py:pw_symbolizer", 82 "//pw_thread/py:pw_thread", 83 "//pw_tokenizer/py:pw_tokenizer", 84 ], 85) 86