mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-05 12:25:03 +02:00
Merge branch 'ci/split_assign_test_and_add_c3_integration_test' into 'master'
ci: split assign test and add esp32c3 integration tests See merge request espressif/esp-idf!16664
This commit is contained in:
@@ -84,11 +84,13 @@ if __name__ == '__main__':
|
||||
|
||||
ref_to_use = ''
|
||||
for candidate in candidate_branches:
|
||||
# check if candidate branch exists
|
||||
branch_match = subprocess.check_output(['git', 'branch', '-a', '--list', 'origin/' + candidate])
|
||||
if branch_match:
|
||||
# check if the branch, tag or commit exists
|
||||
try:
|
||||
subprocess.check_call(['git', 'cat-file', '-t', candidate], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
ref_to_use = candidate
|
||||
break
|
||||
except subprocess.CalledProcessError:
|
||||
continue
|
||||
|
||||
if ref_to_use:
|
||||
for _ in range(RETRY_COUNT):
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# CI
|
||||
ESP32.NIMBLE_GATT_60015
|
||||
ESP32.BLUEDROID_GAP_03003
|
||||
ESP32.BTPROF_A2DP_04011
|
||||
ESP32.BTPROF_A2DP_05011
|
||||
|
||||
ESP32C3.NIMBLE_GAP_14009
|
||||
@@ -0,0 +1,21 @@
|
||||
# Integration Test Description
|
||||
|
||||
## Case Lists
|
||||
- WiFi Standard cases for only esp32.
|
||||
- BLE Standard cases for esp32 and esp32c3.
|
||||
|
||||
## Trigger
|
||||
- By labels:
|
||||
- `integration_test`
|
||||
- By file changes:
|
||||
- integration test related files
|
||||
- By bot:
|
||||
- `@bot test with label: integration_test`
|
||||
|
||||
## Advanced
|
||||
- There are labels can be used to run less integration test cases.
|
||||
- These labels only take effect when the integration test has been triggered.
|
||||
- label: `integration::wifi_only`
|
||||
- Only run WiFi cases.
|
||||
- label: `integration::ble_only`
|
||||
- Only run BLE cases.
|
||||
@@ -0,0 +1,67 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import argparse
|
||||
import os
|
||||
|
||||
import gitlab
|
||||
import gitlab_api
|
||||
from AutoTestScript.RunnerConfigs.Config import Config
|
||||
|
||||
SSC_BUILD_JOB_MAP = {
|
||||
'ESP32': 'build_ssc_esp32',
|
||||
'ESP32C3': 'build_ssc_esp32c3',
|
||||
}
|
||||
NEEDED_FILES = [
|
||||
'flasher_args.json',
|
||||
'bootloader/bootloader.bin',
|
||||
'partition_table/partition-table.bin',
|
||||
'ssc.bin',
|
||||
'ssc.elf',
|
||||
]
|
||||
IDF_PATH = os.environ.get('IDF_PATH')
|
||||
|
||||
|
||||
def try_to_download_artifacts(bin_path: str) -> None:
|
||||
'''
|
||||
bin_path: "SSC/ssc_bin/ESP32[C3]/SSC[_APP]"
|
||||
'''
|
||||
project_id = os.getenv('CI_PROJECT_ID')
|
||||
pipeline_id = os.getenv('CI_PIPELINE_ID')
|
||||
gitlab_inst = gitlab_api.Gitlab(project_id)
|
||||
build_job_name = SSC_BUILD_JOB_MAP[bin_path.split('/')[-2]]
|
||||
job_list = gitlab_inst.find_job_id(build_job_name, pipeline_id=pipeline_id)
|
||||
files_to_download = [os.path.join(bin_path, f) for f in NEEDED_FILES]
|
||||
for job_info in job_list:
|
||||
try:
|
||||
gitlab_inst.download_artifact(job_info['id'], files_to_download, IDF_PATH)
|
||||
print('Downloaded {} from {}'.format(bin_path, job_info['id']))
|
||||
break
|
||||
except gitlab.exceptions.GitlabError as e:
|
||||
if e.response_code == 404:
|
||||
continue
|
||||
raise
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
'test_config_file',
|
||||
help='The test config file to be used.'
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
configs = Config.parse(args.test_config_file)
|
||||
test_bin_paths = configs.get_bin_paths()
|
||||
|
||||
for _path in test_bin_paths:
|
||||
if os.path.exists(_path):
|
||||
continue
|
||||
relative_path = os.path.relpath(_path, IDF_PATH)
|
||||
try_to_download_artifacts(relative_path)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,11 @@
|
||||
BinPath:
|
||||
path: SSC/ssc_bin/ESP32/SSC_BLE_WIFI
|
||||
test app: SSC_BLE_WIFI
|
||||
|
||||
DUT: [SSC1]
|
||||
|
||||
Filter:
|
||||
- Add:
|
||||
SDK: ESP32_IDF
|
||||
Test App: SSC_BLE_WIFI
|
||||
summary: 'use old NVS data WIFI function test'
|
||||
@@ -29,7 +29,7 @@ def retry(func: TR) -> TR:
|
||||
if e.response_code == 500:
|
||||
# retry on this error
|
||||
pass
|
||||
elif e.response_code == 404:
|
||||
elif e.response_code == 404 and os.environ.get('LOCAL_GITLAB_HTTPS_HOST', None):
|
||||
# remove the environment variable "LOCAL_GITLAB_HTTPS_HOST" and retry
|
||||
os.environ.pop('LOCAL_GITLAB_HTTPS_HOST', None)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user