mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
ci: preserve artifacts for local test apps
build ble_mesh_console example on c3 as well add test dir examples/bluetooth/esp_ble_mesh/ble_mesh_console add test dir examples/bluetooth/hci/controller_hci_uart_esp32
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
| Supported Targets | ESP32 |
|
| Supported Targets | ESP32 | ESP32-C3 |
|
||||||
| ----------------- | ----- |
|
| ----------------- | ----- | -------- |
|
||||||
|
|
||||||
# ble mesh node console demo
|
# ble mesh node console demo
|
||||||
## Introduction
|
## Introduction
|
||||||
|
@ -1,21 +1,12 @@
|
|||||||
// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD
|
/*
|
||||||
//
|
* SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
*
|
||||||
// you may not use this file except in compliance with the License.
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
// You may obtain a copy of the License at
|
*/
|
||||||
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
#include "freertos/queue.h"
|
#include "freertos/queue.h"
|
||||||
#include "freertos/xtensa_api.h"
|
|
||||||
#include "freertos/FreeRTOSConfig.h"
|
#include "freertos/FreeRTOSConfig.h"
|
||||||
|
|
||||||
#include "esp_ble_mesh_networking_api.h"
|
#include "esp_ble_mesh_networking_api.h"
|
||||||
|
@ -3403,7 +3403,6 @@ examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_console_main.c
|
|||||||
examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_console_system.c
|
examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_console_system.c
|
||||||
examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_reg_cfg_client_cmd.c
|
examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_reg_cfg_client_cmd.c
|
||||||
examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_reg_gen_onoff_client_cmd.c
|
examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_reg_gen_onoff_client_cmd.c
|
||||||
examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_reg_test_perf_client_cmd.c
|
|
||||||
examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_register_cmd.c
|
examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_register_cmd.c
|
||||||
examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_register_server_cmd.c
|
examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_register_server_cmd.c
|
||||||
examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/register_bluetooth.c
|
examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/register_bluetooth.c
|
||||||
|
@ -137,11 +137,15 @@ scan_tests:
|
|||||||
TEST_APPS_TEST_DIR: ${CI_PROJECT_DIR}/tools/test_apps
|
TEST_APPS_TEST_DIR: ${CI_PROJECT_DIR}/tools/test_apps
|
||||||
TEST_APPS_OUTPUT_DIR: ${CI_PROJECT_DIR}/tools/test_apps/test_configs
|
TEST_APPS_OUTPUT_DIR: ${CI_PROJECT_DIR}/tools/test_apps/test_configs
|
||||||
COMPONENT_UT_OUTPUT_DIR: ${CI_PROJECT_DIR}/component_ut/test_configs
|
COMPONENT_UT_OUTPUT_DIR: ${CI_PROJECT_DIR}/component_ut/test_configs
|
||||||
|
EXTRA_TEST_DIRS: >-
|
||||||
|
examples/bluetooth/esp_ble_mesh/ble_mesh_console
|
||||||
|
examples/bluetooth/hci/controller_hci_uart_esp32
|
||||||
|
examples/wifi/iperf
|
||||||
PYTHON_VER: 3
|
PYTHON_VER: 3
|
||||||
script:
|
script:
|
||||||
- set_component_ut_vars
|
- set_component_ut_vars
|
||||||
- python $CI_SCAN_TESTS_PY example_test $EXAMPLE_TEST_DIR -b make --exclude examples/build_system/idf_as_lib -c $TEST_CONFIG_FILE -o $EXAMPLE_TEST_OUTPUT_DIR
|
- python $CI_SCAN_TESTS_PY example_test $EXAMPLE_TEST_DIR -b make --exclude examples/build_system/idf_as_lib -c $TEST_CONFIG_FILE -o $EXAMPLE_TEST_OUTPUT_DIR
|
||||||
- python $CI_SCAN_TESTS_PY example_test $EXAMPLE_TEST_DIR -b cmake --exclude examples/build_system/idf_as_lib -c $TEST_CONFIG_FILE -o $EXAMPLE_TEST_OUTPUT_DIR
|
- python $CI_SCAN_TESTS_PY example_test $EXAMPLE_TEST_DIR -b cmake --exclude examples/build_system/idf_as_lib -c $TEST_CONFIG_FILE -o $EXAMPLE_TEST_OUTPUT_DIR --extra_test_dirs $EXTRA_TEST_DIRS
|
||||||
- python $CI_SCAN_TESTS_PY test_apps $TEST_APPS_TEST_DIR -c $TEST_CONFIG_FILE -o $TEST_APPS_OUTPUT_DIR
|
- python $CI_SCAN_TESTS_PY test_apps $TEST_APPS_TEST_DIR -c $TEST_CONFIG_FILE -o $TEST_APPS_OUTPUT_DIR
|
||||||
- python $CI_SCAN_TESTS_PY component_ut $COMPONENT_UT_DIRS --exclude $COMPONENT_UT_EXCLUDES -c $TEST_CONFIG_FILE -o $COMPONENT_UT_OUTPUT_DIR
|
- python $CI_SCAN_TESTS_PY component_ut $COMPONENT_UT_DIRS --exclude $COMPONENT_UT_EXCLUDES -c $TEST_CONFIG_FILE -o $COMPONENT_UT_OUTPUT_DIR
|
||||||
|
|
||||||
|
@ -94,7 +94,9 @@ def main(): # type: () -> None
|
|||||||
help='output path of the scan result')
|
help='output path of the scan result')
|
||||||
parser.add_argument('--exclude', nargs='*',
|
parser.add_argument('--exclude', nargs='*',
|
||||||
help='Ignore specified directory. Can be used multiple times.')
|
help='Ignore specified directory. Can be used multiple times.')
|
||||||
parser.add_argument('--preserve', action='store_true',
|
parser.add_argument('--extra_test_dirs', nargs='*',
|
||||||
|
help='Additional directories to preserve artifacts for local tests')
|
||||||
|
parser.add_argument('--preserve_all', action='store_true',
|
||||||
help='add this flag to preserve artifacts for all apps')
|
help='add this flag to preserve artifacts for all apps')
|
||||||
parser.add_argument('--build-all', action='store_true',
|
parser.add_argument('--build-all', action='store_true',
|
||||||
help='add this flag to build all apps')
|
help='add this flag to build all apps')
|
||||||
@ -116,7 +118,8 @@ def main(): # type: () -> None
|
|||||||
output_json([], target, args.build_system, args.output_path)
|
output_json([], target, args.build_system, args.output_path)
|
||||||
SystemExit(0)
|
SystemExit(0)
|
||||||
|
|
||||||
paths = set([os.path.join(str(os.getenv('IDF_PATH')), path) if not os.path.isabs(path) else path for path in args.paths])
|
idf_path = str(os.getenv('IDF_PATH'))
|
||||||
|
paths = set([os.path.join(idf_path, path) if not os.path.isabs(path) else path for path in args.paths])
|
||||||
|
|
||||||
test_cases = []
|
test_cases = []
|
||||||
for path in paths:
|
for path in paths:
|
||||||
@ -126,7 +129,6 @@ def main(): # type: () -> None
|
|||||||
assign = _TestAppsAssignTest(path, args.ci_config_file)
|
assign = _TestAppsAssignTest(path, args.ci_config_file)
|
||||||
else:
|
else:
|
||||||
raise SystemExit(1) # which is impossible
|
raise SystemExit(1) # which is impossible
|
||||||
|
|
||||||
test_cases.extend(assign.search_cases())
|
test_cases.extend(assign.search_cases())
|
||||||
|
|
||||||
'''
|
'''
|
||||||
@ -150,15 +152,16 @@ def main(): # type: () -> None
|
|||||||
|
|
||||||
if build_test_case_apps:
|
if build_test_case_apps:
|
||||||
scan_info_dict[target]['test_case_apps'] = set()
|
scan_info_dict[target]['test_case_apps'] = set()
|
||||||
|
test_dirs = args.extra_test_dirs if args.extra_test_dirs else []
|
||||||
for case in test_cases:
|
for case in test_cases:
|
||||||
app_dir = case.case_info['app_dir']
|
if case.case_info['target'].lower() == target.lower():
|
||||||
app_target = case.case_info['target']
|
test_dirs.append(case.case_info['app_dir'])
|
||||||
if app_target.lower() != target.lower():
|
for app_dir in test_dirs:
|
||||||
continue
|
app_dir = os.path.join(idf_path, app_dir) if not os.path.isabs(app_dir) else app_dir
|
||||||
_apps = find_apps(build_system_class, app_dir, True, exclude_apps, target.lower())
|
_apps = find_apps(build_system_class, app_dir, True, exclude_apps, target.lower())
|
||||||
if _apps:
|
if _apps:
|
||||||
scan_info_dict[target]['test_case_apps'].update(_apps)
|
scan_info_dict[target]['test_case_apps'].update(_apps)
|
||||||
exclude_apps.append(app_dir)
|
exclude_apps.extend(_apps)
|
||||||
else:
|
else:
|
||||||
scan_info_dict[target]['test_case_apps'] = set()
|
scan_info_dict[target]['test_case_apps'] = set()
|
||||||
|
|
||||||
@ -169,7 +172,6 @@ def main(): # type: () -> None
|
|||||||
find_apps(build_system_class, path, True, exclude_apps, target.lower()))
|
find_apps(build_system_class, path, True, exclude_apps, target.lower()))
|
||||||
else:
|
else:
|
||||||
scan_info_dict[target]['standalone_apps'] = set()
|
scan_info_dict[target]['standalone_apps'] = set()
|
||||||
|
|
||||||
test_case_apps_preserve_default = True if build_system == 'cmake' else False
|
test_case_apps_preserve_default = True if build_system == 'cmake' else False
|
||||||
for target in SUPPORTED_TARGETS:
|
for target in SUPPORTED_TARGETS:
|
||||||
apps = []
|
apps = []
|
||||||
@ -178,14 +180,14 @@ def main(): # type: () -> None
|
|||||||
'app_dir': app_dir,
|
'app_dir': app_dir,
|
||||||
'build_system': args.build_system,
|
'build_system': args.build_system,
|
||||||
'target': target,
|
'target': target,
|
||||||
'preserve': args.preserve or test_case_apps_preserve_default
|
'preserve': args.preserve_all or test_case_apps_preserve_default
|
||||||
})
|
})
|
||||||
for app_dir in scan_info_dict[target]['standalone_apps']:
|
for app_dir in scan_info_dict[target]['standalone_apps']:
|
||||||
apps.append({
|
apps.append({
|
||||||
'app_dir': app_dir,
|
'app_dir': app_dir,
|
||||||
'build_system': args.build_system,
|
'build_system': args.build_system,
|
||||||
'target': target,
|
'target': target,
|
||||||
'preserve': args.preserve
|
'preserve': args.preserve_all
|
||||||
})
|
})
|
||||||
output_path = os.path.join(args.output_path, 'scan_{}_{}.json'.format(target.lower(), build_system))
|
output_path = os.path.join(args.output_path, 'scan_{}_{}.json'.format(target.lower(), build_system))
|
||||||
with open(output_path, 'w') as fw:
|
with open(output_path, 'w') as fw:
|
||||||
|
Reference in New Issue
Block a user