mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
test(tools): Added minimal supported cmake versions build system tests
Backport of efa75a9b60 to release/v5.5.
Adapted from the master version because of structural differences on
release/v5.5:
- The new jobs are added to .gitlab/ci/host-test.yml (where build-system
pytest jobs live on v5.5) instead of .gitlab/ci/build.yml.
- The minimum supported cmake version is 3.16.3 on v5.5
(cmake_minimum_required(VERSION 3.16) in tools/cmake/project.cmake),
so the new jobs test cmake@3.16.3 instead of 3.22.1.
- The macOS template extraction from the original commit is omitted:
v5.5 already uses .brew-macos-settings for the macOS variables, so
the refactor would be redundant.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
[pytest]
|
||||
addopts = -s -p no:pytest_embedded -p no:idf-ci
|
||||
addopts = -s -p no:idf-ci
|
||||
|
||||
# log related
|
||||
log_cli = True
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
import logging
|
||||
import os
|
||||
@@ -8,7 +8,12 @@ import sys
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
import pexpect
|
||||
if sys.platform == 'win32':
|
||||
import pytest
|
||||
|
||||
pytest.skip('pexpect.spawn is not available on Windows', allow_module_level=True)
|
||||
else:
|
||||
import pexpect
|
||||
|
||||
|
||||
class IdfPyQemuTest(unittest.TestCase):
|
||||
@@ -17,11 +22,9 @@ class IdfPyQemuTest(unittest.TestCase):
|
||||
idf_path = os.environ['IDF_PATH']
|
||||
hello_world_dir = os.path.join(idf_path, 'examples', 'get-started', 'hello_world')
|
||||
idf_py = os.path.join(idf_path, 'tools', 'idf.py')
|
||||
args = [idf_py, '-C', hello_world_dir, '-B', build_dir,
|
||||
'qemu', '--qemu-extra-args', '-no-reboot', 'monitor']
|
||||
args = [idf_py, '-C', hello_world_dir, '-B', build_dir, 'qemu', '--qemu-extra-args', '-no-reboot', 'monitor']
|
||||
logfile_name = os.path.join(os.environ['IDF_PATH'], 'qemu_log.out')
|
||||
with open(logfile_name, 'w+b') as logfile, \
|
||||
pexpect.spawn(sys.executable, args=args, logfile=logfile) as child:
|
||||
with open(logfile_name, 'w+b') as logfile, pexpect.spawn(sys.executable, args=args, logfile=logfile) as child:
|
||||
child.expect_exact('Executing action: all')
|
||||
logging.info('Waiting for the build to finish...')
|
||||
child.expect_exact('Executing action: qemu', timeout=120)
|
||||
@@ -33,8 +36,7 @@ class IdfPyQemuTest(unittest.TestCase):
|
||||
child.expect_exact('Restarting now.')
|
||||
|
||||
args = [idf_py, '-C', hello_world_dir, '-B', build_dir, 'qemu', 'efuse-summary', '--format=summary']
|
||||
with open(logfile_name, 'w+b') as logfile, \
|
||||
pexpect.spawn(sys.executable, args=args, logfile=logfile) as child:
|
||||
with open(logfile_name, 'w+b') as logfile, pexpect.spawn(sys.executable, args=args, logfile=logfile) as child:
|
||||
child.expect_exact('Executing action: efuse-summary')
|
||||
child.expect_exact('WR_DIS (BLOCK0)')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user