target-test.yml 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252
  1. .target_test_template:
  2. image: $TARGET_TEST_ENV_IMAGE
  3. stage: target_test
  4. timeout: 1 hour
  5. variables:
  6. GIT_DEPTH: 1
  7. SUBMODULES_TO_FETCH: "none"
  8. cache:
  9. # Usually do not need submodule-cache in target_test
  10. - key: pip-cache
  11. paths:
  12. - .cache/pip
  13. policy: pull
  14. .pytest_template:
  15. extends:
  16. - .target_test_template
  17. artifacts:
  18. when: always
  19. paths:
  20. - XUNIT_RESULT.xml
  21. - pytest_embedded_log/
  22. reports:
  23. junit: XUNIT_RESULT.xml
  24. expire_in: 1 week
  25. script:
  26. - retry_failed git clone $KNOWN_FAILURE_CASES_REPO known_failure_cases
  27. # get runner env config file
  28. - retry_failed git clone $TEST_ENV_CONFIG_REPO
  29. - python $CHECKOUT_REF_SCRIPT ci-test-runner-configs ci-test-runner-configs
  30. # using runner tags as markers to filter the test cases
  31. # Runner tags are comma separated, replace the comma with " and " for markers
  32. - job_tags=$(python tools/ci/python_packages/gitlab_api.py get_job_tags $CI_PROJECT_ID --job_id $CI_JOB_ID)
  33. - markers=$(echo $job_tags | sed -e "s/,/ and /g")
  34. - run_cmd pytest $TEST_DIR -m \"${markers}\" --junitxml=XUNIT_RESULT.xml --known-failure-cases-file known_failure_cases/known_failure_cases.txt
  35. .pytest_examples_dir_template:
  36. extends: .pytest_template
  37. variables:
  38. TEST_DIR: examples
  39. example_test_pytest_esp32_generic:
  40. extends:
  41. - .pytest_examples_dir_template
  42. - .rules:test:example_test-esp32
  43. needs:
  44. - build_pytest_examples_esp32
  45. tags: [ esp32, generic ]
  46. example_test_pytest_esp32_ir_transceiver:
  47. extends:
  48. - .pytest_examples_dir_template
  49. - .rules:test:example_test-esp32
  50. needs:
  51. - build_pytest_examples_esp32
  52. tags: [ esp32, ir_transceiver ]
  53. example_test_pytest_esp32s2_generic:
  54. extends:
  55. - .pytest_examples_dir_template
  56. - .rules:test:example_test-esp32s2
  57. needs:
  58. - build_pytest_examples_esp32s2
  59. tags: [ esp32s2, generic ]
  60. example_test_pytest_esp32s3_generic:
  61. extends:
  62. - .pytest_examples_dir_template
  63. - .rules:test:example_test-esp32s3
  64. needs:
  65. - build_pytest_examples_esp32s3
  66. tags: [ esp32s3, generic ]
  67. example_test_pytest_esp32c2_generic:
  68. extends:
  69. - .pytest_examples_dir_template
  70. - .rules:test:example_test-esp32c2
  71. needs:
  72. - build_pytest_examples_esp32c2
  73. tags: [ esp32c2, generic, xtal_40mhz ]
  74. example_test_pytest_esp32c2_26mhz:
  75. extends:
  76. - .pytest_examples_dir_template
  77. - .rules:test:example_test-esp32c2
  78. needs:
  79. - build_pytest_examples_esp32c2
  80. tags: [ esp32c2, xtal_26mhz ]
  81. example_test_pytest_esp32c3_generic:
  82. extends:
  83. - .pytest_examples_dir_template
  84. - .rules:test:example_test-esp32c3
  85. needs:
  86. - build_pytest_examples_esp32c3
  87. tags: [ esp32c3, generic ]
  88. example_test_pytest_esp32c3_flash_suspend:
  89. extends:
  90. - .pytest_examples_dir_template
  91. - .rules:test:example_test-esp32c3
  92. needs:
  93. - build_pytest_examples_esp32c3
  94. tags: [ esp32c3, flash_suspend ]
  95. example_test_pytest_esp32_ethernet_ota:
  96. extends:
  97. - .pytest_examples_dir_template
  98. - .rules:test:example_test-esp32-ethernet
  99. needs:
  100. - build_pytest_examples_esp32
  101. tags: [ esp32, ethernet_ota ]
  102. example_test_pytest_esp32_wifi_high_traffic:
  103. extends:
  104. - .pytest_examples_dir_template
  105. - .rules:test:example_test-esp32-wifi
  106. needs:
  107. - build_pytest_examples_esp32
  108. tags: [ esp32, wifi_high_traffic ]
  109. example_test_pytest_esp32_flash_encryption_wifi_high_traffic:
  110. extends:
  111. - .pytest_examples_dir_template
  112. - .rules:test:example_test-esp32-include_nightly_run-rule
  113. needs:
  114. - build_pytest_examples_esp32
  115. tags: [ esp32, flash_encryption_wifi_high_traffic ]
  116. example_test_pytest_esp32c3_flash_encryption_wifi_high_traffic:
  117. extends:
  118. - .pytest_examples_dir_template
  119. - .rules:test:example_test-esp32c3-include_nightly_run-rule
  120. needs:
  121. - build_pytest_examples_esp32c3
  122. tags: [ esp32c3, flash_encryption_wifi_high_traffic ]
  123. example_test_pytest_esp32_ethernet:
  124. extends:
  125. - .pytest_examples_dir_template
  126. - .rules:test:example_test-esp32-ethernet
  127. needs:
  128. - build_pytest_examples_esp32
  129. tags: [ esp32, ethernet]
  130. example_test_pytest_esp32_8mb_flash:
  131. extends:
  132. - .pytest_examples_dir_template
  133. - .rules:test:example_test-esp32
  134. needs:
  135. - build_pytest_examples_esp32
  136. tags: [ esp32, ethernet_flash_8m ]
  137. example_test_pytest_esp32_wifi_ap:
  138. extends:
  139. - .pytest_examples_dir_template
  140. - .rules:test:example_test-esp32-wifi
  141. needs:
  142. - build_pytest_examples_esp32
  143. tags: [ esp32, wifi_ap ]
  144. example_test_pytest_esp32_wifi_router:
  145. extends:
  146. - .pytest_examples_dir_template
  147. - .rules:test:example_test-esp32-wifi
  148. needs:
  149. - build_pytest_examples_esp32
  150. tags: [ esp32, wifi_router ]
  151. example_test_pytest_esp32_wifi_wlan:
  152. extends:
  153. - .pytest_examples_dir_template
  154. - .rules:test:example_test-esp32-wifi
  155. needs:
  156. - build_pytest_examples_esp32
  157. tags: [ esp32, wifi_wlan ]
  158. example_test_pytest_esp32_ethernet_ip101:
  159. extends:
  160. - .pytest_examples_dir_template
  161. - .rules:test:example_test-esp32
  162. needs:
  163. - build_pytest_examples_esp32
  164. tags: [ esp32, ip101 ]
  165. example_test_pytest_esp32_flash_encryption:
  166. extends:
  167. - .pytest_examples_dir_template
  168. - .rules:test:example_test-esp32
  169. needs:
  170. - build_pytest_examples_esp32
  171. tags: [ esp32, flash_encryption ]
  172. example_test_pytest_esp32_multi_dut_generic:
  173. extends:
  174. - .pytest_examples_dir_template
  175. - .rules:test:example_test-esp32
  176. needs:
  177. - build_pytest_examples_esp32
  178. tags: [ esp32, multi_dut_generic ]
  179. example_test_pytest_esp32c3_flash_encryption:
  180. extends:
  181. - .pytest_examples_dir_template
  182. - .rules:test:example_test-esp32c3
  183. needs:
  184. - build_pytest_examples_esp32c3
  185. tags: [ esp32c3, flash_encryption ]
  186. example_test_pytest_esp32s2_usb_device:
  187. extends:
  188. - .pytest_examples_dir_template
  189. - .rules:test:example_test-esp32s2-usb
  190. needs:
  191. - build_pytest_examples_esp32s2
  192. tags: [ esp32s2, usb_device ]
  193. .pytest_components_dir_template:
  194. extends: .pytest_template
  195. variables:
  196. TEST_DIR: components
  197. component_ut_pytest_esp32_generic:
  198. extends:
  199. - .pytest_components_dir_template
  200. - .rules:test:component_ut-esp32
  201. needs:
  202. - build_pytest_components_esp32
  203. tags: [ esp32, generic ]
  204. component_ut_pytest_esp32_ip101:
  205. extends:
  206. - .pytest_components_dir_template
  207. - .rules:test:component_ut-esp32
  208. needs:
  209. - build_pytest_components_esp32
  210. tags: [ esp32, ip101 ]
  211. component_ut_pytest_esp32_lan8720:
  212. extends:
  213. - .pytest_components_dir_template
  214. - .rules:labels-protected:lan8720 # FIXME: IDFCI-1176
  215. needs:
  216. - build_pytest_components_esp32
  217. tags: [ esp32, lan8720 ]
  218. component_ut_pytest_esp32_flash_encryption:
  219. extends:
  220. - .pytest_components_dir_template
  221. - .rules:test:component_ut-esp32
  222. needs:
  223. - build_pytest_components_esp32
  224. tags: [ esp32, flash_encryption ]
  225. component_ut_pytest_esp32s2_generic:
  226. extends:
  227. - .pytest_components_dir_template
  228. - .rules:test:component_ut-esp32s2
  229. needs:
  230. - build_pytest_components_esp32s2
  231. tags: [ esp32s2, generic ]
  232. component_ut_pytest_esp32s3_generic:
  233. extends:
  234. - .pytest_components_dir_template
  235. - .rules:test:component_ut-esp32s3
  236. needs:
  237. - build_pytest_components_esp32s3
  238. tags: [ esp32s3, generic ]
  239. component_ut_pytest_esp32s3_octal_psram:
  240. extends:
  241. - .pytest_components_dir_template
  242. - .rules:test:component_ut-esp32s3
  243. needs:
  244. - build_pytest_components_esp32s3
  245. tags: [ esp32s3, octal_psram ]
  246. component_ut_pytest_esp32s3_flash_encryption_f4r8:
  247. extends:
  248. - .pytest_components_dir_template
  249. - .rules:test:component_ut-esp32s3
  250. needs:
  251. - build_pytest_components_esp32s3
  252. tags: [ esp32s3, flash_encryption_f4r8 ]
  253. component_ut_pytest_esp32s3_flash_encryption_f8r8:
  254. extends:
  255. - .pytest_components_dir_template
  256. - .rules:test:component_ut-esp32s3
  257. needs:
  258. - build_pytest_components_esp32s3
  259. tags: [ esp32s3, flash_encryption_f8r8 ]
  260. component_ut_pytest_esp32c2_generic:
  261. extends:
  262. - .pytest_components_dir_template
  263. - .rules:test:component_ut-esp32c2
  264. needs:
  265. - build_pytest_components_esp32c2
  266. tags: [ esp32c2, generic, xtal_40mhz ]
  267. component_ut_pytest_esp32c2_xtal_26mhz:
  268. extends:
  269. - .pytest_components_dir_template
  270. - .rules:test:component_ut-esp32c2
  271. needs:
  272. - build_pytest_components_esp32c2
  273. tags: [ esp32c2, xtal_26mhz ]
  274. component_ut_pytest_esp32c3_generic:
  275. extends:
  276. - .pytest_components_dir_template
  277. - .rules:test:component_ut-esp32c3
  278. needs:
  279. - build_pytest_components_esp32c3
  280. tags: [ esp32c3, generic ]
  281. component_ut_pytest_esp32c3_flash_encryption:
  282. extends:
  283. - .pytest_components_dir_template
  284. - .rules:test:component_ut-esp32c3
  285. needs:
  286. - build_pytest_components_esp32c3
  287. tags: [ esp32c3, flash_encryption ]
  288. .pytest_test_apps_dir_template:
  289. extends: .pytest_template
  290. variables:
  291. TEST_DIR: tools/test_apps
  292. test_app_test_pytest_esp32_generic:
  293. extends:
  294. - .pytest_test_apps_dir_template
  295. - .rules:test:custom_test-esp32
  296. needs:
  297. - build_pytest_test_apps_esp32
  298. tags: [ esp32, generic ]
  299. variables:
  300. SETUP_TOOLS: "1" # need gdb
  301. test_app_test_pytest_esp32_jtag:
  302. extends:
  303. - .pytest_test_apps_dir_template
  304. - .rules:test:custom_test-esp32
  305. needs:
  306. - build_pytest_test_apps_esp32
  307. tags: [ esp32, test_jtag_arm]
  308. variables:
  309. SETUP_TOOLS: "1" # need gdb
  310. test_app_test_pytest_esp32s2_generic:
  311. extends:
  312. - .pytest_test_apps_dir_template
  313. - .rules:test:custom_test-esp32s2
  314. needs:
  315. - build_pytest_test_apps_esp32s2
  316. tags: [ esp32s2, generic ]
  317. variables:
  318. SETUP_TOOLS: "1" # need gdb
  319. test_app_test_pytest_esp32s3_generic:
  320. extends:
  321. - .pytest_test_apps_dir_template
  322. - .rules:test:custom_test-esp32s3
  323. needs:
  324. - build_pytest_test_apps_esp32s3
  325. tags: [ esp32s3, generic ]
  326. test_app_test_pytest_esp32c2_generic:
  327. extends:
  328. - .pytest_test_apps_dir_template
  329. - .rules:test:custom_test-esp32c2
  330. needs:
  331. - build_pytest_test_apps_esp32c2
  332. tags: [ esp32c2, generic, xtal_40mhz ]
  333. test_app_test_pytest_esp32c2_26mhz:
  334. extends:
  335. - .pytest_test_apps_dir_template
  336. - .rules:test:custom_test-esp32c2
  337. needs:
  338. - build_pytest_test_apps_esp32c2
  339. tags: [ esp32c2, xtal_26mhz ]
  340. test_app_test_pytest_esp32c3_generic:
  341. extends:
  342. - .pytest_test_apps_dir_template
  343. - .rules:test:custom_test-esp32c3
  344. needs:
  345. - build_pytest_test_apps_esp32c3
  346. tags: [ esp32c3, generic ]
  347. test_app_test_pytest_esp32s2_usb_host:
  348. extends:
  349. - .pytest_test_apps_dir_template
  350. - .rules:test:custom_test-esp32s2
  351. needs:
  352. - build_pytest_test_apps_esp32s2
  353. tags: [ esp32s2, usb_host ]
  354. test_app_test_pytest_esp32s3_mspi_f8r8:
  355. extends:
  356. - .pytest_test_apps_dir_template
  357. - .rules:test:custom_test-esp32s3
  358. needs:
  359. - build_pytest_test_apps_esp32s3
  360. tags: [ esp32s3, MSPI_F8R8 ]
  361. test_app_test_pytest_esp32s3_mspi_f4r8:
  362. extends:
  363. - .pytest_test_apps_dir_template
  364. - .rules:test:custom_test-esp32s3
  365. needs:
  366. - build_pytest_test_apps_esp32s3
  367. tags: [ esp32s3, MSPI_F4R8 ]
  368. test_app_test_pytest_esp32s3_mspi_f4r4:
  369. extends:
  370. - .pytest_test_apps_dir_template
  371. - .rules:test:custom_test-esp32s3
  372. needs:
  373. - build_pytest_test_apps_esp32s3
  374. tags: [ esp32s3, MSPI_F4R4 ]
  375. # for parallel jobs, CI_JOB_NAME will be "job_name index/total" (for example, "IT_001 1/2")
  376. # we need to convert to pattern "job_name_index.yml"
  377. .define_config_file_name: &define_config_file_name |
  378. JOB_NAME_PREFIX=$(echo ${CI_JOB_NAME} | awk '{print $1}')
  379. JOB_FULL_NAME="${JOB_NAME_PREFIX}_${CI_NODE_INDEX}"
  380. CONFIG_FILE="${CONFIG_FILE_PATH}/${JOB_FULL_NAME}.yml"
  381. .target_test_job_template:
  382. extends:
  383. - .target_test_template
  384. artifacts:
  385. when: always
  386. paths:
  387. - "**/*.log"
  388. - $LOG_PATH
  389. exclude:
  390. - .git/**/*
  391. reports:
  392. junit: $LOG_PATH/*/XUNIT_RESULT.xml
  393. expire_in: 1 week
  394. variables:
  395. TEST_FW_PATH: "$CI_PROJECT_DIR/tools/tiny-test-fw"
  396. LOG_PATH: "$CI_PROJECT_DIR/TEST_LOGS"
  397. ENV_FILE: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/EnvConfig.yml"
  398. script:
  399. - *define_config_file_name
  400. # first test if config file exists, if not exist, exit 0
  401. - |
  402. { [[ -e $CONFIG_FILE ]]; } || { echo 'No config file found. Consider decreasing the parallel count of this job in ".gitlab/ci/target-test.yml"'; exit 0; }
  403. # clone test env configs
  404. - retry_failed git clone $TEST_ENV_CONFIG_REPO
  405. - python $CHECKOUT_REF_SCRIPT ci-test-runner-configs ci-test-runner-configs
  406. # git clone the known failure cases repo, run test
  407. - retry_failed git clone $KNOWN_FAILURE_CASES_REPO known_failure_cases
  408. # run test
  409. - cd tools/ci/python_packages/tiny_test_fw/bin
  410. - run_cmd python Runner.py $TEST_CASE_PATH -c $CONFIG_FILE -e $ENV_FILE --known_failure_cases_file $CI_PROJECT_DIR/known_failure_cases/known_failure_cases.txt
  411. .example_test_template:
  412. extends: .target_test_job_template
  413. needs:
  414. - assign_example_test
  415. variables:
  416. TEST_CASE_PATH: "$CI_PROJECT_DIR/examples"
  417. CONFIG_FILE_PATH: "${CI_PROJECT_DIR}/examples/test_configs"
  418. test_weekend_mqtt:
  419. extends:
  420. - .test_app_esp32_template
  421. - .rules:labels:weekend_test
  422. tags:
  423. - ESP32
  424. - ethernet_router
  425. script:
  426. - export MQTT_PUBLISH_TEST=1
  427. - export TEST_PATH=$CI_PROJECT_DIR/tools/test_apps/protocols/mqtt/publish_connect_test
  428. - cd $IDF_PATH/tools/ci/python_packages/tiny_test_fw/bin
  429. - run_cmd python Runner.py $TEST_PATH -c $TEST_PATH/publish_connect_mqtt_.yml
  430. .example_test_esp32_template:
  431. extends:
  432. - .example_test_template
  433. - .rules:test:example_test-esp32
  434. .example_test_esp32s2_template:
  435. extends:
  436. - .example_test_template
  437. - .rules:test:example_test-esp32s2
  438. .example_test_esp32c2_template:
  439. extends:
  440. - .example_test_template
  441. - .rules:test:example_test-esp32c2
  442. .example_test_esp32c3_template:
  443. extends:
  444. - .example_test_template
  445. - .rules:test:example_test-esp32c3
  446. .example_test_esp32s3_template:
  447. extends:
  448. - .example_test_template
  449. - .rules:test:example_test-esp32s3
  450. example_test_001B_V3:
  451. extends: .example_test_esp32_template
  452. tags:
  453. - ESP32
  454. - Example_EthKitV12
  455. example_test_001C:
  456. extends: .example_test_esp32_template
  457. parallel: 2
  458. tags:
  459. - ESP32
  460. - Example_GENERIC
  461. example_test_protocols:
  462. extends:
  463. - .example_test_esp32_template
  464. - .rules:test:example_test-esp32-wifi
  465. tags:
  466. - ESP32
  467. - wifi_router
  468. example_test_002:
  469. extends:
  470. - .example_test_esp32_template
  471. - .rules:test:example_test-esp32-wifi
  472. tags:
  473. - ESP32
  474. - Example_ShieldBox_Basic
  475. example_test_ethernet_router:
  476. extends:
  477. - .example_test_esp32_template
  478. - .rules:test:example_test-esp32-ethernet
  479. tags:
  480. - ESP32
  481. - ethernet_router
  482. .example_test_003:
  483. extends: .example_test_esp32_template
  484. tags:
  485. - ESP32
  486. - Example_SDIO
  487. example_test_004A:
  488. extends: .example_test_esp32_template
  489. tags:
  490. - ESP32
  491. - Example_TWAI1
  492. example_test_004B:
  493. extends: .example_test_esp32_template
  494. tags:
  495. - ESP32
  496. - Example_TWAI2
  497. example_test_005:
  498. extends:
  499. - .example_test_esp32_template
  500. - .rules:test:example_test-esp32-bt
  501. tags:
  502. - ESP32
  503. - Example_WIFI_BT
  504. example_test_006:
  505. extends:
  506. - .example_test_esp32_template
  507. - .rules:labels:iperf_stress_test
  508. tags:
  509. - ESP32
  510. - Example_ShieldBox
  511. example_test_007:
  512. extends: .example_test_esp32_template
  513. tags:
  514. - ESP32
  515. - Example_I2C_CCS811_SENSOR
  516. example_test_009:
  517. extends: .example_test_esp32_template
  518. tags:
  519. - ESP32
  520. - test_jtag_arm
  521. variables:
  522. SETUP_TOOLS: "1"
  523. PYTHON_VER: 3
  524. example_test_010:
  525. extends: .example_test_esp32_template
  526. tags:
  527. - ESP32
  528. - Example_ExtFlash
  529. example_test_011:
  530. extends: .example_test_esp32_template
  531. tags:
  532. - ESP32
  533. - Example_T2_RS485
  534. example_test_013:
  535. extends: .example_test_esp32_template
  536. tags:
  537. - ESP32
  538. - UT_T1_SDMODE
  539. example_test_016:
  540. extends: .example_test_esp32_template
  541. tags:
  542. - ESP32
  543. - Example_Modbus_TCP
  544. example_test_017:
  545. extends: .example_test_esp32s2_template
  546. tags:
  547. - ESP32S2
  548. - Example_GENERIC
  549. example_test_C3_GENERIC:
  550. extends: .example_test_esp32c3_template
  551. parallel: 2
  552. tags:
  553. - ESP32C3
  554. - Example_GENERIC
  555. example_test_C2_GENERIC:
  556. extends: .example_test_esp32c2_template
  557. tags:
  558. - ESP32C2
  559. - Example_GENERIC
  560. example_test_ESP32_SDSPI:
  561. extends: .example_test_esp32_template
  562. tags:
  563. - ESP32
  564. - UT_T1_SPIMODE
  565. example_test_ESP32S2_SDSPI:
  566. extends: .example_test_esp32s2_template
  567. tags:
  568. - ESP32S2
  569. - UT_T1_SPIMODE
  570. example_test_ESP32C3_SDSPI:
  571. extends: .example_test_esp32c3_template
  572. tags:
  573. - ESP32C3
  574. - UT_T1_SPIMODE
  575. .test_app_template:
  576. extends: .target_test_job_template
  577. needs:
  578. - assign_custom_test
  579. variables:
  580. GIT_DEPTH: 1
  581. TEST_CASE_PATH: "$CI_PROJECT_DIR/tools/test_apps"
  582. CONFIG_FILE_PATH: "${CI_PROJECT_DIR}/tools/test_apps/test_configs"
  583. .test_app_esp32_template:
  584. extends:
  585. - .test_app_template
  586. - .rules:test:custom_test-esp32
  587. .test_app_esp32s2_template:
  588. extends:
  589. - .test_app_template
  590. - .rules:test:custom_test-esp32s2
  591. .test_app_esp32c2_template:
  592. extends:
  593. - .test_app_template
  594. - .rules:test:custom_test-esp32c2
  595. .test_app_esp32c3_template:
  596. extends:
  597. - .test_app_template
  598. - .rules:test:custom_test-esp32c3
  599. .test_app_esp32s3_template:
  600. extends:
  601. - .test_app_template
  602. - .rules:test:custom_test-esp32s3
  603. test_app_test_001:
  604. extends: .test_app_esp32_template
  605. tags:
  606. - ESP32
  607. - test_jtag_arm
  608. variables:
  609. SETUP_TOOLS: "1"
  610. test_app_test_eth:
  611. extends: .test_app_esp32_template
  612. tags:
  613. - ESP32
  614. - ethernet_router
  615. test_app_test_004:
  616. extends: .test_app_esp32s2_template
  617. tags:
  618. - ESP32S2
  619. - Example_GENERIC
  620. test_app_test_esp32c2_generic:
  621. extends: .test_app_esp32c2_template
  622. tags:
  623. - ESP32C2
  624. - Example_GENERIC
  625. - xtal_40mhz
  626. test_app_test_esp32c2_26mhz:
  627. extends: .test_app_esp32c2_template
  628. tags:
  629. - ESP32C2
  630. - xtal_26mhz
  631. test_app_test_005:
  632. extends: .test_app_esp32c3_template
  633. tags:
  634. - ESP32C3
  635. - Example_GENERIC
  636. test_app_test_006:
  637. extends: .test_app_esp32s3_template
  638. tags:
  639. - ESP32S3
  640. - Example_GENERIC
  641. test_app_test_esp32_generic:
  642. extends: .test_app_esp32_template
  643. tags:
  644. - ESP32
  645. - Example_GENERIC
  646. .unit_test_template:
  647. extends: .target_test_job_template
  648. needs: # the assign already needs all the build jobs
  649. - assign_unit_test
  650. variables:
  651. GIT_DEPTH: 1
  652. TEST_CASE_PATH: "$CI_PROJECT_DIR/tools/unit-test-app"
  653. CONFIG_FILE_PATH: "${CI_PROJECT_DIR}/components/idf_test/unit_test/test_configs"
  654. .unit_test_esp32_template:
  655. extends:
  656. - .unit_test_template
  657. - .rules:test:unit_test-esp32
  658. .unit_test_esp32s2_template:
  659. extends:
  660. - .unit_test_template
  661. - .rules:test:unit_test-esp32s2
  662. .unit_test_esp32s3_template:
  663. extends:
  664. - .unit_test_template
  665. - .rules:test:unit_test-esp32s3
  666. .unit_test_esp32c2_template:
  667. extends:
  668. - .unit_test_template
  669. - .rules:test:unit_test-esp32c2
  670. .unit_test_esp32c3_template:
  671. extends:
  672. - .unit_test_template
  673. - .rules:test:unit_test-esp32c3
  674. UT_001:
  675. extends: .unit_test_esp32_template
  676. parallel: 50
  677. tags:
  678. - ESP32_IDF
  679. - UT_T1_1
  680. # Max. allowed value of 'parallel' is 50.
  681. UT_002:
  682. extends: .unit_test_esp32_template
  683. parallel: 21
  684. tags:
  685. - ESP32_IDF
  686. - UT_T1_1
  687. - psram
  688. UT_003:
  689. extends: .unit_test_esp32_template
  690. parallel: 2
  691. tags:
  692. - ESP32_IDF
  693. - UT_T1_SDMODE
  694. UT_004:
  695. extends: .unit_test_esp32_template
  696. tags:
  697. - ESP32_IDF
  698. - UT_T1_SPIMODE
  699. UT_005:
  700. extends: .unit_test_esp32_template
  701. tags:
  702. - ESP32_IDF
  703. - UT_T1_SDMODE
  704. - psram
  705. UT_006:
  706. extends: .unit_test_esp32_template
  707. tags:
  708. - ESP32_IDF
  709. - UT_T1_SPIMODE
  710. - psram
  711. UT_007:
  712. extends: .unit_test_esp32_template
  713. parallel: 2
  714. tags:
  715. - ESP32_IDF
  716. - UT_T1_1
  717. UT_008:
  718. extends: .unit_test_esp32_template
  719. tags:
  720. - ESP32_IDF
  721. - UT_T1_GPIO
  722. - psram
  723. UT_014:
  724. extends: .unit_test_esp32_template
  725. tags:
  726. - ESP32_IDF
  727. - UT_T2_RS485
  728. - psram
  729. UT_017:
  730. extends: .unit_test_esp32_template
  731. tags:
  732. - ESP32_IDF
  733. - EMMC
  734. UT_018:
  735. extends: .unit_test_esp32_template
  736. parallel: 2
  737. tags:
  738. - ESP32_IDF
  739. - UT_T1_1
  740. - 8Mpsram
  741. UT_020:
  742. extends: .unit_test_esp32_template
  743. tags:
  744. - ESP32_IDF
  745. - Example_SPI_Multi_device
  746. - psram
  747. UT_022:
  748. extends: .unit_test_esp32_template
  749. tags:
  750. - ESP32_IDF
  751. - UT_T2_I2C
  752. - psram
  753. UT_028:
  754. extends: .unit_test_esp32_template
  755. tags:
  756. - ESP32_IDF
  757. - UT_T2_1
  758. - psram
  759. UT_033:
  760. extends: .unit_test_esp32_template
  761. tags:
  762. - ESP32_IDF
  763. - UT_T2_Ethernet
  764. - psram
  765. UT_034:
  766. extends: .unit_test_esp32_template
  767. parallel: 2
  768. tags:
  769. - ESP32_IDF
  770. - UT_T1_ESP_FLASH
  771. UT_035:
  772. extends: .unit_test_esp32s2_template
  773. parallel: 50
  774. tags:
  775. - ESP32S2_IDF
  776. - UT_T1_1
  777. UT_036:
  778. extends: .unit_test_esp32_template
  779. tags:
  780. - ESP32_IDF
  781. - UT_T1_PSRAMV0
  782. - psram
  783. UT_038:
  784. extends: .unit_test_esp32s2_template
  785. parallel: 2
  786. tags:
  787. - ESP32S2_IDF
  788. - UT_T1_ESP_FLASH
  789. UT_041:
  790. extends: .unit_test_esp32_template
  791. tags:
  792. - ESP32_IDF
  793. - UT_T1_no32kXTAL
  794. - psram
  795. UT_043:
  796. extends: .unit_test_esp32_template
  797. tags:
  798. - ESP32_IDF
  799. - UT_T1_32kXTAL
  800. - psram
  801. UT_044:
  802. extends:
  803. - .unit_test_esp32_template
  804. - .rules:test:unit_test-esp32-sdio
  805. tags:
  806. - ESP32_IDF
  807. - UT_SDIO
  808. UT_045:
  809. extends:
  810. - .unit_test_esp32_template
  811. - .rules:test:unit_test-esp32-sdio
  812. tags:
  813. - ESP32_IDF
  814. - UT_SDIO
  815. - psram
  816. UT_046:
  817. extends: .unit_test_esp32_template
  818. tags:
  819. - ESP32_IDF
  820. - UT_T1_GPIO
  821. UT_047:
  822. extends: .unit_test_esp32s2_template
  823. parallel: 6
  824. tags:
  825. - ESP32S2_IDF
  826. - UT_T1_1
  827. UT_S2_SPI_DUAL:
  828. extends: .unit_test_esp32s2_template
  829. tags:
  830. - ESP32S2_IDF
  831. - Example_SPI_Multi_device
  832. UT_S2_SDSPI:
  833. extends: .unit_test_esp32s2_template
  834. tags:
  835. - ESP32S2_IDF
  836. - UT_T1_SPIMODE
  837. UT_C2:
  838. extends: .unit_test_esp32c2_template
  839. parallel: 21
  840. tags:
  841. - ESP32C2_IDF
  842. - UT_T1_1
  843. - xtal_40mhz
  844. UT_C2_SPI_DUAL:
  845. extends:
  846. - .unit_test_esp32c2_template
  847. - .rules:test:unit_test-esp32c2-spi_multi
  848. tags:
  849. - ESP32C2_IDF
  850. - Example_SPI_Multi_device
  851. - xtal_40mhz
  852. UT_C2_26M:
  853. extends: .unit_test_esp32c2_template
  854. tags:
  855. - ESP32C2_IDF
  856. - UT_T1_1
  857. - xtal_26mhz
  858. UT_C3:
  859. extends: .unit_test_esp32c3_template
  860. parallel: 31
  861. tags:
  862. - ESP32C3_IDF
  863. - UT_T1_1
  864. UT_C3_FLASH:
  865. extends: .unit_test_esp32c3_template
  866. parallel: 2
  867. tags:
  868. - ESP32C3_IDF
  869. - UT_T1_ESP_FLASH
  870. UT_C3_SPI_DUAL:
  871. extends: .unit_test_esp32c3_template
  872. tags:
  873. - ESP32C3_IDF
  874. - Example_SPI_Multi_device
  875. UT_C3_I2C:
  876. extends: .unit_test_esp32c3_template
  877. tags:
  878. - ESP32C3_IDF
  879. - UT_T2_I2C
  880. UT_C3_FLASH_SUSPEND:
  881. extends: .unit_test_esp32c3_template
  882. tags:
  883. - ESP32C3_IDF
  884. - UT_T1_Flash_Suspend
  885. UT_C3_SDSPI:
  886. extends: .unit_test_esp32c3_template
  887. tags:
  888. - ESP32C3_IDF
  889. - UT_T1_SPIMODE
  890. UT_S3:
  891. extends: .unit_test_esp32s3_template
  892. parallel: 29
  893. tags:
  894. - ESP32S3_IDF
  895. - UT_T1_1
  896. UT_S3_QUAD_PSRAM:
  897. extends: .unit_test_esp32s3_template
  898. parallel: 4
  899. tags:
  900. - ESP32S3_IDF
  901. - UT_T1_1
  902. - quad_psram
  903. UT_S3_SPI_DUAL:
  904. extends: .unit_test_esp32s3_template
  905. tags:
  906. - ESP32S3_IDF
  907. - Example_SPI_Multi_device
  908. UT_S3_FLASH:
  909. extends: .unit_test_esp32s3_template
  910. parallel: 2
  911. tags:
  912. - ESP32S3_IDF
  913. - UT_T1_ESP_FLASH
  914. .integration_test_template:
  915. extends:
  916. - .target_test_job_template
  917. - .rules:test:integration_test
  918. - .before_script_minimal
  919. image: ${CI_INTEGRATION_TEST_ENV_IMAGE}
  920. cache: []
  921. needs: # the assign already needs all the build jobs
  922. - assign_integration_test
  923. variables:
  924. LOCAL_ENV_CONFIG_PATH: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/ESP32_IDF"
  925. LOG_PATH: "${CI_PROJECT_DIR}/TEST_LOGS"
  926. TEST_CASE_FILE_PATH: "$CI_PROJECT_DIR/auto_test_script/TestCaseFiles"
  927. CONFIG_FILE_PATH: "${CI_PROJECT_DIR}/tools/ci/integration_test/test_configs"
  928. KNOWN_ISSUE_FILE: "${CI_PROJECT_DIR}/tools/ci/integration_test/KnownIssues"
  929. CI_RUNNER_SCRIPT: "${CI_PROJECT_DIR}/auto_test_script/bin/CIRunner.py"
  930. PREPARE_TEST_BIN_SCRIPT: "${CI_PROJECT_DIR}/tools/ci/integration_test/prepare_test_bins.py"
  931. PYTHONPATH: "${CI_PROJECT_DIR}/auto_test_script/packages:${CI_PROJECT_DIR}/tools/ci/python_packages:${PYTHONPATH}"
  932. SETUP_SCRIPT: "${CI_PROJECT_DIR}/auto_test_script/tools/ci/setup_idfci.sh"
  933. INITIAL_CONDITION_RETRY_COUNT: "1"
  934. script:
  935. - *define_config_file_name
  936. # first test if config file exists, if not exist, exit 0
  937. - test -e $CONFIG_FILE || exit 0
  938. # clone local test env configs
  939. - add_gitlab_ssh_keys
  940. - retry_failed git clone $TEST_ENV_CONFIG_REPO
  941. - python $CHECKOUT_REF_SCRIPT ci-test-runner-configs ci-test-runner-configs
  942. # clone test bench
  943. # can not retry if downing git lfs files failed, so using empty_branch first.
  944. - retry_failed git clone ${CI_AUTO_TEST_SCRIPT_REPO_URL} -b empty_branch
  945. - retry_failed git -C auto_test_script checkout -f ${CI_AUTO_TEST_SCRIPT_REPO_BRANCH}
  946. - python $CHECKOUT_REF_SCRIPT auto_test_script auto_test_script --customized_only
  947. - if [ -f ${SETUP_SCRIPT} ]; then ${SETUP_SCRIPT}; fi
  948. - cat ${KNOWN_ISSUE_FILE} >> ${TEST_CASE_FILE_PATH}/KnownIssues
  949. # run test
  950. - python ${PREPARE_TEST_BIN_SCRIPT} $CONFIG_FILE
  951. - python ${CI_RUNNER_SCRIPT} -l "$LOG_PATH/$JOB_FULL_NAME" -c $CONFIG_FILE -e $LOCAL_ENV_CONFIG_PATH -t $TEST_CASE_FILE_PATH
  952. .integration_test_esp32c3_template:
  953. extends:
  954. - .integration_test_template
  955. variables:
  956. LOCAL_ENV_CONFIG_PATH: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/ESP32C3_IDF"
  957. nvs_compatible_test:
  958. extends: .integration_test_template
  959. artifacts:
  960. when: always
  961. paths:
  962. - $LOG_PATH
  963. - nvs_wifi.bin
  964. expire_in: 1 mos
  965. tags:
  966. - ESP32_IDF
  967. - NVS_Compatible
  968. script:
  969. - *define_config_file_name
  970. # first test if config file exists, if not exist, exit 0
  971. - test -e $CONFIG_FILE || exit 0
  972. # clone local test env configs
  973. - add_gitlab_ssh_keys
  974. - retry_failed git clone $TEST_ENV_CONFIG_REPO
  975. - python $CHECKOUT_REF_SCRIPT ci-test-runner-configs ci-test-runner-configs
  976. # clone test bench
  977. # can not retry if downing git lfs files failed, so using empty_branch first.
  978. - retry_failed git clone ${CI_AUTO_TEST_SCRIPT_REPO_URL} -b empty_branch
  979. - retry_failed git -C auto_test_script checkout -f ${CI_AUTO_TEST_SCRIPT_REPO_BRANCH}
  980. - if [ -f ${SETUP_SCRIPT} ]; then ${SETUP_SCRIPT}; fi
  981. - python $CHECKOUT_REF_SCRIPT auto_test_script auto_test_script --customized_only
  982. # prepare nvs bins
  983. - cd auto_test_script
  984. - ./tools/prepare_nvs_bin.sh
  985. # run test
  986. - python ${PREPARE_TEST_BIN_SCRIPT} $CONFIG_FILE
  987. - python ${CI_RUNNER_SCRIPT} -l "$LOG_PATH/$JOB_FULL_NAME" -c $CONFIG_FILE -e $LOCAL_ENV_CONFIG_PATH -t $TEST_CASE_FILE_PATH
  988. IT_001:
  989. extends: .integration_test_template
  990. parallel: 2
  991. tags:
  992. - ESP32_IDF
  993. - SSC_T1_4
  994. IT_002:
  995. extends: .integration_test_template
  996. tags:
  997. - ESP32_IDF
  998. - SSC_T1_2
  999. IT_003:
  1000. extends: .integration_test_template
  1001. parallel: 9
  1002. tags:
  1003. - ESP32_IDF
  1004. - SSC_T2_5
  1005. IT_005:
  1006. extends: .integration_test_template
  1007. tags:
  1008. - ESP32_IDF
  1009. - SSC_T1_5
  1010. IT_006:
  1011. extends: .integration_test_template
  1012. parallel: 5
  1013. tags:
  1014. - ESP32_IDF
  1015. - SSC_T1_6
  1016. IT_007:
  1017. extends: .integration_test_template
  1018. tags:
  1019. - ESP32_IDF
  1020. - SSC_T1_7
  1021. IT_008:
  1022. extends: .integration_test_template
  1023. tags:
  1024. - ESP32_IDF
  1025. - SSC_T1_8
  1026. IT_011:
  1027. extends: .integration_test_template
  1028. tags:
  1029. - ESP32_IDF
  1030. - SSC_T1_MESH1
  1031. IT_012:
  1032. extends: .integration_test_template
  1033. parallel: 2
  1034. tags:
  1035. - ESP32_IDF
  1036. - SSC_T2_MESH1
  1037. IT_013:
  1038. extends: .integration_test_template
  1039. tags:
  1040. - ESP32_IDF
  1041. - SSC_T3_MESH1
  1042. IT_014:
  1043. extends: .integration_test_template
  1044. tags:
  1045. - ESP32_IDF
  1046. - SSC_T6_MESH1
  1047. IT_015:
  1048. extends: .integration_test_template
  1049. tags:
  1050. - ESP32_IDF
  1051. - SSC_T12_MESH1
  1052. IT_016:
  1053. extends: .integration_test_template
  1054. allow_failure: true
  1055. tags:
  1056. - ESP32_IDF
  1057. - SSC_T50_MESH1
  1058. IT_017:
  1059. extends: .integration_test_template
  1060. tags:
  1061. - ESP32_IDF
  1062. - SSC_T1_MESH2
  1063. IT_018:
  1064. extends: .integration_test_template
  1065. tags:
  1066. - ESP32_IDF
  1067. - SSC_T1_9
  1068. IT_019:
  1069. extends: .integration_test_template
  1070. tags:
  1071. - ESP32_IDF
  1072. - SSC_T2_2
  1073. IT_020:
  1074. extends: .integration_test_template
  1075. tags:
  1076. - ESP32_IDF
  1077. - SSC_T2_3
  1078. IT_022:
  1079. extends: .integration_test_template
  1080. tags:
  1081. - ESP32_IDF
  1082. - SSC_T3_2
  1083. IT_C3_001:
  1084. extends: .integration_test_esp32c3_template
  1085. parallel: 6
  1086. tags:
  1087. - ESP32C3_IDF
  1088. - SSC_T2_5