| # 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") | |
| assert(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.fxt", | |
| "data/model.json", | |
| "data/sched_data.json", | |
| "data/split_model.json", | |
| "data/split_model.systemTraceEvents.jsonlines", | |
| ] | |
| outputs = [ "${target_out_dir}/runtime_deps/{{source_file_part}}" ] | |
| } | |
| host_test_data("trace_metrics_test_data") { | |
| sources = [ | |
| "data/app_render_metric.fxt", | |
| "data/app_render_metric.json", | |
| "data/cpu_metric.fxt", | |
| "data/cpu_metric.json", | |
| "data/fps_metric.fxt", | |
| "data/fps_metric.json", | |
| "data/input_latency_metric.fxt", | |
| "data/input_latency_metric.json", | |
| "data/scenic_metric.fxt", | |
| "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("odpm_power_metrics_test") { | |
| main_source = "odpm_power_metrics_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("scheduler_test") { | |
| main_source = "scheduler_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", | |
| "//src/performance/lib/trace_processing:process_monitor", | |
| "//src/performance/trace2json:test_data", | |
| ] | |
| } | |
| python_host_test("trace_importing_fxt_test") { | |
| main_source = "trace_importing_fxt_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", | |
| ":cpu_breakdown_test", | |
| ":memory_test", | |
| ":odpm_power_metrics_test", | |
| ":power_metrics_test", | |
| ":scheduler_test", | |
| ":trace_importing_fxt_test", | |
| ":trace_importing_test", | |
| ":trace_metrics_test", | |
| ":trace_model_test", | |
| ":trace_utils_test", | |
| ":wakeup_metrics_test", | |
| ] | |
| } |