From fae116bb2e15eab3ee083538508ef9fc5deb0527 Mon Sep 17 00:00:00 2001 From: KonstantinKondrashov Date: Thu, 31 Oct 2019 13:22:41 +0800 Subject: [PATCH 1/2] soc/esp32: Add test_env for 32kHz XTAL unit tests --- components/soc/esp32/test/test_rtc_clk.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/components/soc/esp32/test/test_rtc_clk.c b/components/soc/esp32/test/test_rtc_clk.c index 698303558..03c046f2c 100644 --- a/components/soc/esp32/test/test_rtc_clk.c +++ b/components/soc/esp32/test/test_rtc_clk.c @@ -218,10 +218,7 @@ static void start_freq(rtc_slow_freq_t required_src_freq, uint32_t start_delay_m printf("Test passed successfully\n"); } -#ifdef CONFIG_ESP32_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; @@ -262,15 +259,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"); @@ -283,5 +278,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_ESP32_SPIRAM_SUPPORT From 5bb0b3970097775e77071d9d7e18b57f19b2e102 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Thu, 14 Nov 2019 11:11:12 +0800 Subject: [PATCH 2/2] ci: Add test configs for 32kHz crystals --- tools/ci/config/target-test.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tools/ci/config/target-test.yml b/tools/ci/config/target-test.yml index d82f2fdf6..7f4d791ec 100644 --- a/tools/ci/config/target-test.yml +++ b/tools/ci/config/target-test.yml @@ -452,6 +452,33 @@ UT_034: - UT_T1_PSRAMV0 - psram +UT_035: + extends: .unit_test_template + parallel: 3 + tags: + - ESP32_IDF + - UT_T1_no32kXTAL + +UT_036: + extends: .unit_test_template + tags: + - ESP32_IDF + - UT_T1_no32kXTAL + - psram + +UT_037: + extends: .unit_test_template + parallel: 3 + tags: + - ESP32_IDF + - UT_T1_32kXTAL + +UT_038: + extends: .unit_test_template + tags: + - ESP32_IDF + - UT_T1_32kXTAL + - psram nvs_compatible_test: extends: .test_template