From 51d2d9041c705a68f0e1d8e14dfe7cadd2592964 Mon Sep 17 00:00:00 2001 From: KonstantinKondrashov Date: Thu, 31 Oct 2019 13:22:41 +0800 Subject: [PATCH] soc/esp32: Add test_env for 32kHz XTAL unit tests --- .gitlab-ci.yml | 50 ++++++++++++++++++++++++ components/soc/esp32/test/test_rtc_clk.c | 13 ++---- 2 files changed, 53 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7f692c7b48..0c7b067c8d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1238,6 +1238,56 @@ UT_033: - UT_T1_PSRAMV0 - psram +UT_034: + <<: *unit_test_template + tags: + - ESP32_IDF + - UT_T1_no32kXTAL + +UT_035: + <<: *unit_test_template + tags: + - ESP32_IDF + - UT_T1_no32kXTAL + +UT_036: + <<: *unit_test_template + tags: + - ESP32_IDF + - UT_T1_no32kXTAL + +UT_037: + <<: *unit_test_template + tags: + - ESP32_IDF + - UT_T1_no32kXTAL + - psram + +UT_038: + <<: *unit_test_template + tags: + - ESP32_IDF + - UT_T1_32kXTAL + +UT_039: + <<: *unit_test_template + tags: + - ESP32_IDF + - UT_T1_32kXTAL + +UT_040: + <<: *unit_test_template + tags: + - ESP32_IDF + - UT_T1_32kXTAL + +UT_041: + <<: *unit_test_template + tags: + - ESP32_IDF + - UT_T1_32kXTAL + - psram + IT_001: <<: *test_template parallel: 3 diff --git a/components/soc/esp32/test/test_rtc_clk.c b/components/soc/esp32/test/test_rtc_clk.c index ee05a302bf..55cee75697 100644 --- a/components/soc/esp32/test/test_rtc_clk.c +++ b/components/soc/esp32/test/test_rtc_clk.c @@ -219,10 +219,7 @@ static void start_freq(rtc_slow_freq_t required_src_freq, uint32_t start_delay_m printf("Test passed successfully\n"); } -#ifdef CONFIG_SPIRAM_SUPPORT -// PSRAM tests run on ESP-WROVER-KIT boards, which have the 32k XTAL installed. -// Other tests may run on DevKitC boards, which don't have a 32k XTAL. -TEST_CASE("Test starting external RTC quartz", "[rtc_clk]") +TEST_CASE("Test starting external RTC quartz", "[rtc_clk][test_env=UT_T1_32kXTAL]") { int i = 0, fail = 0; uint32_t start_time; @@ -263,15 +260,13 @@ TEST_CASE("Test starting external RTC quartz", "[rtc_clk]") printf("Test passed successfully\n"); } -TEST_CASE("Test starting 'External 32kHz XTAL' on the board with it.", "[rtc_clk]") +TEST_CASE("Test starting 'External 32kHz XTAL' on the board with it.", "[rtc_clk][test_env=UT_T1_32kXTAL]") { start_freq(RTC_SLOW_FREQ_32K_XTAL, 200); start_freq(RTC_SLOW_FREQ_32K_XTAL, 0); } -#else - -TEST_CASE("Test starting 'External 32kHz XTAL' on the board without it.", "[rtc_clk][ignore]") +TEST_CASE("Test starting 'External 32kHz XTAL' on the board without it.", "[rtc_clk][test_env=UT_T1_no32kXTAL]") { printf("Tries to start the 'External 32kHz XTAL' on the board without it. " "Clock switching to 'Internal 150 kHz RC oscillator'.\n"); @@ -284,5 +279,3 @@ TEST_CASE("Test starting 'External 32kHz XTAL' on the board without it.", "[rtc_ start_freq(RTC_SLOW_FREQ_RTC, 200); start_freq(RTC_SLOW_FREQ_RTC, 0); } - -#endif // CONFIG_SPIRAM_SUPPORT