| # Copyright 2026 The Fuchsia Authors | |
| # | |
| # Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0 | |
| # <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>, or the MIT | |
| # license <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option. | |
| # This file may not be copied, modified, or distributed except according to | |
| # those terms. | |
| """Unit tests for `perf_tracking.py`.""" | |
| # The test methods live in the `perf_tracking_tests` package, grouped by | |
| # domain into plain mixin classes. Composing them into the test classes | |
| # here lets `unittest` discovery, which loads only `test_*.py` files, find | |
| # each test exactly once under its original class and method names. | |
| from pathlib import Path | |
| import sys | |
| import unittest | |
| _CI_DIR = str(Path(__file__).resolve().parent) | |
| if _CI_DIR not in sys.path: | |
| sys.path.insert(0, _CI_DIR) | |
| from perf_tracking_tests.budgets_and_analysis import AppendBudgetsAndAnalysisCases | |
| from perf_tracking_tests.collection import MockCollectionCases | |
| from perf_tracking_tests.measurement import SubprocessMeasurementCases | |
| from perf_tracking_tests.support import SyntheticRepoFixture | |
| from perf_tracking_tests.validation import ValidationCases | |
| class ValidationTests(ValidationCases, unittest.TestCase): | |
| pass | |
| class SubprocessMeasurementTests(SubprocessMeasurementCases, unittest.TestCase): | |
| pass | |
| class MockCollectionTests(MockCollectionCases, SyntheticRepoFixture, unittest.TestCase): | |
| pass | |
| class AppendBudgetsAndAnalysisTests(AppendBudgetsAndAnalysisCases, unittest.TestCase): | |
| pass | |
| if __name__ == "__main__": | |
| unittest.main() |