mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 09:09:10 -04:00
test: temp workaround for linux test apps
This commit is contained in:
parent
b02687a6c4
commit
51adb9ab27
33
conftest.py
33
conftest.py
@ -260,15 +260,20 @@ def build_dir(app_path: str, target: Optional[str], config: Optional[str]) -> st
|
||||
Returns:
|
||||
valid build directory
|
||||
"""
|
||||
|
||||
check_dirs = []
|
||||
if target is not None and config is not None:
|
||||
check_dirs.append(f'build_{target}_{config}')
|
||||
if target is not None:
|
||||
check_dirs.append(f'build_{target}')
|
||||
if config is not None:
|
||||
check_dirs.append(f'build_{config}')
|
||||
check_dirs.append('build')
|
||||
if target == 'linux':
|
||||
# IDF-6644
|
||||
# hard-coded in components/esp_partition/partition_linux.c
|
||||
# const char *partition_table_file_name = "build/partition_table/partition-table.bin";
|
||||
check_dirs = ['build']
|
||||
else:
|
||||
check_dirs = []
|
||||
if target is not None and config is not None:
|
||||
check_dirs.append(f'build_{target}_{config}')
|
||||
if target is not None:
|
||||
check_dirs.append(f'build_{target}')
|
||||
if config is not None:
|
||||
check_dirs.append(f'build_{config}')
|
||||
check_dirs.append('build')
|
||||
|
||||
for check_dir in check_dirs:
|
||||
binary_path = os.path.join(app_path, check_dir)
|
||||
@ -284,6 +289,15 @@ def build_dir(app_path: str, target: Optional[str], config: Optional[str]) -> st
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def linux_cd_into_app_folder(app_path: str, target: Optional[str]) -> None:
|
||||
# IDF-6644
|
||||
# hard-coded in components/esp_partition/partition_linux.c
|
||||
# const char *partition_table_file_name = "build/partition_table/partition-table.bin";
|
||||
if target == 'linux':
|
||||
os.chdir(app_path)
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
@multi_dut_fixture
|
||||
def junit_properties(test_case_name: str, record_xml_attribute: Callable[[str, object], None]) -> None:
|
||||
@ -327,6 +341,7 @@ def check_performance(idf_path: str) -> Callable[[str, float, str], None]:
|
||||
:param target: target chip
|
||||
:raise: AssertionError: if check fails
|
||||
"""
|
||||
|
||||
def _find_perf_item(operator: str, path: str) -> float:
|
||||
with open(path, 'r') as f:
|
||||
data = f.read()
|
||||
|
@ -61,13 +61,18 @@ def get_pytest_apps(
|
||||
app_dirs.sort()
|
||||
|
||||
default_size_json_path = 'size.json'
|
||||
build_dir = 'build_@t_@w'
|
||||
if target == 'linux': # no idf_size.py for linux target
|
||||
default_size_json_path = None # type: ignore
|
||||
# IDF-6644
|
||||
# hard-coded in components/esp_partition/partition_linux.c
|
||||
# const char *partition_table_file_name = "build/partition_table/partition-table.bin";
|
||||
build_dir = 'build'
|
||||
|
||||
apps = find_apps(
|
||||
app_dirs,
|
||||
target=target,
|
||||
build_dir='build_@t_@w',
|
||||
build_dir=build_dir,
|
||||
config_rules_str=config_rules_str,
|
||||
build_log_path='build_log.txt',
|
||||
size_json_path=default_size_json_path,
|
||||
|
Loading…
x
Reference in New Issue
Block a user