mirror of
https://github.com/espressif/esp-sr.git
synced 2025-09-15 15:28:44 +08:00
Add target test for esp-tts
This commit is contained in:
parent
e166493805
commit
2289b02dd8
1
.gitignore
vendored
1
.gitignore
vendored
@ -31,3 +31,4 @@ test_apps/*/dependencies.lock
|
|||||||
test_apps/*/managed_components
|
test_apps/*/managed_components
|
||||||
test_apps/*/*/build_*
|
test_apps/*/*/build_*
|
||||||
pytest_log
|
pytest_log
|
||||||
|
XUNIT_RESULT.xml
|
||||||
|
|||||||
119
.gitlab-ci.yml
119
.gitlab-ci.yml
@ -2,7 +2,6 @@ stages:
|
|||||||
- build
|
- build
|
||||||
- target_test
|
- target_test
|
||||||
- build_docs
|
- build_docs
|
||||||
- deploy_docs
|
|
||||||
- deploy
|
- deploy
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
@ -25,11 +24,73 @@ before_script:
|
|||||||
- git --version
|
- git --version
|
||||||
- git submodule update --init --recursive --force
|
- git submodule update --init --recursive --force
|
||||||
- pip install idf_build_apps
|
- pip install idf_build_apps
|
||||||
- pip install -r test_apps/requirements.txt
|
|
||||||
|
.if-protected: &if-protected
|
||||||
|
if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/ || $CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/)'
|
||||||
|
|
||||||
|
.if-dev-push: &if-dev-push
|
||||||
|
if: '$CI_COMMIT_REF_NAME != "master" && $CI_COMMIT_BRANCH !~ /^release\/v/ && $CI_COMMIT_TAG !~ /^v\d+\.\d+(\.\d+)?($|-)/ && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event")'
|
||||||
|
|
||||||
|
.if-label-build: &if-label-build
|
||||||
|
if: '$CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*build(?:,[^,\n\r]+)*$/i'
|
||||||
|
|
||||||
|
.patterns-test_esp_tts: &patterns-test_esp_tts
|
||||||
|
- "esp-tts/**/*"
|
||||||
|
- "test_apps/esp-tts/**/*"
|
||||||
|
- "CMakeList.txt"
|
||||||
|
|
||||||
|
.patterns-test_esp_sr: &patterns-test_esp_sr
|
||||||
|
- "lib/**/*"
|
||||||
|
- "include/**/*"
|
||||||
|
- "src/**/*"
|
||||||
|
- "model/**/*"
|
||||||
|
- "test_apps/esp-sr/**/*"
|
||||||
|
- "CMakeList.txt"
|
||||||
|
|
||||||
|
.patterns-build_system: &patterns-build_system
|
||||||
|
- "test_apps/build_apps.py"
|
||||||
|
- "conftest.py"
|
||||||
|
- "pytest.ini"
|
||||||
|
- "CMakeList.txt"
|
||||||
|
|
||||||
|
.patterns-build_docs: &patterns-build_docs
|
||||||
|
- "docs/**/*"
|
||||||
|
|
||||||
|
|
||||||
.build_test_script: &build_test_script
|
.rules:build:test_esp_sr:
|
||||||
- python ./test_apps/build_apps.py $EXAMPLES_PATH -t all
|
rules:
|
||||||
|
- <<: *if-protected
|
||||||
|
- <<: *if-label-build
|
||||||
|
- <<: *if-dev-push
|
||||||
|
changes: *patterns-build_system
|
||||||
|
- <<: *if-dev-push
|
||||||
|
changes: *patterns-test_esp_sr
|
||||||
|
|
||||||
|
.rules:build:test_esp_tts:
|
||||||
|
rules:
|
||||||
|
- <<: *if-protected
|
||||||
|
- <<: *if-label-build
|
||||||
|
- <<: *if-dev-push
|
||||||
|
changes: *patterns-build_system
|
||||||
|
- <<: *if-dev-push
|
||||||
|
changes: *patterns-test_esp_tts
|
||||||
|
|
||||||
|
.rules:build_docs:docs:
|
||||||
|
rules:
|
||||||
|
- <<: *if-protected
|
||||||
|
- <<: *if-label-build
|
||||||
|
- <<: *if-dev-push
|
||||||
|
changes: *patterns-build_docs
|
||||||
|
|
||||||
|
.rules:deploy:docs_preview:
|
||||||
|
rules:
|
||||||
|
- <<: *if-label-build
|
||||||
|
- <<: *if-dev-push
|
||||||
|
changes: *patterns-build_docs
|
||||||
|
|
||||||
|
.rules:deploy:docs_production:
|
||||||
|
rules:
|
||||||
|
- <<: *if-protected
|
||||||
|
|
||||||
.build_test_template:
|
.build_test_template:
|
||||||
stage: build
|
stage: build
|
||||||
@ -55,16 +116,20 @@ before_script:
|
|||||||
variables:
|
variables:
|
||||||
EXAMPLES_PATH: "test_apps"
|
EXAMPLES_PATH: "test_apps"
|
||||||
script:
|
script:
|
||||||
- *build_test_script
|
- python ./test_apps/build_apps.py $EXAMPLES_PATH -t all
|
||||||
|
|
||||||
build_esp_sr:
|
build_esp_sr:
|
||||||
extends: .build_test_template
|
extends:
|
||||||
|
- .build_test_template
|
||||||
|
- .rules:build:test_esp_sr
|
||||||
image: espressif/idf:release-v5.0
|
image: espressif/idf:release-v5.0
|
||||||
variables:
|
variables:
|
||||||
EXAMPLES_PATH: "test_apps/esp-sr"
|
EXAMPLES_PATH: "test_apps/esp-sr"
|
||||||
|
|
||||||
build_esp_tts:
|
build_esp_tts:
|
||||||
extends: .build_test_template
|
extends:
|
||||||
|
- .build_test_template
|
||||||
|
- .rules:build:test_esp_tts
|
||||||
image: espressif/idf:release-v5.0
|
image: espressif/idf:release-v5.0
|
||||||
variables:
|
variables:
|
||||||
EXAMPLES_PATH: "test_apps/esp-tts"
|
EXAMPLES_PATH: "test_apps/esp-tts"
|
||||||
@ -98,21 +163,13 @@ build_esp_tts:
|
|||||||
TEST_FOLDER: 'test_apps'
|
TEST_FOLDER: 'test_apps'
|
||||||
TEST_ENV: 'esp32s3'
|
TEST_ENV: 'esp32s3'
|
||||||
script:
|
script:
|
||||||
|
- pip install -r test_apps/requirements.txt
|
||||||
- pytest ${TEST_FOLDER} --target ${TEST_TARGET} --env ${TEST_ENV} --junitxml=XUNIT_RESULT.xml
|
- pytest ${TEST_FOLDER} --target ${TEST_TARGET} --env ${TEST_ENV} --junitxml=XUNIT_RESULT.xml
|
||||||
|
|
||||||
.if-dev-push: &if-dev-push
|
|
||||||
if: '$CI_COMMIT_REF_NAME != "master" && $CI_COMMIT_BRANCH !~ /^release\/v/ && $CI_COMMIT_TAG !~ /^v\d+\.\d+(\.\d+)?($|-)/ && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event")'
|
|
||||||
.if-protected: &if-protected
|
|
||||||
if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/ || $CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/)'
|
|
||||||
|
|
||||||
.rules:test:test_esp_sr:
|
|
||||||
rules:
|
|
||||||
- <<: *if-protected
|
|
||||||
- <<: *if-dev-push
|
|
||||||
|
|
||||||
test_esp_sr:
|
test_esp_sr:
|
||||||
extends:
|
extends:
|
||||||
- .pytest_template
|
- .pytest_template
|
||||||
|
- .rules:build:test_esp_sr
|
||||||
needs:
|
needs:
|
||||||
- job: "build_esp_sr"
|
- job: "build_esp_sr"
|
||||||
artifacts: true
|
artifacts: true
|
||||||
@ -126,6 +183,23 @@ test_esp_sr:
|
|||||||
TEST_ENV: 'esp32s3'
|
TEST_ENV: 'esp32s3'
|
||||||
IDF_VERSION: "5.0"
|
IDF_VERSION: "5.0"
|
||||||
|
|
||||||
|
test_esp_tts:
|
||||||
|
extends:
|
||||||
|
- .pytest_template
|
||||||
|
- .rules:build:test_esp_tts
|
||||||
|
needs:
|
||||||
|
- job: "build_esp_tts"
|
||||||
|
artifacts: true
|
||||||
|
optional: true
|
||||||
|
tags:
|
||||||
|
- 'esp32s3'
|
||||||
|
image: $DOCKER_TARGET_TEST_v5_0_ENV_IMAGE
|
||||||
|
variables:
|
||||||
|
TEST_TARGET: 'esp32s3'
|
||||||
|
TEST_FOLDER: './test_apps/esp-tts'
|
||||||
|
TEST_ENV: 'esp32s3'
|
||||||
|
IDF_VERSION: "5.0"
|
||||||
|
|
||||||
.build_doc_template:
|
.build_doc_template:
|
||||||
stage: build_docs
|
stage: build_docs
|
||||||
image: $ESP_DOCS_ENV_IMAGE
|
image: $ESP_DOCS_ENV_IMAGE
|
||||||
@ -133,6 +207,7 @@ test_esp_sr:
|
|||||||
build_esp_sr_html:
|
build_esp_sr_html:
|
||||||
extends:
|
extends:
|
||||||
- .build_doc_template
|
- .build_doc_template
|
||||||
|
- .rules:build_docs:docs
|
||||||
variables:
|
variables:
|
||||||
DOCS_DIR: $CI_PROJECT_DIR/docs
|
DOCS_DIR: $CI_PROJECT_DIR/docs
|
||||||
artifacts:
|
artifacts:
|
||||||
@ -154,6 +229,7 @@ build_esp_sr_html:
|
|||||||
build_esp_sr_pdf:
|
build_esp_sr_pdf:
|
||||||
extends:
|
extends:
|
||||||
- .build_doc_template
|
- .build_doc_template
|
||||||
|
- .rules:build_docs:docs
|
||||||
variables:
|
variables:
|
||||||
DOCS_DIR: $CI_PROJECT_DIR/docs
|
DOCS_DIR: $CI_PROJECT_DIR/docs
|
||||||
artifacts:
|
artifacts:
|
||||||
@ -174,7 +250,7 @@ build_esp_sr_pdf:
|
|||||||
|
|
||||||
|
|
||||||
.deploy_docs_template:
|
.deploy_docs_template:
|
||||||
stage: deploy_docs
|
stage: deploy
|
||||||
image: $ESP_DOCS_ENV_IMAGE
|
image: $ESP_DOCS_ENV_IMAGE
|
||||||
tags:
|
tags:
|
||||||
- deploy_docs
|
- deploy_docs
|
||||||
@ -191,9 +267,7 @@ build_esp_sr_pdf:
|
|||||||
deploy_docs_preview:
|
deploy_docs_preview:
|
||||||
extends:
|
extends:
|
||||||
- .deploy_docs_template
|
- .deploy_docs_template
|
||||||
except:
|
- .rules:deploy:docs_preview
|
||||||
refs:
|
|
||||||
- master
|
|
||||||
variables:
|
variables:
|
||||||
TYPE: "preview"
|
TYPE: "preview"
|
||||||
DOCS_BUILD_DIR: "${CI_PROJECT_DIR}/docs/_build/"
|
DOCS_BUILD_DIR: "${CI_PROJECT_DIR}/docs/_build/"
|
||||||
@ -206,8 +280,7 @@ deploy_docs_preview:
|
|||||||
deploy_docs_production:
|
deploy_docs_production:
|
||||||
extends:
|
extends:
|
||||||
- .deploy_docs_template
|
- .deploy_docs_template
|
||||||
only:
|
- .rules:deploy:docs_production
|
||||||
- master
|
|
||||||
variables:
|
variables:
|
||||||
TYPE: "production"
|
TYPE: "production"
|
||||||
DOCS_BUILD_DIR: "${CI_PROJECT_DIR}/docs/_build/"
|
DOCS_BUILD_DIR: "${CI_PROJECT_DIR}/docs/_build/"
|
||||||
|
|||||||
@ -14,7 +14,10 @@ from pytest_embedded import Dut
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_multinet(dut: Dut)-> None:
|
def test_multinet(dut: Dut)-> None:
|
||||||
dut.run_all_single_board_cases(group="mn")
|
# dut.run_all_single_board_cases(group="mn")
|
||||||
|
dut.expect_exact('Press ENTER to see the list of tests.')
|
||||||
|
dut.write('[mn]')
|
||||||
|
dut.expect_unity_test_output(timeout = 1000)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.target('esp32s3')
|
@pytest.mark.target('esp32s3')
|
||||||
@ -27,7 +30,10 @@ def test_multinet(dut: Dut)-> None:
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_wakenet(dut: Dut)-> None:
|
def test_wakenet(dut: Dut)-> None:
|
||||||
dut.run_all_single_board_cases(group="wn")
|
# dut.run_all_single_board_cases(group="wn")
|
||||||
|
dut.expect_exact('Press ENTER to see the list of tests.')
|
||||||
|
dut.write('[wn]')
|
||||||
|
dut.expect_unity_test_output(timeout = 1000)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.target('esp32s3')
|
@pytest.mark.target('esp32s3')
|
||||||
@ -39,4 +45,7 @@ def test_wakenet(dut: Dut)-> None:
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_afe(dut: Dut)-> None:
|
def test_afe(dut: Dut)-> None:
|
||||||
dut.run_all_single_board_cases(group="afe")
|
# dut.run_all_single_board_cases(group="afe")
|
||||||
|
dut.expect_exact('Press ENTER to see the list of tests.')
|
||||||
|
dut.write('[afe]')
|
||||||
|
dut.expect_unity_test_output(timeout = 1000)
|
||||||
|
|||||||
@ -10,4 +10,7 @@ from pytest_embedded import Dut
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_tts(dut: Dut)-> None:
|
def test_tts(dut: Dut)-> None:
|
||||||
dut.run_all_single_board_cases(group="tts")
|
# dut.run_all_single_board_cases(group="tts")
|
||||||
|
dut.expect_exact('Press ENTER to see the list of tests.')
|
||||||
|
dut.write('[tts]')
|
||||||
|
dut.expect_unity_test_output(timeout = 1000)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user