mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 05:04:33 +02:00
Merge branch 'ci/rename_log_file_to_txt' into 'master'
ci: use .txt files instead of .log file for better preview Closes IDFCI-1206 See merge request espressif/esp-idf!20847
This commit is contained in:
@@ -93,13 +93,13 @@ test_reproducible_build:
|
|||||||
when: always
|
when: always
|
||||||
paths:
|
paths:
|
||||||
- ${FUZZER_TEST_DIR}/out/crashes
|
- ${FUZZER_TEST_DIR}/out/crashes
|
||||||
- ${FUZZER_TEST_DIR}/fuzz_output.log
|
- ${FUZZER_TEST_DIR}/fuzz_output.txt
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
script:
|
script:
|
||||||
- export AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES=1 && export AFL_SKIP_CPUFREQ=1
|
- export AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES=1 && export AFL_SKIP_CPUFREQ=1
|
||||||
- cd ${FUZZER_TEST_DIR}
|
- cd ${FUZZER_TEST_DIR}
|
||||||
# run AFL fuzzer for one hour
|
# run AFL fuzzer for one hour
|
||||||
- ( ( make ${FUZZER_PARAMS} fuzz | tee fuzz_output.log | grep -v '\(Fuzzing test case\|Entering queue cycle\)' ) || pkill sleep ) &
|
- ( ( make ${FUZZER_PARAMS} fuzz | tee fuzz_output.txt | grep -v '\(Fuzzing test case\|Entering queue cycle\)' ) || pkill sleep ) &
|
||||||
- ( sleep 3600 || mkdir -p out/crashes/env_failed ) && pkill afl-fuz
|
- ( sleep 3600 || mkdir -p out/crashes/env_failed ) && pkill afl-fuz
|
||||||
# check no crashes found
|
# check no crashes found
|
||||||
- test -z "$(ls out/crashes/)" || exit 1
|
- test -z "$(ls out/crashes/)" || exit 1
|
||||||
@@ -386,8 +386,8 @@ test_hello_world_linux_compatible_example:
|
|||||||
- cd ${IDF_PATH}/tools/test_apps/linux_compatible/hello_world_linux_compatible
|
- cd ${IDF_PATH}/tools/test_apps/linux_compatible/hello_world_linux_compatible
|
||||||
- idf.py --preview set-target linux
|
- idf.py --preview set-target linux
|
||||||
- idf.py build
|
- idf.py build
|
||||||
- timeout 15 build/hello_world.elf | tee test.log
|
- timeout 15 build/hello_world.elf | tee test.txt
|
||||||
- grep "Hello world!" test.log
|
- grep "Hello world!" test.txt
|
||||||
|
|
||||||
test_esp_timer_cxx:
|
test_esp_timer_cxx:
|
||||||
extends: .host_test_template
|
extends: .host_test_template
|
||||||
@@ -443,16 +443,16 @@ test_partition_api_host:
|
|||||||
script:
|
script:
|
||||||
- cd ${IDF_PATH}/components/spi_flash/host_test/partition_api_test
|
- cd ${IDF_PATH}/components/spi_flash/host_test/partition_api_test
|
||||||
- idf.py build
|
- idf.py build
|
||||||
- timeout 5 ./build/partition_api_test.elf | tee test.log
|
- timeout 5 ./build/partition_api_test.elf | tee test.txt
|
||||||
- grep " 0 Failures" test.log
|
- grep " 0 Failures" test.txt
|
||||||
|
|
||||||
test_spiffs_host:
|
test_spiffs_host:
|
||||||
extends: .host_test_template
|
extends: .host_test_template
|
||||||
script:
|
script:
|
||||||
- cd ${IDF_PATH}/components/spiffs/host_test
|
- cd ${IDF_PATH}/components/spiffs/host_test
|
||||||
- idf.py build
|
- idf.py build
|
||||||
- timeout 5 ./build/host_test_spiffs.elf | tee test.log
|
- timeout 5 ./build/host_test_spiffs.elf | tee test.txt
|
||||||
- grep " 0 Failures" test.log
|
- grep " 0 Failures" test.txt
|
||||||
|
|
||||||
test_gen_soc_caps_kconfig:
|
test_gen_soc_caps_kconfig:
|
||||||
extends: .host_test_template
|
extends: .host_test_template
|
||||||
|
@@ -10,6 +10,7 @@ addopts =
|
|||||||
--tb short
|
--tb short
|
||||||
--strict-markers
|
--strict-markers
|
||||||
--skip-check-coredump y
|
--skip-check-coredump y
|
||||||
|
--logfile-extension ".txt"
|
||||||
|
|
||||||
# ignore DeprecationWarning
|
# ignore DeprecationWarning
|
||||||
filterwarnings =
|
filterwarnings =
|
||||||
|
@@ -107,7 +107,7 @@ class Env(object):
|
|||||||
dut_config = dict()
|
dut_config = dict()
|
||||||
dut_config.update(dut_init_args)
|
dut_config.update(dut_init_args)
|
||||||
dut = dut_class(dut_name, port,
|
dut = dut_class(dut_name, port,
|
||||||
os.path.join(self.log_path, dut_name + '.log'),
|
os.path.join(self.log_path, dut_name + '.txt'),
|
||||||
app_inst,
|
app_inst,
|
||||||
**dut_config)
|
**dut_config)
|
||||||
self.allocated_duts[dut_name] = {'port': port, 'dut': dut}
|
self.allocated_duts[dut_name] = {'port': port, 'dut': dut}
|
||||||
|
@@ -30,7 +30,7 @@ _COLOR_CODES = {
|
|||||||
|
|
||||||
def _get_log_file_name():
|
def _get_log_file_name():
|
||||||
if Env.Env.CURRENT_LOG_FOLDER:
|
if Env.Env.CURRENT_LOG_FOLDER:
|
||||||
file_name = os.path.join(Env.Env.CURRENT_LOG_FOLDER, 'console.log')
|
file_name = os.path.join(Env.Env.CURRENT_LOG_FOLDER, 'console.txt')
|
||||||
else:
|
else:
|
||||||
raise OSError('env log folder does not exist, will not save to log file')
|
raise OSError('env log folder does not exist, will not save to log file')
|
||||||
return file_name
|
return file_name
|
||||||
|
@@ -27,14 +27,14 @@ def test_idf_gdb(dut: Dut) -> None:
|
|||||||
# Don't need to have output from UART any more
|
# Don't need to have output from UART any more
|
||||||
dut.serial.stop_redirect_thread()
|
dut.serial.stop_redirect_thread()
|
||||||
|
|
||||||
with open(os.path.join(dut.logdir, 'ocd.log'), 'w') as ocd_log:
|
with open(os.path.join(dut.logdir, 'ocd.txt'), 'w') as ocd_log:
|
||||||
ocd = subprocess.Popen(f'openocd {get_openocd_arguments(dut.target)}', stdout=ocd_log, stderr=ocd_log, shell=True)
|
ocd = subprocess.Popen(f'openocd {get_openocd_arguments(dut.target)}', stdout=ocd_log, stderr=ocd_log, shell=True)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
gdb_env = os.environ.copy()
|
gdb_env = os.environ.copy()
|
||||||
gdb_env['ESP_IDF_GDB_TESTING'] = '1'
|
gdb_env['ESP_IDF_GDB_TESTING'] = '1'
|
||||||
|
|
||||||
with open(os.path.join(dut.logdir, 'gdb.log'), 'w') as gdb_log, \
|
with open(os.path.join(dut.logdir, 'gdb.txt'), 'w') as gdb_log, \
|
||||||
pexpect.spawn(f'idf.py -B {dut.app.binary_path} gdb --batch',
|
pexpect.spawn(f'idf.py -B {dut.app.binary_path} gdb --batch',
|
||||||
env=gdb_env,
|
env=gdb_env,
|
||||||
timeout=60,
|
timeout=60,
|
||||||
|
@@ -44,11 +44,11 @@ def test_app_loadable_elf(env, extra_data):
|
|||||||
idf_path = app.get_sdk_path()
|
idf_path = app.get_sdk_path()
|
||||||
proj_path = os.path.join(idf_path, rel_project_path)
|
proj_path = os.path.join(idf_path, rel_project_path)
|
||||||
elf_path = os.path.join(app.binary_path, 'gdb_loadable_elf.elf')
|
elf_path = os.path.join(app.binary_path, 'gdb_loadable_elf.elf')
|
||||||
esp_log_path = os.path.join(proj_path, 'esp.log')
|
esp_log_path = os.path.join(proj_path, 'esp.txt')
|
||||||
|
|
||||||
with SerialThread(esp_log_path):
|
with SerialThread(esp_log_path):
|
||||||
openocd_log = os.path.join(proj_path, 'openocd.log')
|
openocd_log = os.path.join(proj_path, 'openocd.txt')
|
||||||
gdb_log = os.path.join(proj_path, 'gdb.log')
|
gdb_log = os.path.join(proj_path, 'gdb.txt')
|
||||||
gdb_init = os.path.join(proj_path, 'gdbinit_' + target)
|
gdb_init = os.path.join(proj_path, 'gdbinit_' + target)
|
||||||
gdb_dir = os.path.join(proj_path, 'main')
|
gdb_dir = os.path.join(proj_path, 'main')
|
||||||
|
|
||||||
|
@@ -77,7 +77,7 @@ def test_monitor_ide_integration(config: str, dut: Dut) -> None:
|
|||||||
monitor_cmd = ' '.join([sys.executable, monitor_py, os.path.join(dut.app.binary_path, 'panic.elf'),
|
monitor_cmd = ' '.join([sys.executable, monitor_py, os.path.join(dut.app.binary_path, 'panic.elf'),
|
||||||
'--port', str(dut.serial.port),
|
'--port', str(dut.serial.port),
|
||||||
'--ws', f'ws://{WebSocketServer.HOST}:{WebSocketServer.PORT}'])
|
'--ws', f'ws://{WebSocketServer.HOST}:{WebSocketServer.PORT}'])
|
||||||
monitor_log_path = os.path.join(dut.logdir, 'monitor.log')
|
monitor_log_path = os.path.join(dut.logdir, 'monitor.txt')
|
||||||
|
|
||||||
with open(monitor_log_path, 'w') as log, WebSocketServer(), pexpect.spawn(monitor_cmd,
|
with open(monitor_log_path, 'w') as log, WebSocketServer(), pexpect.spawn(monitor_cmd,
|
||||||
logfile=log,
|
logfile=log,
|
||||||
|
Reference in New Issue
Block a user