• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python3
2# Copyright (C) 2023 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License a
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15import os
16import sys
17from typing import List
18
19from python.generators.diff_tests import testing
20
21# A hack to import using `diff_tests.` which prevents the risk name conflicts,
22# i.e importing a module when user has a different package of the same name
23# installed.
24TRACE_PROCESSOR_TEST_DIR = os.path.dirname(
25    os.path.dirname(os.path.abspath(__file__)))
26sys.path.append(TRACE_PROCESSOR_TEST_DIR)
27
28from diff_tests.android.tests import Android
29from diff_tests.android.tests_bugreport import AndroidBugreport
30from diff_tests.android.tests_games import AndroidGames
31from diff_tests.atrace.tests import Atrace
32from diff_tests.atrace.tests_error_handling import AtraceErrorHandling
33from diff_tests.camera.tests import Camera
34from diff_tests.chrome.tests import Chrome
35from diff_tests.chrome.tests_args import ChromeArgs
36from diff_tests.chrome.tests_memory_snapshots import ChromeMemorySnapshots
37from diff_tests.chrome.tests_processes import ChromeProcesses
38from diff_tests.chrome.tests_rail_modes import ChromeRailModes
39from diff_tests.chrome.tests_scroll_jank import ChromeScrollJank
40from diff_tests.chrome.tests_touch_gesture import ChromeTouchGesture
41from diff_tests.cros.tests import Cros
42from diff_tests.dynamic.tests import Dynamic
43from diff_tests.fs.tests import Fs
44from diff_tests.fuchsia.tests import Fuchsia
45from diff_tests.functions.tests import Functions
46from diff_tests.graphics.tests import Graphics
47from diff_tests.graphics.tests_drm_related_ftrace_events import \
48    GraphicsDrmRelatedFtraceEvents
49from diff_tests.graphics.tests_gpu_trace import GraphicsGpuTrace
50from diff_tests.memory.tests import Memory
51from diff_tests.memory.tests_metrics import MemoryMetrics
52from diff_tests.network.tests import Network
53from diff_tests.parsing.tests import Parsing
54from diff_tests.parsing.tests_debug_annotation import ParsingDebugAnnotation
55from diff_tests.parsing.tests_memory_counters import ParsingMemoryCounters
56from diff_tests.parsing.tests_rss_stats import ParsingRssStats
57from diff_tests.performance.tests import Performance
58from diff_tests.pkvm.tests import Pkvm
59from diff_tests.power.tests import Power
60from diff_tests.power.tests_energy_breakdown import PowerEnergyBreakdown
61from diff_tests.power.tests_entity_state_residency import EntityStateResidency
62from diff_tests.power.tests_linux_sysfs_power import LinuxSysfsPower
63from diff_tests.power.tests_power_rails import PowerPowerRails
64from diff_tests.power.tests_voltage_and_scaling import PowerVoltageAndScaling
65from diff_tests.process_tracking.tests import ProcessTracking
66from diff_tests.profiling.tests import Profiling
67from diff_tests.profiling.tests_heap_graph import ProfilingHeapGraph
68from diff_tests.profiling.tests_heap_profiling import ProfilingHeapProfiling
69from diff_tests.profiling.tests_llvm_symbolizer import ProfilingLlvmSymbolizer
70from diff_tests.profiling.tests_metrics import ProfilingMetrics
71from diff_tests.scheduler.tests import Scheduler
72from diff_tests.smoke.tests import Smoke
73from diff_tests.smoke.tests_compute_metrics import SmokeComputeMetrics
74from diff_tests.smoke.tests_json import SmokeJson
75from diff_tests.smoke.tests_sched_events import SmokeSchedEvents
76from diff_tests.span_join.tests_left_join import SpanJoinLeftJoin
77from diff_tests.span_join.tests_outer_join import SpanJoinOuterJoin
78from diff_tests.span_join.tests_regression import SpanJoinRegression
79from diff_tests.span_join.tests_smoke import SpanJoinSmoke
80from diff_tests.startup.tests import Startup
81from diff_tests.startup.tests_broadcasts import StartupBroadcasts
82from diff_tests.startup.tests_lock_contention import StartupLockContention
83from diff_tests.startup.tests_metrics import StartupMetrics
84from diff_tests.tables.tests import Tables
85from diff_tests.tables.tests_counters import TablesCounters
86from diff_tests.tables.tests_sched import TablesSched
87from diff_tests.track_event.tests import TrackEvent
88from diff_tests.translation.tests import Translation
89from diff_tests.ufs.tests import Ufs
90from diff_tests.webview.tests import WebView
91
92sys.path.pop()
93
94
95def fetch_all_diff_tests(index_path: str) -> List['testing.TestCase']:
96  return [
97      *Android(index_path, 'android', 'Android').fetch(),
98      *AndroidBugreport(index_path, 'android', 'AndroidBugreport').fetch(),
99      *AndroidGames(index_path, 'android', 'AndroidGames').fetch(),
100      *Atrace(index_path, 'atrace', 'Atrace').fetch(),
101      *AtraceErrorHandling(index_path, 'atrace', 'AtraceErrorHandling').fetch(),
102      *Camera(index_path, 'camera', 'Camera').fetch(),
103      *ChromeScrollJank(index_path, 'chrome', 'ChromeScrollJank').fetch(),
104      *ChromeTouchGesture(index_path, 'chrome', 'ChromeTouchGesture').fetch(),
105      *ChromeMemorySnapshots(index_path, 'chrome',
106                             'ChromeMemorySnapshots').fetch(),
107      *ChromeRailModes(index_path, 'chrome', 'ChromeRailModes').fetch(),
108      *ChromeProcesses(index_path, 'chrome', 'ChromeProcesses').fetch(),
109      *ChromeArgs(index_path, 'chrome', 'ChromeArgs').fetch(),
110      *Chrome(index_path, 'chrome', 'Chrome').fetch(),
111      *Cros(index_path, 'cros', 'Cros').fetch(),
112      *Dynamic(index_path, 'dynamic', 'Dynamic').fetch(),
113      *EntityStateResidency(index_path, 'power',
114                            'EntityStateResidency').fetch(),
115      *Fs(index_path, 'fs', 'Fs').fetch(),
116      *Fuchsia(index_path, 'fuchsia', 'Fuchsia').fetch(),
117      *Functions(index_path, 'functions', 'Functions').fetch(),
118      *Graphics(index_path, 'graphics', 'Graphics').fetch(),
119      *GraphicsGpuTrace(index_path, 'graphics', 'GraphicsGpuTrace').fetch(),
120      *GraphicsDrmRelatedFtraceEvents(index_path, 'graphics',
121                                      'GraphicsDrmRelatedFtraceEvents').fetch(),
122      *Ufs(index_path, 'ufs', 'Ufs').fetch(),
123      *LinuxSysfsPower(index_path, 'power', 'LinuxSysfsPower').fetch(),
124      *Memory(index_path, 'memory', 'Memory').fetch(),
125      *MemoryMetrics(index_path, 'memory', 'MemoryMetrics').fetch(),
126      *Network(index_path, 'network', 'Network').fetch(),
127      *Parsing(index_path, 'parsing', 'Parsing').fetch(),
128      *ParsingDebugAnnotation(index_path, 'parsing',
129                              'ParsingDebugAnnotation').fetch(),
130      *ParsingRssStats(index_path, 'parsing', 'ParsingRssStats').fetch(),
131      *ParsingMemoryCounters(index_path, 'parsing',
132                             'ParsingMemoryCounters').fetch(),
133      *Performance(index_path, 'performance', 'Performance').fetch(),
134      *Pkvm(index_path, 'pkvm', 'Pkvm').fetch(),
135      *Power(index_path, 'power', 'Power').fetch(),
136      *PowerPowerRails(index_path, 'power', 'PowerPowerRails').fetch(),
137      *PowerVoltageAndScaling(index_path, 'power',
138                              'PowerVoltageAndScaling').fetch(),
139      *PowerEnergyBreakdown(index_path, 'power',
140                            'PowerEnergyBreakdown').fetch(),
141      *ProcessTracking(index_path, 'process_tracking',
142                       'ProcessTracking').fetch(),
143      *Profiling(index_path, 'profiling', 'Profiling').fetch(),
144      *ProfilingHeapProfiling(index_path, 'profiling',
145                              'ProfilingHeapProfiling').fetch(),
146      *ProfilingHeapGraph(index_path, 'profiling',
147                          'ProfilingHeapGraph').fetch(),
148      *ProfilingMetrics(index_path, 'profiling', 'ProfilingMetrics').fetch(),
149      *ProfilingLlvmSymbolizer(index_path, 'profiling',
150                               'ProfilingLlvmSymbolizer').fetch(),
151      *Scheduler(index_path, 'scheduler', 'Scheduler').fetch(),
152      *Smoke(index_path, 'smoke', 'Smoke').fetch(),
153      *SmokeJson(index_path, 'smoke', 'SmokeJson').fetch(),
154      *SmokeSchedEvents(index_path, 'smoke', 'SmokeSchedEvents').fetch(),
155      *SmokeComputeMetrics(index_path, 'smoke', 'SmokeComputeMetrics').fetch(),
156      *SpanJoinOuterJoin(index_path, 'span_join', 'SpanJoinOuterJoin').fetch(),
157      *SpanJoinLeftJoin(index_path, 'span_join', 'SpanJoinLeftJoin').fetch(),
158      *SpanJoinSmoke(index_path, 'span_join', 'SpanJoinSmoke').fetch(),
159      *SpanJoinRegression(index_path, 'span_join',
160                          'SpanJoinRegression').fetch(),
161      *Startup(index_path, 'startup', 'Startup').fetch(),
162      *StartupBroadcasts(index_path, 'startup', 'StartupBroadcasts').fetch(),
163      *StartupMetrics(index_path, 'startup', 'StartupMetrics').fetch(),
164      *StartupLockContention(index_path, 'startup',
165                             'StartupLockContention').fetch(),
166      *Tables(index_path, 'tables', 'Tables').fetch(),
167      *TablesCounters(index_path, 'tables', 'TablesCounters').fetch(),
168      *TablesSched(index_path, 'tables', 'TablesSched').fetch(),
169      *TrackEvent(index_path, 'track_event', 'TrackEvent').fetch(),
170      *Translation(index_path, 'translation', 'Translation').fetch(),
171      *WebView(index_path, 'webview', 'WebView').fetch(),
172  ]
173