From bde4b1b350312a364ffdc31ef69261dc0676e007 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Thu, 11 Jun 2020 14:22:05 +0800 Subject: [PATCH] ci: Modify some dut-unrelated example tests env tag from Example_WIFI to Example_GENERIC --- examples/cxx/exceptions/example_test.py | 2 +- examples/cxx/pthread/example_test.py | 2 +- examples/cxx/rtti/example_test.py | 2 +- examples/get-started/blink/example_test.py | 2 +- examples/storage/nvs_rw_blob/nvs_rw_blob_example_test.py | 2 +- .../storage/nvs_rw_value/nvs_rw_value_example_test.py | 2 +- .../nvs_rw_value_cxx/nvs_rw_value_cxx_example_test.py | 2 +- .../partition_find/partition_find_example_test.py | 2 +- .../partition_mmap/partition_mmap_example_test.py | 2 +- .../partition_ops/partition_ops_example_test.py | 2 +- examples/storage/parttool/example_test.py | 2 +- examples/storage/spiffs/spiffs_example_test.py | 2 +- examples/storage/spiffsgen/example_test.py | 2 +- .../wear_levelling/wear_levelling_example_test.py | 2 +- examples/system/base_mac_address/example_test.py | 2 +- examples/system/console/example_test.py | 2 +- examples/system/deep_sleep/example_test.py | 2 +- examples/system/efuse/example_test.py | 2 +- .../system/esp_event/default_event_loop/example_test.py | 2 +- .../system/esp_event/user_event_loops/example_test.py | 2 +- examples/system/esp_timer/example_test.py | 4 ++-- examples/system/freertos/real_time_stats/example_test.py | 2 +- examples/system/light_sleep/example_test.py | 2 +- examples/system/perfmon/example_test.py | 2 +- examples/system/select/example_test.py | 2 +- examples/system/task_watchdog/example_test.py | 2 +- examples/system/ulp/example_test.py | 2 +- examples/system/ulp_adc/example_test.py | 2 +- examples/system/unit_test/example_test.py | 2 +- tools/ci/config/target-test.yml | 9 ++++++++- 30 files changed, 38 insertions(+), 31 deletions(-) diff --git a/examples/cxx/exceptions/example_test.py b/examples/cxx/exceptions/example_test.py index 83f019804e3..db3fa60f1e3 100644 --- a/examples/cxx/exceptions/example_test.py +++ b/examples/cxx/exceptions/example_test.py @@ -3,7 +3,7 @@ import ttfw_idf -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_system_cpp_exceptions(env, extra_data): dut = env.get_dut('cpp_exceptions_example', 'examples/cxx/exceptions', dut_class=ttfw_idf.ESP32DUT) # start test diff --git a/examples/cxx/pthread/example_test.py b/examples/cxx/pthread/example_test.py index 52acdee8d33..4156b128191 100644 --- a/examples/cxx/pthread/example_test.py +++ b/examples/cxx/pthread/example_test.py @@ -3,7 +3,7 @@ import ttfw_idf -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_cpp_pthread(env, extra_data): dut = env.get_dut('cpp_pthread', 'examples/cxx/pthread') diff --git a/examples/cxx/rtti/example_test.py b/examples/cxx/rtti/example_test.py index e25be06714a..bcf64efd514 100644 --- a/examples/cxx/rtti/example_test.py +++ b/examples/cxx/rtti/example_test.py @@ -3,7 +3,7 @@ import ttfw_idf -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_cpp_rtti_example(env, extra_data): dut = env.get_dut('cpp_rtti', 'examples/cxx/rtti', dut_class=ttfw_idf.ESP32DUT) dut.start_app() diff --git a/examples/get-started/blink/example_test.py b/examples/get-started/blink/example_test.py index 83e040b3659..c2e26af0976 100644 --- a/examples/get-started/blink/example_test.py +++ b/examples/get-started/blink/example_test.py @@ -28,7 +28,7 @@ def verify_elf_sha256_embedding(dut): raise ValueError('ELF file SHA256 mismatch') -@ttfw_idf.idf_example_test(env_tag="Example_WIFI") +@ttfw_idf.idf_example_test(env_tag="Example_GENERIC") def test_examples_blink(env, extra_data): dut = env.get_dut("blink", "examples/get-started/blink", dut_class=ttfw_idf.ESP32DUT) binary_file = os.path.join(dut.app.binary_path, "blink.bin") diff --git a/examples/storage/nvs_rw_blob/nvs_rw_blob_example_test.py b/examples/storage/nvs_rw_blob/nvs_rw_blob_example_test.py index b3fef0de5b2..dba35cc542b 100644 --- a/examples/storage/nvs_rw_blob/nvs_rw_blob_example_test.py +++ b/examples/storage/nvs_rw_blob/nvs_rw_blob_example_test.py @@ -5,7 +5,7 @@ import ttfw_idf -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_nvs_rw_blob(env, extra_data): dut = env.get_dut('nvs_rw_blob', 'examples/storage/nvs_rw_blob') diff --git a/examples/storage/nvs_rw_value/nvs_rw_value_example_test.py b/examples/storage/nvs_rw_value/nvs_rw_value_example_test.py index 980cb13be58..8eddae0ecec 100644 --- a/examples/storage/nvs_rw_value/nvs_rw_value_example_test.py +++ b/examples/storage/nvs_rw_value/nvs_rw_value_example_test.py @@ -8,7 +8,7 @@ from itertools import zip_longest -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_nvs_rw_value(env, extra_data): dut = env.get_dut('nvs_rw_value', 'examples/storage/nvs_rw_value') diff --git a/examples/storage/nvs_rw_value_cxx/nvs_rw_value_cxx_example_test.py b/examples/storage/nvs_rw_value_cxx/nvs_rw_value_cxx_example_test.py index e51cf6f1bbe..f95c8671197 100644 --- a/examples/storage/nvs_rw_value_cxx/nvs_rw_value_cxx_example_test.py +++ b/examples/storage/nvs_rw_value_cxx/nvs_rw_value_cxx_example_test.py @@ -8,7 +8,7 @@ from itertools import zip_longest -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_nvs_rw_value_cxx(env, extra_data): dut = env.get_dut('nvs_rw_value_cxx', 'examples/storage/nvs_rw_value_cxx') diff --git a/examples/storage/partition_api/partition_find/partition_find_example_test.py b/examples/storage/partition_api/partition_find/partition_find_example_test.py index 0a7b434c019..eb1abb67b4d 100644 --- a/examples/storage/partition_api/partition_find/partition_find_example_test.py +++ b/examples/storage/partition_api/partition_find/partition_find_example_test.py @@ -1,7 +1,7 @@ import ttfw_idf -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_partition_find(env, extra_data): dut = env.get_dut('partition_find', 'examples/storage/partition_api/partition_find') diff --git a/examples/storage/partition_api/partition_mmap/partition_mmap_example_test.py b/examples/storage/partition_api/partition_mmap/partition_mmap_example_test.py index d666d71100a..bb7c3fa7539 100644 --- a/examples/storage/partition_api/partition_mmap/partition_mmap_example_test.py +++ b/examples/storage/partition_api/partition_mmap/partition_mmap_example_test.py @@ -2,7 +2,7 @@ import ttfw_idf -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_partition_mmap(env, extra_data): dut = env.get_dut('partition_mmap', 'examples/storage/partition_api/partition_mmap') diff --git a/examples/storage/partition_api/partition_ops/partition_ops_example_test.py b/examples/storage/partition_api/partition_ops/partition_ops_example_test.py index 3d350657682..8520311d7ba 100644 --- a/examples/storage/partition_api/partition_ops/partition_ops_example_test.py +++ b/examples/storage/partition_api/partition_ops/partition_ops_example_test.py @@ -1,7 +1,7 @@ import ttfw_idf -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_partition_ops(env, extra_data): dut = env.get_dut('partition_ops', 'examples/storage/partition_api/partition_ops') diff --git a/examples/storage/parttool/example_test.py b/examples/storage/parttool/example_test.py index c75faf456a4..f8e258879f5 100644 --- a/examples/storage/parttool/example_test.py +++ b/examples/storage/parttool/example_test.py @@ -6,7 +6,7 @@ import ttfw_idf -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_parttool(env, extra_data): dut = env.get_dut('parttool', 'examples/storage/parttool', dut_class=ttfw_idf.ESP32DUT) dut.start_app(False) diff --git a/examples/storage/spiffs/spiffs_example_test.py b/examples/storage/spiffs/spiffs_example_test.py index 3baefe7d826..30f6616107b 100644 --- a/examples/storage/spiffs/spiffs_example_test.py +++ b/examples/storage/spiffs/spiffs_example_test.py @@ -2,7 +2,7 @@ import ttfw_idf -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_spiffs(env, extra_data): dut = env.get_dut('spiffs', 'examples/storage/spiffs') diff --git a/examples/storage/spiffsgen/example_test.py b/examples/storage/spiffsgen/example_test.py index 0fe0045681c..724fef9c8e3 100644 --- a/examples/storage/spiffsgen/example_test.py +++ b/examples/storage/spiffsgen/example_test.py @@ -5,7 +5,7 @@ import ttfw_idf -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_spiffsgen(env, extra_data): # Test with default build configurations dut = env.get_dut('spiffsgen', 'examples/storage/spiffsgen', dut_class=ttfw_idf.ESP32DUT) diff --git a/examples/storage/wear_levelling/wear_levelling_example_test.py b/examples/storage/wear_levelling/wear_levelling_example_test.py index 7c0e72e09c6..a5614fbd085 100644 --- a/examples/storage/wear_levelling/wear_levelling_example_test.py +++ b/examples/storage/wear_levelling/wear_levelling_example_test.py @@ -2,7 +2,7 @@ import ttfw_idf -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_wear_levelling(env, extra_data): dut = env.get_dut('wear_levelling', 'examples/storage/wear_levelling') diff --git a/examples/system/base_mac_address/example_test.py b/examples/system/base_mac_address/example_test.py index d067ad3a901..827a4d81b3c 100644 --- a/examples/system/base_mac_address/example_test.py +++ b/examples/system/base_mac_address/example_test.py @@ -4,7 +4,7 @@ import ttfw_idf -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_base_mac_address(env, extra_data): dut = env.get_dut('base_mac_address', 'examples/system/base_mac_address') diff --git a/examples/system/console/example_test.py b/examples/system/console/example_test.py index 87cc8e3921a..b723392809b 100644 --- a/examples/system/console/example_test.py +++ b/examples/system/console/example_test.py @@ -3,7 +3,7 @@ import ttfw_idf -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_system_console(env, extra_data): dut = env.get_dut('console_example', 'examples/system/console', app_config_name='history') print("Using binary path: {}".format(dut.app.binary_path)) diff --git a/examples/system/deep_sleep/example_test.py b/examples/system/deep_sleep/example_test.py index 07e265b3ffd..dc6abfe4808 100644 --- a/examples/system/deep_sleep/example_test.py +++ b/examples/system/deep_sleep/example_test.py @@ -3,7 +3,7 @@ import ttfw_idf -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_deep_sleep(env, extra_data): dut = env.get_dut('deep_sleep', 'examples/system/deep_sleep') diff --git a/examples/system/efuse/example_test.py b/examples/system/efuse/example_test.py index 6a6b7a50770..255c677b25b 100644 --- a/examples/system/efuse/example_test.py +++ b/examples/system/efuse/example_test.py @@ -3,7 +3,7 @@ import ttfw_idf -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_efuse(env, extra_data): dut = env.get_dut('efuse', 'examples/system/efuse') diff --git a/examples/system/esp_event/default_event_loop/example_test.py b/examples/system/esp_event/default_event_loop/example_test.py index f257418273a..9019cd93cd0 100644 --- a/examples/system/esp_event/default_event_loop/example_test.py +++ b/examples/system/esp_event/default_event_loop/example_test.py @@ -81,7 +81,7 @@ def _test_iteration_events(dut): print("Deleted task event source") -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_default_event_loop_example(env, extra_data): dut = env.get_dut('default_event_loop', 'examples/system/esp_event/default_event_loop') diff --git a/examples/system/esp_event/user_event_loops/example_test.py b/examples/system/esp_event/user_event_loops/example_test.py index 7bb3135bf34..e4334117ed5 100644 --- a/examples/system/esp_event/user_event_loops/example_test.py +++ b/examples/system/esp_event/user_event_loops/example_test.py @@ -8,7 +8,7 @@ TASK_ITERATION_HANDLING = "handling TASK_EVENTS:TASK_ITERATION_EVENT from {}, iteration {}" -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_user_event_loops_example(env, extra_data): dut = env.get_dut('user_event_loops', 'examples/system/esp_event/user_event_loops', dut_class=ttfw_idf.ESP32DUT) diff --git a/examples/system/esp_timer/example_test.py b/examples/system/esp_timer/example_test.py index 9963bb768fa..ddc9c85d513 100644 --- a/examples/system/esp_timer/example_test.py +++ b/examples/system/esp_timer/example_test.py @@ -25,7 +25,7 @@ ONE_SHOT_TIMER_PERIOD = 5000000 -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_system_esp_timer(env, extra_data): dut = env.get_dut('esp_timer_example', 'examples/system/esp_timer', dut_class=ttfw_idf.ESP32DUT) # start test @@ -50,7 +50,7 @@ def test_examples_system_esp_timer(env, extra_data): one_shot_timer_time = int(groups[0]) diff = start_time + ONE_SHOT_TIMER_PERIOD - one_shot_timer_time print('One-shot timer, time: {} us, diff: {}'.format(one_shot_timer_time, diff)) - assert(abs(diff) < 200) + assert(abs(diff) < 220) groups = dut.expect(RESTART_REGEX, timeout=3) start_time = int(groups[0]) diff --git a/examples/system/freertos/real_time_stats/example_test.py b/examples/system/freertos/real_time_stats/example_test.py index d9de7b4b77f..62f41643a8a 100644 --- a/examples/system/freertos/real_time_stats/example_test.py +++ b/examples/system/freertos/real_time_stats/example_test.py @@ -6,7 +6,7 @@ STATS_TASK_EXPECT = "Real time stats obtained" -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_real_time_stats_example(env, extra_data): dut = env.get_dut('real_time_stats', 'examples/system/freertos/real_time_stats', dut_class=ttfw_idf.ESP32DUT) dut.start_app() diff --git a/examples/system/light_sleep/example_test.py b/examples/system/light_sleep/example_test.py index 4c6e4283396..a464e1056e0 100644 --- a/examples/system/light_sleep/example_test.py +++ b/examples/system/light_sleep/example_test.py @@ -11,7 +11,7 @@ WAKEUP_INTERVAL_MS = 2000 -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_system_light_sleep(env, extra_data): dut = env.get_dut('light_sleep_example', 'examples/system/light_sleep', dut_class=ttfw_idf.ESP32DUT) dut.start_app() diff --git a/examples/system/perfmon/example_test.py b/examples/system/perfmon/example_test.py index d369deb9ef6..6ce4f98ffc7 100644 --- a/examples/system/perfmon/example_test.py +++ b/examples/system/perfmon/example_test.py @@ -2,7 +2,7 @@ import ttfw_idf -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_perfmon(env, extra_data): dut = env.get_dut('perfmon', 'examples/system/perfmon') diff --git a/examples/system/select/example_test.py b/examples/system/select/example_test.py index cace73c27af..1a7380307ff 100644 --- a/examples/system/select/example_test.py +++ b/examples/system/select/example_test.py @@ -16,7 +16,7 @@ def get_uart_msgs(i): 'uart_select_example: {} bytes were received through UART1: {}'.format(len(msg), msg)] -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_select(env, extra_data): dut = env.get_dut('select', 'examples/system/select') diff --git a/examples/system/task_watchdog/example_test.py b/examples/system/task_watchdog/example_test.py index a9f0b65b321..95c0555cc50 100644 --- a/examples/system/task_watchdog/example_test.py +++ b/examples/system/task_watchdog/example_test.py @@ -2,7 +2,7 @@ import ttfw_idf -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_task_watchdog(env, extra_data): dut = env.get_dut('task_watchdog', 'examples/system/task_watchdog') diff --git a/examples/system/ulp/example_test.py b/examples/system/ulp/example_test.py index 5c8cc45e710..11052e0931e 100644 --- a/examples/system/ulp/example_test.py +++ b/examples/system/ulp/example_test.py @@ -5,7 +5,7 @@ import ttfw_idf -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_ulp(env, extra_data): dut = env.get_dut('ulp', 'examples/system/ulp') diff --git a/examples/system/ulp_adc/example_test.py b/examples/system/ulp_adc/example_test.py index 9d6adea3a7b..87192f51ddc 100644 --- a/examples/system/ulp_adc/example_test.py +++ b/examples/system/ulp_adc/example_test.py @@ -4,7 +4,7 @@ import ttfw_idf -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_ulp_adc(env, extra_data): dut = env.get_dut('ulp_adc', 'examples/system/ulp_adc') diff --git a/examples/system/unit_test/example_test.py b/examples/system/unit_test/example_test.py index 3be000bdb8c..6313c9e0d6e 100644 --- a/examples/system/unit_test/example_test.py +++ b/examples/system/unit_test/example_test.py @@ -3,7 +3,7 @@ import ttfw_idf -@ttfw_idf.idf_example_test(env_tag='Example_WIFI') +@ttfw_idf.idf_example_test(env_tag='Example_GENERIC') def test_examples_unit_test(env, extra_data): dut = env.get_dut('unit_test', 'examples/system/unit_test') diff --git a/tools/ci/config/target-test.yml b/tools/ci/config/target-test.yml index 1ec77eac65e..b5deb399dd6 100644 --- a/tools/ci/config/target-test.yml +++ b/tools/ci/config/target-test.yml @@ -206,7 +206,7 @@ test_weekend_network: example_test_001A: extends: .example_test_template - parallel: 5 + parallel: 4 artifacts: when: always paths: @@ -222,6 +222,13 @@ example_test_001B: - ESP32 - Example_EthKitV1 +example_test_001C: + extends: .example_test_template + parallel: 2 + tags: + - ESP32 + - Example_GENERIC + example_test_002: extends: .example_test_template image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG