Merge branch 'bugfix/unit_test_partition_size' into 'master'

unit test app: Require 4MB flash

See merge request idf/esp-idf!2448
This commit is contained in:
Ivan Grokhotkov 2018-05-25 19:39:44 +08:00
commit 7b96e70755
3 changed files with 11 additions and 3 deletions

View file

@ -12,6 +12,12 @@ ESP-IDF unit tests are run using Unit Test App. The app can be built with the un
* Follow the printed instructions to flash, or run `make flash`.
* Unit test have a few preset sdkconfigs. It provides command `make ut-clean-config_name` and `make ut-build-config_name` (where `config_name` is the file name under `unit-test-app/configs` folder) to build with preset configs. For example, you can use `make ut-build-default TESTS_ALL=1` to build with config file `unit-test-app/configs/default`. Built binary for this config will be copied to `unit-test-app/output/config_name` folder.
# Flash Size
The unit test partition table assumes a 4MB flash size. When testing `TESTS_ALL=1`, this additional factory app partition size is required.
If building unit tests to run on a smaller flash size, edit `partition_table_unit_tests_app.csv` and use `TEST_COMPONENTS=` instead of `TESTS_ALL` if tests don't fit in a smaller factory app partition (exact size will depend on configured options).
# Running Unit Tests
The unit test loader will prompt by showing a menu of available tests to run:

View file

@ -5,10 +5,12 @@
nvs, data, nvs, 0x9000, 0x4000
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000
factory, 0, 0, 0x10000, 0x140000
factory, 0, 0, 0x10000, 0x240000
# these OTA partitions are used for tests, but can't fit real OTA apps in them
# (done this way so tests can run in 2MB of flash.)
# (done this way to reduce total flash usage.)
ota_0, 0, ota_0, , 64K
ota_1, 0, ota_1, , 64K
# flash_test partition used for SPI flash tests, WL FAT tests, and SPIFFS tests
flash_test, data, fat, , 528K
# Note: still 1MB of a 4MB flash left free for some other purpose

1 # Special partition table for unit test app
5 nvs, data, nvs, 0x9000, 0x4000
6 otadata, data, ota, 0xd000, 0x2000
7 phy_init, data, phy, 0xf000, 0x1000
8 factory, 0, 0, 0x10000, 0x140000 factory, 0, 0, 0x10000, 0x240000
9 # these OTA partitions are used for tests, but can't fit real OTA apps in them
10 # (done this way so tests can run in 2MB of flash.) # (done this way to reduce total flash usage.)
11 ota_0, 0, ota_0, , 64K
12 ota_1, 0, ota_1, , 64K
13 # flash_test partition used for SPI flash tests, WL FAT tests, and SPIFFS tests
14 flash_test, data, fat, , 528K
15 # Note: still 1MB of a 4MB flash left free for some other purpose
16

View file

@ -1,6 +1,6 @@
CONFIG_LOG_BOOTLOADER_LEVEL_WARN=y
CONFIG_ESPTOOLPY_BAUD_921600B=y
CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=n
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partition_table_unit_test_app.csv"