feat: Add target test

This commit is contained in:
xysun 2023-07-14 11:41:58 +08:00
parent 417c0fc7a1
commit e166493805
6 changed files with 7914 additions and 7 deletions

View File

@ -1,5 +1,6 @@
stages: stages:
- build - build
- target_test
- build_docs - build_docs
- deploy_docs - deploy_docs
- deploy - deploy
@ -27,9 +28,6 @@ before_script:
- pip install -r test_apps/requirements.txt - pip install -r test_apps/requirements.txt
.build_test_script: &build_test_script
- python ./tools/ci/build_apps.py $EXAMPLES_PATH -t all
.build_test_script: &build_test_script .build_test_script: &build_test_script
- python ./test_apps/build_apps.py $EXAMPLES_PATH -t all - python ./test_apps/build_apps.py $EXAMPLES_PATH -t all
@ -53,7 +51,6 @@ before_script:
- "**/build*/bootloader/*.elf" - "**/build*/bootloader/*.elf"
- "**/build*/partition_table/*.bin" - "**/build*/partition_table/*.bin"
- "**/build*/srmodels/*.bin" - "**/build*/srmodels/*.bin"
- size_info.txt
expire_in: 1 week expire_in: 1 week
variables: variables:
EXAMPLES_PATH: "test_apps" EXAMPLES_PATH: "test_apps"
@ -113,6 +110,22 @@ build_esp_tts:
- <<: *if-protected - <<: *if-protected
- <<: *if-dev-push - <<: *if-dev-push
test_esp_sr:
extends:
- .pytest_template
needs:
- job: "build_esp_sr"
artifacts: true
optional: true
tags:
- 'esp32s3'
image: $DOCKER_TARGET_TEST_v5_0_ENV_IMAGE
variables:
TEST_TARGET: 'esp32s3'
TEST_FOLDER: './test_apps/esp-sr'
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

File diff suppressed because it is too large Load Diff

View File

@ -15,6 +15,7 @@
#include "esp_wn_iface.h" #include "esp_wn_iface.h"
#include "esp_wn_models.h" #include "esp_wn_models.h"
#include "hilexin.h" #include "hilexin.h"
#include "hiesp.h"
#include "dl_lib_convq_queue.h" #include "dl_lib_convq_queue.h"
#include <sys/time.h> #include <sys/time.h>
@ -91,10 +92,21 @@ TEST_CASE("wakenet detect API & cpu loading", "[wn]")
int detected = 0; int detected = 0;
struct timeval tv_start, tv_end; struct timeval tv_start, tv_end;
gettimeofday(&tv_start, NULL); gettimeofday(&tv_start, NULL);
unsigned char* data = NULL;
size_t data_size = 0;
if (strstr(model_name, "hiesp") != NULL) {
data = (unsigned char*)hiesp;
data_size = sizeof(hiesp);
printf("wake word: Hi, ESP, size:%d\n", data_size);
} else if(strstr(model_name, "hilexin") != NULL) {
data = (unsigned char*)hilexin;
data_size = sizeof(hilexin);
printf("wake word: hi,lexin, size:%d\n", data_size);
}
while (1) { while (1) {
if ((chunks + 1)*audio_chunksize <= sizeof(hilexin)) { if ((chunks + 1)*audio_chunksize <= data_size) {
memcpy(buffer, hilexin + chunks * audio_chunksize, audio_chunksize); memcpy(buffer, data + chunks * audio_chunksize, audio_chunksize);
} else { } else {
memset(buffer, 0, audio_chunksize); memset(buffer, 0, audio_chunksize);
} }

View File

@ -7,7 +7,9 @@ from pytest_embedded import Dut
'config', 'config',
[ [
'mn5q8_cn', 'mn5q8_cn',
'mn5q8_en',
'mn6_cn', 'mn6_cn',
'mn6_en',
'mn7_en', 'mn7_en',
], ],
) )
@ -20,7 +22,7 @@ def test_multinet(dut: Dut)-> None:
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
[ [
'mn5q8_cn', 'mn5q8_en',
'wn9_hilexin', 'wn9_hilexin',
], ],
) )

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff