integrate unit test to CI

This commit is contained in:
Yinling 2016-11-01 19:30:42 +08:00
parent c7f8d206ed
commit 5784586041
19 changed files with 699 additions and 85 deletions

View File

@ -1,5 +1,6 @@
stages:
- build
- unit_test
- test
- deploy
@ -75,6 +76,23 @@ build_ssc:
- chmod +x gen_misc_ng.sh
- ./gen_misc_ng.sh
build_esp_idf_tests:
<<: *build_template
artifacts:
paths:
- ./esp-idf-tests/build/*.bin
- ./esp-idf-tests/build/*.elf
- ./esp-idf-tests/build/*.map
- ./esp-idf-tests/build/bootloader/*.bin
expire_in: 6 mos
script:
- git clone $GITLAB_SSH_SERVER/idf/esp-idf-tests.git
- cd esp-idf-tests
- git checkout ${CI_BUILD_REF_NAME} || echo "Using default branch..."
- make defconfig
- make
build_examples:
<<: *build_template
artifacts:
@ -176,7 +194,7 @@ push_master_to_github:
APP_NAME: "ssc"
LOG_PATH: "$CI_PROJECT_DIR/$CI_BUILD_REF"
# append test level folder to TEST_CASE_FILE_PATH in before_script of test job
TEST_CASE_FILE_PATH: "$CI_PROJECT_DIR/components/idf_test"
TEST_CASE_FILE_PATH: "$CI_PROJECT_DIR/components/idf_test/integration_test"
# jobs MUST set CONFIG_FILE in before_script, and overwrite the variables above if necessary
artifacts:
@ -222,13 +240,34 @@ push_master_to_github:
# run test
- python CIRunner.py -l $LOG_PATH -c $CONFIG_FILE -e $LOCAL_ENV_CONFIG_PATH -t $TEST_CASE_FILE_PATH bin_path $APP_NAME $BIN_PATH
# template for unit test jobs
.unit_test_template: &unit_test_template
<<: *test_template
allow_failure: false
stage: unit_test
variables:
# jobs MUST set CONFIG_FILE in before_script, and overwrite the variables above if necessary
LOCAL_ENV_CONFIG_PATH: /home/gitlab-runner/LocalConfig/ESP32_IDF
BIN_PATH: "$CI_PROJECT_DIR/esp-idf-tests/build/"
LOG_PATH: "$CI_PROJECT_DIR/$CI_BUILD_REF"
APP_NAME: "ut"
TEST_CASE_FILE_PATH: "$CI_PROJECT_DIR/components/idf_test/unit_test"
UT_Function_SYS_01:
<<: *test_template
tags:
- ESP32_IDF
- UT_T1_1
before_script:
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/UT_Function_SYS_01.yml
IT_Function_SYS_01:
<<: *test_template
tags:
- ESP32_IDF
- SSC_T1_1
before_script:
- TEST_CASE_FILE_PATH=$TEST_CASE_FILE_PATH/integration_test
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_SYS_01.yml
IT_Function_WIFI_01:
@ -238,7 +277,6 @@ IT_Function_WIFI_01:
- SSC_T1_1
- SSC_T2_1
before_script:
- TEST_CASE_FILE_PATH=$TEST_CASE_FILE_PATH/integration_test
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_WIFI_01.yml
IT_Function_WIFI_02:
@ -248,7 +286,6 @@ IT_Function_WIFI_02:
- SSC_T1_1
- SSC_T2_1
before_script:
- TEST_CASE_FILE_PATH=$TEST_CASE_FILE_PATH/integration_test
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_WIFI_02.yml
IT_Function_TCPIP_01:
@ -258,7 +295,6 @@ IT_Function_TCPIP_01:
- SSC_T1_1
- SSC_T2_1
before_script:
- TEST_CASE_FILE_PATH=$TEST_CASE_FILE_PATH/integration_test
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_01.yml
IT_Function_TCPIP_02:
@ -268,7 +304,6 @@ IT_Function_TCPIP_02:
- SSC_T1_1
- SSC_T2_1
before_script:
- TEST_CASE_FILE_PATH=$TEST_CASE_FILE_PATH/integration_test
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_02.yml
IT_Function_TCPIP_03:
@ -278,7 +313,6 @@ IT_Function_TCPIP_03:
- SSC_T1_1
- SSC_T2_1
before_script:
- TEST_CASE_FILE_PATH=$TEST_CASE_FILE_PATH/integration_test
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_03.yml
IT_Function_TCPIP_04:
@ -288,7 +322,6 @@ IT_Function_TCPIP_04:
- SSC_T1_1
- SSC_T2_1
before_script:
- TEST_CASE_FILE_PATH=$TEST_CASE_FILE_PATH/integration_test
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_04.yml
IT_Function_TCPIP_05:
@ -298,7 +331,6 @@ IT_Function_TCPIP_05:
- SSC_T1_1
- SSC_T2_1
before_script:
- TEST_CASE_FILE_PATH=$TEST_CASE_FILE_PATH/integration_test
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_05.yml
IT_Function_TCPIP_06:
@ -307,7 +339,6 @@ IT_Function_TCPIP_06:
- ESP32_IDF
- SSC_T1_1
before_script:
- TEST_CASE_FILE_PATH=$TEST_CASE_FILE_PATH/integration_test
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_06.yml
IT_Function_WIFI_03:
@ -316,7 +347,6 @@ IT_Function_WIFI_03:
- ESP32_IDF
- SSC_T3_PhyMode
before_script:
- TEST_CASE_FILE_PATH=$TEST_CASE_FILE_PATH/integration_test
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_WIFI_03.yml
IT_Function_WIFI_04:
@ -325,7 +355,6 @@ IT_Function_WIFI_04:
- ESP32_IDF
- SSC_T1_APC
before_script:
- TEST_CASE_FILE_PATH=$TEST_CASE_FILE_PATH/integration_test
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_WIFI_04.yml
IT_Function_WIFI_05:
@ -334,7 +363,6 @@ IT_Function_WIFI_05:
- ESP32_IDF
- SSC_T1_WEP
before_script:
- TEST_CASE_FILE_PATH=$TEST_CASE_FILE_PATH/integration_test
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_WIFI_05.yml
IT_Function_WIFI_06:
@ -343,7 +371,6 @@ IT_Function_WIFI_06:
- ESP32_IDF
- SSC_T2_PhyMode
before_script:
- TEST_CASE_FILE_PATH=$TEST_CASE_FILE_PATH/integration_test
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_WIFI_06.yml
IT_Function_TCPIP_07:
@ -354,7 +381,6 @@ IT_Function_TCPIP_07:
- SSC_T1_2
- SSC_T2_1
before_script:
- TEST_CASE_FILE_PATH=$TEST_CASE_FILE_PATH/integration_test
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_07.yml
IT_Function_TCPIP_08:
@ -363,7 +389,6 @@ IT_Function_TCPIP_08:
- ESP32_IDF
- SSC_T1_1
before_script:
- TEST_CASE_FILE_PATH=$TEST_CASE_FILE_PATH/integration_test
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_08.yml
IT_Function_TCPIP_09:
@ -372,7 +397,6 @@ IT_Function_TCPIP_09:
- ESP32_IDF
- SSC_T1_1
before_script:
- TEST_CASE_FILE_PATH=$TEST_CASE_FILE_PATH/integration_test
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_09.yml
IT_Function_TCPIP_10:
@ -383,7 +407,6 @@ IT_Function_TCPIP_10:
- SSC_T1_2
- SSC_T2_1
before_script:
- TEST_CASE_FILE_PATH=$TEST_CASE_FILE_PATH/integration_test
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_10.yml
IT_Function_TCPIP_11:
@ -391,8 +414,8 @@ IT_Function_TCPIP_11:
tags:
- ESP32_IDF
- SSC_T1_1
- SSC_T1_2
before_script:
- TEST_CASE_FILE_PATH=$TEST_CASE_FILE_PATH/integration_test
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_11.yml
IT_Function_TCPIP_12:
@ -400,7 +423,5 @@ IT_Function_TCPIP_12:
tags:
- ESP32_IDF
- SSC_T1_1
- SSC_T1_2
before_script:
- TEST_CASE_FILE_PATH=$TEST_CASE_FILE_PATH/integration_test
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_12.yml

View File

@ -4,7 +4,7 @@ Filter:
- Add:
ID: [^TCPIP_DHCP_0302, TCPIP_DHCP_0302, TCPIP_DHCP_0301, TCPIP_TCP_0403, TCPIP_TCP_0402,
TCPIP_TCP_0401, TCPIP_TCP_0407, TCPIP_TCP_0406, ^TCPIP_TCP_0411, TCPIP_TCP_0404,
TCPIP_TCP_0408, TCPIP_TCP_0110, TCPIP_TCP_0115, TCPIP_IP_0101, TCPIP_IP_0102,
^TCPIP_IGMP_0102, ^TCPIP_IGMP_0101, ^TCPIP_IGMP_0104, TCPIP_IGMP_0104, TCPIP_IGMP_0103,
TCPIP_IGMP_0102, TCPIP_IGMP_0101, TCPIP_UDP_0108, TCPIP_UDP_0106, TCPIP_UDP_0107,
TCPIP_UDP_0105, TCPIP_UDP_0101, TCPIP_IGMP_0204, TCPIP_IGMP_0201, TCPIP_IGMP_0202]
TCPIP_TCP_0408, TCPIP_TCP_0110, ^TCPIP_TCP_0111, TCPIP_TCP_0115, TCPIP_IP_0101,
TCPIP_IP_0102, ^TCPIP_IGMP_0102, ^TCPIP_IGMP_0101, ^TCPIP_IGMP_0104, TCPIP_IGMP_0104,
TCPIP_IGMP_0103, TCPIP_IGMP_0102, TCPIP_IGMP_0101, TCPIP_UDP_0108, TCPIP_UDP_0106,
TCPIP_UDP_0107, TCPIP_UDP_0105, TCPIP_UDP_0101, TCPIP_IGMP_0204, TCPIP_IGMP_0201]

View File

@ -2,7 +2,7 @@ Config: {execute count: 1, execute order: in order}
DUT: [SSC2, SSC1]
Filter:
- Add:
ID: [TCPIP_IGMP_0203, ^TCPIP_TCP_0403, ^TCPIP_TCP_0408, TCPIP_UDP_0201, TCPIP_UDP_0202,
ID: [TCPIP_IGMP_0202, TCPIP_IGMP_0203, ^TCPIP_TCP_0403, ^TCPIP_TCP_0408, TCPIP_UDP_0201,
^TCPIP_DHCP_0301, ^TCPIP_TCP_0101, ^TCPIP_TCP_0103, ^TCPIP_TCP_0105, ^TCPIP_TCP_0104,
^TCPIP_TCP_0107, ^TCPIP_TCP_0106, ^TCPIP_DHCP_0210, ^TCPIP_DHCP_0211, ^TCPIP_DHCP_0212,
^TCPIP_TCP_0404, TCPIP_TCP_0212, TCPIP_TCP_0210, ^TCPIP_TCP_0406, ^TCPIP_TCP_0407,

View File

@ -4,7 +4,7 @@ Filter:
- Add:
ID: [^TCPIP_IP_0102, ^TCPIP_UDP_0105, ^TCPIP_UDP_0107, ^TCPIP_UDP_0106, ^TCPIP_UDP_0101,
TCPIP_TCP_0202, ^TCPIP_UDP_0108, ^TCPIP_IGMP_0201, ^TCPIP_IGMP_0203, ^TCPIP_IGMP_0202,
^TCPIP_IGMP_0103, TCPIP_UDP_0114, TCPIP_UDP_0113, TCPIP_UDP_0112, TCPIP_DHCP_0205,
TCPIP_DHCP_0202, TCPIP_DHCP_0203, ^TCPIP_TCP_0102, TCPIP_TCP_0106, TCPIP_TCP_0107,
TCPIP_TCP_0104, TCPIP_TCP_0105, TCPIP_TCP_0102, TCPIP_TCP_0103, TCPIP_TCP_0101,
^TCPIP_TCP_0116, ^TCPIP_TCP_0114, ^TCPIP_TCP_0115, ^TCPIP_TCP_0112, ^TCPIP_TCP_0113]
^TCPIP_IGMP_0103, TCPIP_UDP_0114, TCPIP_UDP_0113, TCPIP_UDP_0112, TCPIP_UDP_0202,
TCPIP_DHCP_0205, TCPIP_DHCP_0202, TCPIP_DHCP_0203, ^TCPIP_TCP_0102, TCPIP_TCP_0106,
TCPIP_TCP_0107, TCPIP_TCP_0104, TCPIP_TCP_0105, TCPIP_TCP_0102, TCPIP_TCP_0103,
TCPIP_TCP_0101, ^TCPIP_TCP_0116, ^TCPIP_TCP_0114, ^TCPIP_TCP_0115, ^TCPIP_TCP_0112]

View File

@ -2,7 +2,7 @@ Config: {execute count: 1, execute order: in order}
DUT: [SSC2, SSC1]
Filter:
- Add:
ID: [^TCPIP_TCP_0110, ^TCPIP_TCP_0111, TCPIP_DHCP_0209, ^TCPIP_DHCP_0209, ^TCPIP_DHCP_0207,
ID: [^TCPIP_TCP_0113, ^TCPIP_TCP_0110, TCPIP_DHCP_0209, ^TCPIP_DHCP_0209, ^TCPIP_DHCP_0207,
^TCPIP_DHCP_0206, ^TCPIP_DHCP_0205, ^TCPIP_DHCP_0204, ^TCPIP_DHCP_0203, ^TCPIP_DHCP_0202,
^TCPIP_DHCP_0201, TCPIP_TCP_0204, TCPIP_TCP_0207, TCPIP_TCP_0206, TCPIP_TCP_0201,
^TCPIP_DHCP_0101, TCPIP_TCP_0203, ^TCPIP_DHCP_0103, ^TCPIP_DHCP_0208, TCPIP_TCP_0208,

View File

@ -2,9 +2,9 @@ Config: {execute count: 1, execute order: in order}
DUT: [SSC2, SSC1]
Filter:
- Add:
ID: [TCPIP_ICMP_0101, TCPIP_ICMP_0101, TCPIP_ICMP_0101, TCPIP_ICMP_0101, TCPIP_ICMP_0101,
ID: [TCPIP_UDP_0303, TCPIP_UDP_0303, TCPIP_UDP_0303, TCPIP_UDP_0303, TCPIP_UDP_0303,
TCPIP_ICMP_0101, TCPIP_ICMP_0101, TCPIP_ICMP_0101, TCPIP_ICMP_0101, TCPIP_ICMP_0101,
TCPIP_DNS_0102, TCPIP_DNS_0102, TCPIP_DNS_0102, TCPIP_DNS_0102, TCPIP_DNS_0102,
TCPIP_DNS_0101, TCPIP_DNS_0101, TCPIP_DNS_0101, TCPIP_DNS_0101, TCPIP_DNS_0101,
^TCPIP_ICMP_0101, ^TCPIP_ICMP_0101, ^TCPIP_ICMP_0101, ^TCPIP_ICMP_0101, ^TCPIP_ICMP_0101,
TCPIP_UDP_0109, TCPIP_UDP_0109, TCPIP_UDP_0109, TCPIP_UDP_0109, TCPIP_UDP_0109,
TCPIP_UDP_0104, TCPIP_UDP_0104, TCPIP_UDP_0104, TCPIP_UDP_0104, TCPIP_UDP_0104]
TCPIP_UDP_0109, TCPIP_UDP_0109, TCPIP_UDP_0109, TCPIP_UDP_0109, TCPIP_UDP_0109]

View File

@ -2,9 +2,9 @@ Config: {execute count: 1, execute order: in order}
DUT: [SSC1]
Filter:
- Add:
ID: [TCPIP_UDP_0102, TCPIP_UDP_0102, TCPIP_UDP_0102, TCPIP_UDP_0102, TCPIP_UDP_0102,
ID: [TCPIP_UDP_0104, TCPIP_UDP_0104, TCPIP_UDP_0104, TCPIP_UDP_0104, TCPIP_UDP_0104,
TCPIP_UDP_0102, TCPIP_UDP_0102, TCPIP_UDP_0102, TCPIP_UDP_0102, TCPIP_UDP_0102,
TCPIP_UDP_0103, TCPIP_UDP_0103, TCPIP_UDP_0103, TCPIP_UDP_0103, TCPIP_UDP_0103,
^TCPIP_UDP_0307, ^TCPIP_UDP_0307, ^TCPIP_UDP_0307, ^TCPIP_UDP_0307, ^TCPIP_UDP_0307,
^TCPIP_UDP_0306, ^TCPIP_UDP_0306, ^TCPIP_UDP_0306, ^TCPIP_UDP_0306, ^TCPIP_UDP_0306,
^TCPIP_UDP_0305, ^TCPIP_UDP_0305, ^TCPIP_UDP_0305, ^TCPIP_UDP_0305, ^TCPIP_UDP_0305,
^TCPIP_UDP_0304, ^TCPIP_UDP_0304, ^TCPIP_UDP_0304, ^TCPIP_UDP_0304, ^TCPIP_UDP_0304]
^TCPIP_UDP_0305, ^TCPIP_UDP_0305, ^TCPIP_UDP_0305, ^TCPIP_UDP_0305, ^TCPIP_UDP_0305]

View File

@ -2,7 +2,7 @@ Config: {execute count: 1, execute order: in order}
DUT: [SSC1]
Filter:
- Add:
ID: [^TCPIP_UDP_0303, ^TCPIP_UDP_0303, ^TCPIP_UDP_0303, ^TCPIP_UDP_0303, ^TCPIP_UDP_0303,
ID: [^TCPIP_UDP_0304, ^TCPIP_UDP_0304, ^TCPIP_UDP_0304, ^TCPIP_UDP_0304, ^TCPIP_UDP_0304,
^TCPIP_UDP_0302, ^TCPIP_UDP_0302, ^TCPIP_UDP_0302, ^TCPIP_UDP_0302, ^TCPIP_UDP_0302,
^TCPIP_UDP_0301, ^TCPIP_UDP_0301, ^TCPIP_UDP_0301, ^TCPIP_UDP_0301, ^TCPIP_UDP_0301,
^TCPIP_UDP_0104, ^TCPIP_UDP_0104, ^TCPIP_UDP_0104, ^TCPIP_UDP_0104, ^TCPIP_UDP_0104,

View File

@ -7,4 +7,4 @@ Filter:
TCPIP_UDP_0307, TCPIP_UDP_0307, TCPIP_UDP_0307, TCPIP_UDP_0307, TCPIP_UDP_0307,
TCPIP_UDP_0301, TCPIP_UDP_0301, TCPIP_UDP_0301, TCPIP_UDP_0301, TCPIP_UDP_0301,
TCPIP_UDP_0302, TCPIP_UDP_0302, TCPIP_UDP_0302, TCPIP_UDP_0302, TCPIP_UDP_0302,
TCPIP_UDP_0303, TCPIP_UDP_0303, TCPIP_UDP_0303, TCPIP_UDP_0303, TCPIP_UDP_0303]
TCPIP_DNS_0103, TCPIP_DNS_0103, TCPIP_DNS_0103, TCPIP_DNS_0103, TCPIP_DNS_0103]

View File

@ -2,5 +2,5 @@ Config: {execute count: 1, execute order: in order}
DUT: [SSC1]
Filter:
- Add:
ID: [TCPIP_DNS_0103, TCPIP_DNS_0103, TCPIP_DNS_0103, TCPIP_DNS_0103, TCPIP_DNS_0103,
ID: [^TCPIP_UDP_0303, ^TCPIP_UDP_0303, ^TCPIP_UDP_0303, ^TCPIP_UDP_0303, ^TCPIP_UDP_0303,
^TCPIP_UDP_0110, ^TCPIP_UDP_0110, ^TCPIP_UDP_0110, ^TCPIP_UDP_0110, ^TCPIP_UDP_0110]

View File

@ -2933,3 +2933,27 @@ initial condition:
start: 87.0
tag: T3_PHY1
test script: InitCondBase
- check cmd set:
- ''
- - UT UT1 -
- [R UT1 C Tests C Failures C Ignored]
force restore cmd set:
- ''
- - FREBOOT UT1
- ['']
- - UT UT1 -
- [R UT1 C Tests C Failures C Ignored]
initial condition detail: At UT menu page
restore cmd set:
- ''
- - FREBOOT UT1
- ['']
- - UT UT1 -
- [R UT1 C Tests C Failures C Ignored]
restore post cmd set:
- ''
- - DELAY 0.1
- ['']
script path: InitCondBase.py
tag: UTINIT1
test script: InitCondBase

View File

@ -141,6 +141,29 @@ test environment:
PC wired NIC should set static IP address within the same subnet with AP.
Must use onboard wired NIC.', test script: EnvBase}
- {PC OS: '', Special: Y, Target Count: 1.0, script path: EnvBase.py, tag: SSC_T1_Sleep1,
test environment detail: 'AP support DTIM placed with AT target.
SSC target connect with Raspberry Pi by UART.
Multimeter connect with Raspberry Pi via GPIB.
Series multimeter between GND and VCC of SSC1.
SSC1''s light sleep wakeup pin and wakeup indication connect with Raspberry Pi''s
GPIO.
SSC1''s XPD connect with RSTB.', test script: EnvBase}
- {PC OS: '', Special: Y, Target Count: 1.0, script path: EnvBase.py, tag: SSC_T1_Sleep2,
test environment detail: 'AP support DTIM placed with AT target.
SSC target connect with Raspberry Pi by UART.
Multimeter connect with Raspberry Pi via GPIB.
Series multimeter between GND and VCC of SSC1.
SSC1''s RSTB pin connect with Raspberry Pi''s GPIO.', test script: EnvBase}
- {PC OS: '', Special: Y, Target Count: 1.0, script path: EnvBase.py, tag: SSC_T1_TempBox,
test environment detail: '1 SSC target connect with PC by UART.
@ -191,28 +214,6 @@ test environment:
test environment detail: '2 SSC target connect with PC by UART.
Put them to Shield box.', test script: EnvBase}
- {PC OS: '', Special: Y, Target Count: 2.0, script path: EnvBase.py, tag: SSC_T2_Sleep1,
test environment detail: 'AP support DTIM placed with AT target.
2 SSC target connect with PC by UART.
Multimeter connect with PC via GPIB.
Series multimeter between GND and VCC of SSC1.
SSC1''s light sleep wakeup pin and wakeup indication connect with AT2''s GPIO.
SSC1''s XPD connect with RSTB.', test script: EnvBase}
- {PC OS: '', Special: Y, Target Count: 2.0, script path: EnvBase.py, tag: SSC_T2_Sleep2,
test environment detail: 'AP support DTIM placed with AT target.
2 SSC target connect with PC by UART.
Multimeter connect with PC via GPIB.
Series multimeter between GND and VCC of SSC1.
SSC1''s RSTB pin connect with AT2''s GPIO.', test script: EnvBase}
- {PC OS: '', Special: N, Target Count: 2.0, script path: EnvBase.py, tag: SSC_T2_SmartConfig,
test environment detail: '2 SSC target connect with PC by UART.
@ -263,6 +264,8 @@ test environment:
SSC2', additional param list: '', basic param list: '', script path: EnvBase.py,
tag: UART_T1_2, test environment detail: '[TBD] ESP_8266通过UART_0通过USB, UART_1 TXD
通过 TTLcable 连到PC', test script: EnvBase}
- {PC OS: '', Special: N, Target Count: 1.0, script path: EnvBase.py, tag: UT_T1_1,
test environment detail: Environment for running ESP32 unit tests, test script: EnvBase}
- {PC OS: linux, Special: Y, Target Count: 1.0, script path: EnvBase.py, tag: WebServer_T1_1,
test environment detail: 'Web Server target connect with PC by UART.

View File

@ -1 +0,0 @@
test cases: []

View File

@ -0,0 +1,8 @@
Config: {execute count: 1, execute order: in order}
DUT: [UT1]
Filter:
- Add:
ID: [SYS_OS_0101, SYS_OS_0102, SYS_MISC_0103, SYS_MISC_0102, SYS_MISC_0105, SYS_MISC_0104,
SYS_MISC_0107, SYS_MISC_0106, SYS_MISC_0109, SYS_MISC_0108, SYS_MISC_0112, SYS_MISC_0113,
SYS_MISC_0110, SYS_MISC_0111, SYS_MISC_0115, SYS_LIB_0103, SYS_LIB_0102, SYS_LIB_0101,
SYS_LIB_0106, SYS_LIB_0105, SYS_LIB_0104]

View File

@ -2933,3 +2933,27 @@ initial condition:
start: 87.0
tag: T3_PHY1
test script: InitCondBase
- check cmd set:
- ''
- - UT UT1 -
- [R UT1 C Tests C Failures C Ignored]
force restore cmd set:
- ''
- - FREBOOT UT1
- ['']
- - UT UT1 -
- [R UT1 C Tests C Failures C Ignored]
initial condition detail: At UT menu page
restore cmd set:
- ''
- - FREBOOT UT1
- ['']
- - UT UT1 -
- [R UT1 C Tests C Failures C Ignored]
restore post cmd set:
- ''
- - DELAY 0.1
- ['']
script path: InitCondBase.py
tag: UTINIT1
test script: InitCondBase

View File

@ -0,0 +1,484 @@
test cases:
- CI ready: 'Yes'
ID: SYS_LIB_0101
SDK: ESP32_IDF
Test App: testje
auto test: 'Yes'
category: Function
cmd set:
- IDFUnitTest/UnitTest
- - test_case = "12"
- [dummy]
comment: check if ROM is used for functions
execution time: 0
expected result: 1. set succeed
initial condition: UTINIT1
level: Unit
module: System
steps: 1. run lib test
sub module: Std Lib
summary: lib unit test
test environment: UT_T1_1
test point 1: basic function
test point 2: lib
version: v1 (2016-10-26)
- CI ready: 'Yes'
ID: SYS_LIB_0102
SDK: ESP32_IDF
Test App: testje
auto test: 'Yes'
category: Function
cmd set:
- IDFUnitTest/UnitTest
- - test_case = "13"
- [dummy]
comment: test time functions
execution time: 0
expected result: 1. set succeed
initial condition: UTINIT1
level: Unit
module: System
steps: 1. run lib test
sub module: Std Lib
summary: lib unit test
test environment: UT_T1_1
test point 1: basic function
test point 2: lib
version: v1 (2016-10-26)
- CI ready: 'Yes'
ID: SYS_LIB_0103
SDK: ESP32_IDF
Test App: testje
auto test: 'Yes'
category: Function
cmd set:
- IDFUnitTest/UnitTest
- - test_case = "14"
- [dummy]
comment: test sscanf function
execution time: 0
expected result: 1. set succeed
initial condition: UTINIT1
level: Unit
module: System
steps: 1. run lib test
sub module: Std Lib
summary: lib unit test
test environment: UT_T1_1
test point 1: basic function
test point 2: lib
version: v1 (2016-10-26)
- CI ready: 'Yes'
ID: SYS_LIB_0104
SDK: ESP32_IDF
Test App: testje
auto test: 'Yes'
category: Function
cmd set:
- IDFUnitTest/UnitTest
- - test_case = "15"
- [dummy]
comment: test sprintf function
execution time: 0
expected result: 1. set succeed
initial condition: UTINIT1
level: Unit
module: System
steps: 1. run lib test
sub module: Std Lib
summary: lib unit test
test environment: UT_T1_1
test point 1: basic function
test point 2: lib
version: v1 (2016-10-26)
- CI ready: 'Yes'
ID: SYS_LIB_0105
SDK: ESP32_IDF
Test App: testje
auto test: 'Yes'
category: Function
cmd set:
- IDFUnitTest/UnitTest
- - test_case = "16"
- [dummy]
comment: test atoX functions
execution time: 0
expected result: 1. set succeed
initial condition: UTINIT1
level: Unit
module: System
steps: 1. run lib test
sub module: Std Lib
summary: lib unit test
test environment: UT_T1_1
test point 1: basic function
test point 2: lib
version: v1 (2016-10-26)
- CI ready: 'Yes'
ID: SYS_LIB_0106
SDK: ESP32_IDF
Test App: testje
auto test: 'Yes'
category: Function
cmd set:
- IDFUnitTest/UnitTest
- - test_case = "17"
- [dummy]
comment: test ctype functions
execution time: 0
expected result: 1. set succeed
initial condition: UTINIT1
level: Unit
module: System
steps: 1. run lib test
sub module: Std Lib
summary: lib unit test
test environment: UT_T1_1
test point 1: basic function
test point 2: lib
version: v1 (2016-10-26)
- CI ready: 'Yes'
ID: SYS_MISC_0102
SDK: ESP32_IDF
Test App: testje
auto test: 'Yes'
category: Function
cmd set:
- IDFUnitTest/UnitTest
- - test_case = "21"
- [dummy]
comment: mbedtls MPI self-tests
execution time: 0
expected result: 1. set succeed
initial condition: UTINIT1
level: Unit
module: System
steps: 1. run bignum test
sub module: Misc
summary: bignum unit test
test environment: UT_T1_1
test point 1: basic function
test point 2: bignum
version: v1 (2016-10-26)
- CI ready: 'Yes'
ID: SYS_MISC_0103
SDK: ESP32_IDF
Test App: testje
auto test: 'Yes'
category: Function
cmd set:
- IDFUnitTest/UnitTest
- - test_case = "25"
- [dummy]
comment: test AES thread safety
execution time: 0
expected result: 1. set succeed
initial condition: UTINIT1
level: Unit
module: System
steps: 1. run hwcrypto test
sub module: Misc
summary: hwcrypto unit test
test environment: UT_T1_1
test point 1: basic function
test point 2: hwcrypto
version: v1 (2016-10-26)
- CI ready: 'Yes'
ID: SYS_MISC_0104
SDK: ESP32_IDF
Test App: testje
auto test: 'Yes'
category: Function
cmd set:
- IDFUnitTest/UnitTest
- - test_case = "26"
- [dummy]
comment: test AES acceleration
execution time: 0
expected result: 1. set succeed
initial condition: UTINIT1
level: Unit
module: System
steps: 1. run hwcrypto test
sub module: Misc
summary: hwcrypto unit test
test environment: UT_T1_1
test point 1: basic function
test point 2: hwcrypto
version: v1 (2016-10-26)
- CI ready: 'Yes'
ID: SYS_MISC_0105
SDK: ESP32_IDF
Test App: testje
auto test: 'Yes'
category: Function
cmd set:
- IDFUnitTest/UnitTest
- - test_case = "27"
- [dummy]
comment: test SHA thread safety
execution time: 0
expected result: 1. set succeed
initial condition: UTINIT1
level: Unit
module: System
steps: 1. run hwcrypto test
sub module: Misc
summary: hwcrypto unit test
test environment: UT_T1_1
test point 1: basic function
test point 2: hwcrypto
version: v1 (2016-10-26)
- CI ready: 'Yes'
ID: SYS_MISC_0106
SDK: ESP32_IDF
Test App: testje
auto test: 'Yes'
category: Function
cmd set:
- IDFUnitTest/UnitTest
- - test_case = "33"
- [dummy]
comment: context switch saves FP registers
execution time: 0
expected result: 1. set succeed
initial condition: UTINIT1
level: Unit
module: System
steps: 1. run fp test
sub module: Misc
summary: fp unit test
test environment: UT_T1_1
test point 1: basic function
test point 2: fp
version: v1 (2016-10-26)
- CI ready: 'Yes'
ID: SYS_MISC_0107
SDK: ESP32_IDF
Test App: testje
auto test: 'Yes'
category: Function
cmd set:
- IDFUnitTest/UnitTest
- - test_case = "34"
- [dummy]
comment: test FP sqrt
execution time: 0
expected result: 1. set succeed
initial condition: UTINIT1
level: Unit
module: System
steps: 1. run fp test
sub module: Misc
summary: fp unit test
test environment: UT_T1_1
test point 1: basic function
test point 2: fp
version: v1 (2016-10-26)
- CI ready: 'Yes'
ID: SYS_MISC_0108
SDK: ESP32_IDF
Test App: testje
auto test: 'Yes'
category: Function
cmd set:
- IDFUnitTest/UnitTest
- - test_case = "35"
- [dummy]
comment: test FP div
execution time: 0
expected result: 1. set succeed
initial condition: UTINIT1
level: Unit
module: System
steps: 1. run fp test
sub module: Misc
summary: fp unit test
test environment: UT_T1_1
test point 1: basic function
test point 2: fp
version: v1 (2016-10-26)
- CI ready: 'Yes'
ID: SYS_MISC_0109
SDK: ESP32_IDF
Test App: testje
auto test: 'Yes'
category: Function
cmd set:
- IDFUnitTest/UnitTest
- - test_case = "36"
- [dummy]
comment: test FP mul
execution time: 0
expected result: 1. set succeed
initial condition: UTINIT1
level: Unit
module: System
steps: 1. run fp test
sub module: Misc
summary: fp unit test
test environment: UT_T1_1
test point 1: basic function
test point 2: fp
version: v1 (2016-10-26)
- CI ready: 'Yes'
ID: SYS_MISC_0110
SDK: ESP32_IDF
Test App: testje
auto test: 'Yes'
category: Function
cmd set:
- IDFUnitTest/UnitTest
- - test_case = "37"
- [dummy]
comment: test FP add
execution time: 0
expected result: 1. set succeed
initial condition: UTINIT1
level: Unit
module: System
steps: 1. run fp test
sub module: Misc
summary: fp unit test
test environment: UT_T1_1
test point 1: basic function
test point 2: fp
version: v1 (2016-10-26)
- CI ready: 'Yes'
ID: SYS_MISC_0111
SDK: ESP32_IDF
Test App: testje
auto test: 'Yes'
category: Function
cmd set:
- IDFUnitTest/UnitTest
- - test_case = "3"
- [dummy]
comment: Test JPEG decompression library
execution time: 0
expected result: 1. set succeed
initial condition: UTINIT1
level: Unit
module: System
steps: 1. run JPEG decompression test
sub module: Misc
summary: JPEG decompression library unit test
test environment: UT_T1_1
test point 1: basic function
test point 2: tjpgd
version: v1 (2016-10-31)
- CI ready: 'Yes'
ID: SYS_MISC_0112
SDK: ESP32_IDF
Test App: testje
auto test: 'Yes'
category: Function
cmd set:
- IDFUnitTest/UnitTest
- - test_case = "22"
- [dummy]
comment: mbedtls AES self-tests
execution time: 0
expected result: 1. set succeed
initial condition: UTINIT1
level: Unit
module: System
steps: 1. run mbedtls AES self-tests
sub module: Misc
summary: mbedtls AES unit test
test environment: UT_T1_1
test point 1: basic function
test point 2: mbedtls AES
version: v1 (2016-10-31)
- CI ready: 'Yes'
ID: SYS_MISC_0113
SDK: ESP32_IDF
Test App: testje
auto test: 'Yes'
category: Function
cmd set:
- IDFUnitTest/UnitTest
- - test_case = "17"
- [dummy]
comment: mbedtls SHA self-tests
execution time: 0
expected result: 1. set succeed
initial condition: UTINIT1
level: Unit
module: System
steps: 1. run mbedtls SHA self-tests
sub module: Misc
summary: mbedtls SHA unit test
test environment: UT_T1_1
test point 1: basic function
test point 2: mbedtls SHA
version: v1 (2016-10-31)
- CI ready: 'Yes'
ID: SYS_MISC_0115
SDK: ESP32_IDF
Test App: testje
auto test: 'Yes'
category: Function
cmd set:
- IDFUnitTest/UnitTest
- - test_case = "28"
- [dummy]
comment: test SHA acceleration
execution time: 0
expected result: 1. set succeed
initial condition: UTINIT1
level: Unit
module: System
steps: 1. run SHA acceleration test
sub module: Misc
summary: SHA acceleration unit test
test environment: UT_T1_1
test point 1: basic function
test point 2: SHA acceleration
version: v1 (2016-10-31)
- CI ready: 'Yes'
ID: SYS_OS_0101
SDK: ESP32_IDF
Test App: testje
auto test: 'Yes'
category: Function
cmd set:
- IDFUnitTest/UnitTest
- - test_case = "31"
- [dummy]
comment: FreeRTOS Event Groups
execution time: 0
expected result: 1. set succeed
initial condition: UTINIT1
level: Unit
module: System
steps: 1. run freertos test
sub module: OS
summary: freertos unit test
test environment: UT_T1_1
test point 1: basic function
test point 2: freertos
version: v1 (2016-10-26)
- CI ready: 'Yes'
ID: SYS_OS_0102
SDK: ESP32_IDF
Test App: testje
auto test: 'Yes'
category: Function
cmd set:
- IDFUnitTest/UnitTest
- - test_case = "2"
- [dummy]
comment: Freertos TLS delete cb
execution time: 0
expected result: 1. set succeed
initial condition: UTINIT1
level: Unit
module: System
steps: 1. run Freertos TLS delete cb test
sub module: OS
summary: Freertos TLS delete cb unit test
test environment: UT_T1_1
test point 1: basic function
test point 2: Freertos TLS delete cb
version: v1 (2016-10-31)

View File

@ -0,0 +1,47 @@
import re
import time
from TCAction import PerformanceTCBase
from TCAction import TCActionBase
from NativeLog import NativeLog
class UnitTest(PerformanceTCBase.PerformanceTCBase):
def __init__(self, name, test_env, cmd_set, timeout=30, log_path=TCActionBase.LOG_PATH):
PerformanceTCBase.PerformanceTCBase.__init__(self, name, test_env, cmd_set=cmd_set,
timeout=timeout, log_path=log_path)
self.test_case = None
self.test_timeout = 6
# load param from excel
for i in range(1, len(cmd_set)):
if cmd_set[i][0] != "dummy":
cmd_string = "self." + cmd_set[i][0]
exec cmd_string
self.result_cntx = TCActionBase.ResultCheckContext(self, test_env, self.tc_name)
pass
def send_commands(self):
self.flush_data("UT1")
try:
self.serial_write_line("UT1", self.test_case)
time.sleep(self.test_timeout) #wait for test to run before reading result
data = self.serial_read_data("UT1")
if re.search('[^0] Tests 0 F', data): #check that number of tests run != 0 and number of tests failed == 0
self.set_result("Success")
else:
self.set_result("Fail")
except StandardError,e:
NativeLog.add_exception_log(e)
def execute(self):
TCActionBase.TCActionBase.execute(self)
self.send_commands()
def main():
pass
if __name__ == '__main__':
pass

View File

@ -0,0 +1 @@
__all__ = ["UnitTest"]

View File

@ -141,6 +141,29 @@ test environment:
PC wired NIC should set static IP address within the same subnet with AP.
Must use onboard wired NIC.', test script: EnvBase}
- {PC OS: '', Special: Y, Target Count: 1.0, script path: EnvBase.py, tag: SSC_T1_Sleep1,
test environment detail: 'AP support DTIM placed with AT target.
SSC target connect with Raspberry Pi by UART.
Multimeter connect with Raspberry Pi via GPIB.
Series multimeter between GND and VCC of SSC1.
SSC1''s light sleep wakeup pin and wakeup indication connect with Raspberry Pi''s
GPIO.
SSC1''s XPD connect with RSTB.', test script: EnvBase}
- {PC OS: '', Special: Y, Target Count: 1.0, script path: EnvBase.py, tag: SSC_T1_Sleep2,
test environment detail: 'AP support DTIM placed with AT target.
SSC target connect with Raspberry Pi by UART.
Multimeter connect with Raspberry Pi via GPIB.
Series multimeter between GND and VCC of SSC1.
SSC1''s RSTB pin connect with Raspberry Pi''s GPIO.', test script: EnvBase}
- {PC OS: '', Special: Y, Target Count: 1.0, script path: EnvBase.py, tag: SSC_T1_TempBox,
test environment detail: '1 SSC target connect with PC by UART.
@ -191,28 +214,6 @@ test environment:
test environment detail: '2 SSC target connect with PC by UART.
Put them to Shield box.', test script: EnvBase}
- {PC OS: '', Special: Y, Target Count: 2.0, script path: EnvBase.py, tag: SSC_T2_Sleep1,
test environment detail: 'AP support DTIM placed with AT target.
2 SSC target connect with PC by UART.
Multimeter connect with PC via GPIB.
Series multimeter between GND and VCC of SSC1.
SSC1''s light sleep wakeup pin and wakeup indication connect with AT2''s GPIO.
SSC1''s XPD connect with RSTB.', test script: EnvBase}
- {PC OS: '', Special: Y, Target Count: 2.0, script path: EnvBase.py, tag: SSC_T2_Sleep2,
test environment detail: 'AP support DTIM placed with AT target.
2 SSC target connect with PC by UART.
Multimeter connect with PC via GPIB.
Series multimeter between GND and VCC of SSC1.
SSC1''s RSTB pin connect with AT2''s GPIO.', test script: EnvBase}
- {PC OS: '', Special: N, Target Count: 2.0, script path: EnvBase.py, tag: SSC_T2_SmartConfig,
test environment detail: '2 SSC target connect with PC by UART.
@ -263,6 +264,8 @@ test environment:
SSC2', additional param list: '', basic param list: '', script path: EnvBase.py,
tag: UART_T1_2, test environment detail: '[TBD] ESP_8266通过UART_0通过USB, UART_1 TXD
通过 TTLcable 连到PC', test script: EnvBase}
- {PC OS: '', Special: N, Target Count: 1.0, script path: EnvBase.py, tag: UT_T1_1,
test environment detail: Environment for running ESP32 unit tests, test script: EnvBase}
- {PC OS: linux, Special: Y, Target Count: 1.0, script path: EnvBase.py, tag: WebServer_T1_1,
test environment detail: 'Web Server target connect with PC by UART.