mirror of
https://github.com/esphome/esphome.git
synced 2026-09-16 01:28:39 +00:00
Clean up shared constants and setup script
- Move BASE_CODEGEN_COMPONENTS and USE_TIME_TIMEZONE_FLAG to test_helpers.py - Use shared constants in both cpp_unit_test.py and cpp_benchmark.py - Move json import to top level in cpp_benchmark.py - Refactor setup_codspeed_lib.py into focused helper functions - Combine clone + submodule init, use --shallow-submodules
This commit is contained in:
@@ -36,6 +36,15 @@ LOGGER_KEY = "logger"
|
||||
# by component benchmark.yaml files. esphome: allows sub-key merging.
|
||||
BASE_CONFIG_KEYS = frozenset({ESPHOME_KEY, HOST_KEY, LOGGER_KEY})
|
||||
|
||||
# Shared build flag — enables timezone code paths for testing/benchmarking.
|
||||
USE_TIME_TIMEZONE_FLAG = "-DUSE_TIME_TIMEZONE"
|
||||
|
||||
# Components whose to_code should always run during C++ test/benchmark builds.
|
||||
# These are the minimal infrastructure components needed for host compilation.
|
||||
# Note: "core" is the esphome core config module (esphome/core/config.py),
|
||||
# which registers under package name "core" not "esphome".
|
||||
BASE_CODEGEN_COMPONENTS = {"core", "host", "logger"}
|
||||
|
||||
# Exit codes
|
||||
EXIT_OK = 0
|
||||
EXIT_SKIPPED = 1
|
||||
|
||||
Reference in New Issue
Block a user