| # Copyright 2023 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/python/python_host_test.gni") |
| import("//build/testing/host_test_data.gni") |
| |
| if (is_host) { |
| host_test_data("wakeup_metrics_processor_test_data") { |
| sources = [ |
| "data/wakeup_metrics_processor/incomplete_wakeup.json", |
| "data/wakeup_metrics_processor/many_wakeups.json", |
| "data/wakeup_metrics_processor/one_wakeup.json", |
| "data/wakeup_metrics_processor/restarted_wakeup.json", |
| "data/wakeup_metrics_processor/zero_wakeups.json", |
| ] |
| |
| outputs = [ "${target_out_dir}/runtime_deps/wakeup_metrics_processor/{{source_file_part}}" ] |
| } |
| |
| host_test_data("trace_importing_test_data") { |
| sources = [ |
| "data/chrome_metadata.json", |
| "data/flow_event_binding.json", |
| "data/flow_ids.json", |
| "data/id2_async.json", |
| "data/model.json", |
| "data/sched_data.json", |
| ] |
| |
| outputs = [ "${target_out_dir}/runtime_deps/{{source_file_part}}" ] |
| } |
| |
| host_test_data("trace_metrics_test_data") { |
| sources = [ |
| "data/app_render_metric.json", |
| "data/cpu_metric.json", |
| "data/fps_metric.json", |
| "data/input_latency_metric.json", |
| "data/scenic_metric.json", |
| ] |
| |
| outputs = [ "${target_out_dir}/runtime_deps/{{source_file_part}}" ] |
| } |
| |
| python_host_test("agg_cpu_breakdown_test") { |
| main_source = "agg_cpu_breakdown_test.py" |
| libraries = [ "//src/performance/lib/trace_processing" ] |
| } |
| |
| python_host_test("cpu_breakdown_test") { |
| main_source = "cpu_breakdown_test.py" |
| libraries = [ "//src/performance/lib/trace_processing" ] |
| } |
| |
| python_host_test("memory_test") { |
| main_source = "memory_test.py" |
| libraries = [ "//src/performance/lib/trace_processing" ] |
| } |
| |
| python_host_test("power_metrics_test") { |
| main_source = "power_metrics_test.py" |
| libraries = [ "//src/performance/lib/trace_processing" ] |
| } |
| |
| python_host_test("wakeup_metrics_test") { |
| main_source = "wakeup_metrics_test.py" |
| libraries = [ "//src/performance/lib/trace_processing" ] |
| deps = [ ":wakeup_metrics_processor_test_data" ] |
| } |
| |
| python_host_test("trace_importing_test") { |
| main_source = "trace_importing_test.py" |
| sources = [ "test_utils.py" ] |
| libraries = [ "//src/performance/lib/trace_processing" ] |
| deps = [ ":trace_importing_test_data" ] |
| } |
| |
| python_host_test("trace_metrics_test") { |
| main_source = "trace_metrics_test.py" |
| sources = [ "test_utils.py" ] |
| libraries = [ |
| "//src/performance/lib/trace_processing", |
| "//third_party/parameterized", |
| ] |
| deps = [ ":trace_metrics_test_data" ] |
| } |
| |
| python_host_test("trace_model_test") { |
| main_source = "trace_model_test.py" |
| sources = [ "test_utils.py" ] |
| libraries = [ "//src/performance/lib/trace_processing" ] |
| } |
| |
| python_host_test("trace_utils_test") { |
| main_source = "trace_utils_test.py" |
| sources = [ "test_utils.py" ] |
| libraries = [ "//src/performance/lib/trace_processing" ] |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ |
| ":agg_cpu_breakdown_test($host_toolchain)", |
| ":cpu_breakdown_test($host_toolchain)", |
| ":memory_test($host_toolchain)", |
| ":power_metrics_test($host_toolchain)", |
| ":trace_importing_test($host_toolchain)", |
| ":trace_metrics_test($host_toolchain)", |
| ":trace_model_test($host_toolchain)", |
| ":trace_utils_test($host_toolchain)", |
| ":wakeup_metrics_test($host_toolchain)", |
| ] |
| } |