Skip to content

Commit 7eb7108

Browse files
committed
Merge branch 'feature/master_test_macos_virtualization' into 'master'
master(6.0): Migrate macOS to VM parallels See merge request espressif/esp-idf!39373
2 parents 81ee3bb + c205f50 commit 7eb7108

File tree

6 files changed

+16
-9
lines changed

6 files changed

+16
-9
lines changed

.gitlab/ci/build.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,18 @@ pytest_build_system_macos:
231231
- .after_script:build:macos:upload-failed-job-logs:ccache-show-stats
232232
- .rules:build:macos
233233
tags:
234-
- macos_shell
234+
- macos
235235
parallel: 3
236236
variables:
237237
PYENV_VERSION: "3.9"
238238
# CCACHE_DIR: "/cache/idf_ccache". On macOS, you cannot write to this folder due to insufficient permissions.
239239
CCACHE_DIR: "" # ccache will use "$HOME/Library/Caches/ccache".
240240
CCACHE_MAXSIZE: "5G" # To preserve the limited Macbook storage. CCACHE automatically prunes old caches to fit the set limit.
241+
# Workaround for a bug in Parallels executor where CI_PROJECT_DIR is not an absolute path,
242+
# but a relative path to the build directory (builds/espressif/esp-idf instead of ~/builds/espressif/esp-idf.
243+
# GitLab sets the project dir to this template `<builds_dir>/<namespace>/<project_name>`
244+
IDF_PATH: "/Users/espressif/builds/espressif/esp-idf"
245+
241246
build_docker:
242247
extends:
243248
- .before_script:minimal

.gitlab/ci/common.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,6 @@ variables:
243243
# Ensure pyenv and PYENV_VERSION installed
244244
- eval "$(pyenv init -)"
245245
- *common-before_scripts
246-
# On macOS, these tools need to be installed
247-
- export IDF_TOOLS_PATH="${HOME}/.espressif_runner_${CI_RUNNER_ID}_${CI_CONCURRENT_ID}"
248246
# remove idf-env.json, since it may contains enabled "features"
249247
- rm -f $IDF_TOOLS_PATH/idf-env.json
250248
# This adds tools (compilers) and the version-specific Python environment to PATH

.gitlab/ci/host-test.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ test_pytest_macos:
348348
- .host_test_template
349349
- .before_script:build:macos
350350
tags:
351-
- macos_shell
351+
- macos
352352
artifacts:
353353
paths:
354354
- XUNIT_RESULT.xml
@@ -359,18 +359,22 @@ test_pytest_macos:
359359
variables:
360360
PYENV_VERSION: "3.9"
361361
PYTEST_IGNORE_COLLECT_IMPORT_ERROR: "1"
362+
# Workaround for a bug in Parallels executor where CI_PROJECT_DIR is not an absolute path,
363+
# but a relative path to the build directory (builds/espressif/esp-idf instead of ~/builds/espressif/esp-idf.
364+
# GitLab sets the project dir to this template `<builds_dir>/<namespace>/<project_name>`
365+
IDF_PATH: "/Users/espressif/builds/espressif/esp-idf"
362366
script:
363367
- run_cmd python tools/ci/ci_build_apps.py components examples tools/test_apps -v
364368
--target linux
365369
--pytest-apps
366-
-m \"host_test and macos_shell\"
370+
-m \"host_test and macos\"
367371
--collect-app-info "list_job_${CI_JOB_NAME_SLUG}.txt"
368372
--modified-components ${MR_MODIFIED_COMPONENTS}
369373
--modified-files ${MR_MODIFIED_FILES}
370374
- python tools/ci/get_known_failure_cases_file.py
371375
- run_cmd pytest
372376
--target linux
373-
-m \"host_test and macos_shell\"
377+
-m \"host_test and macos\"
374378
--junitxml=XUNIT_RESULT.xml
375379
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
376380
--app-info-filepattern \"list_job_*.txt\"

examples/get-started/hello_world/pytest_hello_world.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def test_hello_world_linux(dut: IdfDut) -> None:
2525

2626

2727
@pytest.mark.host_test
28-
@pytest.mark.macos_shell
28+
@pytest.mark.macos
2929
@idf_parametrize('target', ['linux'], indirect=['target'])
3030
def test_hello_world_macos(dut: IdfDut) -> None:
3131
dut.expect('Hello world!')

tools/ci/configure_ci_environment.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fi
3535

3636
# https://ccache.dev/manual/latest.html#_configuring_ccache
3737
# Set ccache base directory to the project checkout path, to cancel out differences between runners
38-
export CCACHE_BASEDIR="${CI_PROJECT_DIR}"
38+
export CCACHE_BASEDIR="${IDF_PATH}"
3939

4040
# host mapping volume to share ccache fbetween runner concurrent jobs
4141
export CCACHE_SLOPPINESS="time_macros"

tools/ci/idf_pytest/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
ENV_MARKERS = {
6464
# special markers
6565
'qemu': 'build and test using qemu, not real target',
66-
'macos_shell': 'tests should be run on macos hosts',
66+
'macos': 'tests should be run on macos hosts',
6767
# single-dut markers
6868
'generic': 'tests should be run on generic runners',
6969
'flash_suspend': 'support flash suspend feature',

0 commit comments

Comments
 (0)