Procházet zdrojové kódy

Merge branch 'ci/reduce_heap_tests' into 'master'

ci(heap): reduce the number of test apps built

See merge request espressif/esp-idf!26643
Marius Vikhammer před 2 roky
rodič
revize
20b6d92b91

+ 9 - 0
components/heap/test_apps/.build-test-rules.yml

@@ -2,8 +2,17 @@
 
 components/heap/test_apps/heap_tests:
   disable:
+    - if: IDF_TARGET == "linux"
     - if: CONFIG_NAME == "psram" and SOC_SPIRAM_SUPPORTED != 1
     - if: CONFIG_NAME == "psram_all_ext" and SOC_SPIRAM_SUPPORTED != 1
+    # These 3 configs are build only for non-nightly, buildig for a single target is sufficient
+    - if: CONFIG_NAME == "no_poisoning" and (IDF_TARGET != "esp32" and NIGHTLY_RUN != "1")
+    - if: CONFIG_NAME == "light_poisoning" and (IDF_TARGET != "esp32" and NIGHTLY_RUN != "1")
+    - if: CONFIG_NAME == "comprehensive_poisoning" and (IDF_TARGET != "esp32" and NIGHTLY_RUN != "1")
+    # Non-target specific functionality, only test on a single target in default pipeline
+    - if: CONFIG_NAME == "in_flash" and (IDF_TARGET != "esp32c6" and NIGHTLY_RUN != "1")
+  depends_components:
+    - heap
 
 components/heap/test_apps/host_test_linux:
   enable:

+ 11 - 32
components/heap/test_apps/heap_tests/pytest_heap.py

@@ -39,8 +39,7 @@ def test_heap_poisoning_qemu(dut: Dut) -> None:
 
 
 @pytest.mark.generic
-@pytest.mark.esp32
-@pytest.mark.esp32c6
+@pytest.mark.supported_targets
 @pytest.mark.parametrize(
     'config',
     [
@@ -71,27 +70,21 @@ def test_heap(dut: Dut) -> None:
 @pytest.mark.parametrize(
     'config',
     [
-        'abort_alloc_fail'
+        'misc_options'
     ]
 )
-def test_heap_abort_on_alloc_failure(dut: Dut) -> None:
+def test_heap_misc_options(dut: Dut) -> None:
     dut.expect_exact('Press ENTER to see the list of tests')
-    dut.write('"When enabled, allocation operation failure generates an abort"')
-    dut.expect('Backtrace: ')
+    dut.write('"IRAM_8BIT capability test"')
+    dut.expect_unity_test_output()
 
+    dut.expect_exact("Enter next test, or 'enter' to see menu")
+    dut.write('"test allocation and free function hooks"')
+    dut.expect_unity_test_output()
 
-@pytest.mark.generic
-@pytest.mark.esp32
-@pytest.mark.parametrize(
-    'config',
-    [
-        '8bit_access'
-    ]
-)
-def test_heap_8bit_access(dut: Dut) -> None:
-    dut.expect_exact('Press ENTER to see the list of tests')
-    dut.write('"IRAM_8BIT capability test"')
-    dut.expect_unity_test_output(timeout=300)
+    dut.expect_exact("Enter next test, or 'enter' to see menu")
+    dut.write('"When enabled, allocation operation failure generates an abort"')
+    dut.expect('Backtrace: ')
 
 
 @pytest.mark.generic
@@ -134,17 +127,3 @@ def test_memory_protection(dut: Dut) -> None:
     dut.expect_exact('Press ENTER to see the list of tests')
     dut.write('[heap][mem_prot]')
     dut.expect_unity_test_output(timeout=300)
-
-
-@pytest.mark.generic
-@pytest.mark.esp32
-@pytest.mark.parametrize(
-    'config',
-    [
-        'func_hooks'
-    ]
-)
-def test_heap_func_hooks(dut: Dut) -> None:
-    dut.expect_exact('Press ENTER to see the list of tests')
-    dut.write('"test allocation and free function hooks"')
-    dut.expect_unity_test_output(timeout=300)

+ 0 - 1
components/heap/test_apps/heap_tests/sdkconfig.ci.abort_alloc_fail

@@ -1 +0,0 @@
-CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS=y

+ 0 - 1
components/heap/test_apps/heap_tests/sdkconfig.ci.func_hooks

@@ -1 +0,0 @@
-CONFIG_HEAP_USE_HOOKS=y

+ 2 - 0
components/heap/test_apps/heap_tests/sdkconfig.ci.8bit_access → components/heap/test_apps/heap_tests/sdkconfig.ci.misc_options

@@ -1,3 +1,5 @@
 CONFIG_IDF_TARGET="esp32"
 CONFIG_FREERTOS_UNICORE=y
 CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY=y
+CONFIG_HEAP_USE_HOOKS=y
+CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS=y