Commit graph

140 commits

Author SHA1 Message Date
xiehang
0169728ddd esp_wifi: Put some rx code to iram 2019-12-17 20:51:26 +08:00
Angus Gratton
7313da42b5 Merge branch 'test/detect_exception_in_idf_dut_v3.1' into 'release/v3.1'
tiny-test-fw: support detect exception in IDFDUT (backport v3.1)

See merge request idf/esp-idf!4544
2019-03-21 07:54:37 +08:00
He Yin Ling
042c0109a9 test: handle exception by unit test script:
unit test script will detect exception, we don't need to let test fail
when exception happened.
2019-03-19 22:15:33 +08:00
He Yin Ling
398a428e08 test: fix CI UT job pass even ut app bootup fail 2019-03-05 08:07:30 +00:00
Ivan Grokhotkov
70a9e72e06 esp_timer: fix occasional failures in "monotonic values" test
1. ref_clock used in unit tests occasionally produces time off by ~100
microseconds shortly after being started. Add a delay to let
ref_clock stabilise, until the cause is found.

2. Reduce roundoff error accumulation which would occasionally cause
the test to fail, by choosing an overflow value which can be divided
by APB frequency.

3. Move time sampling part of the test into an IRAM function to
reduce variations due to cache behavior.

4. Remove calculation of "standard deviation" in the test, as what was
calculated was not actually standard deviation, and it did not add any
useful information.
2019-02-28 21:58:03 +08:00
Angus Gratton
3e7a5b144a unit tests: Only initialise tcpip_adapter() when needed by the test
Prevents unexpected memory allocations when running tests which
don't require tcpip_adapter.
2018-12-28 09:56:15 +08:00
He Yin Ling
4e9b4cb9cc test: fix merge error when backport junit report 2018-12-28 09:56:15 +08:00
houchenyao
efe9100306 fix the bug that multi device's dut can't detect case 2018-12-28 09:56:15 +08:00
houchenyao
ac62b8437d bugfix:fix the multi device stop thread bug 2018-12-28 09:56:15 +08:00
Sagar Bijwe
76f98a4b36 mbedtls: Fix compilation errors when CONFIG_MBEDTLS_HARDWARE_AES is disabled 2018-12-07 09:41:59 +00:00
He Yin Ling
c229de0564 ci: assign unit test cases in sequence of config and name 2018-11-26 17:22:04 +08:00
He Yin Ling
f298897fb5 test: generate junit test report according to executed cases 2018-11-26 17:10:39 +08:00
Sagar Bijwe
68a9d1168f nvs_flash: Add support for nvs encryption 2018-10-04 19:25:12 +05:30
yulong
fa8dc32800 component/bt: Fixed the vulnerability released by Bluetooth org when using public key not check in the process of ECDH encryption.
1. Add the 100 times test when the private key is generated by the random number;
2. Add the bt components to the unit-test-app/config directory.
3. Added the bt unit test case to CI.
2018-08-13 19:47:02 +08:00
Ivan Grokhotkov
497b123958 unit-test-app: don’t include project.mk for ut- targets
If project.mk is included twice in recursive invocation of Make, some
variables defined on the first pass will not be redefined on the
second pass. Rather than cleaning up these variables before calling
Make recursively, don’t include IDF project.mk at all, if one of the
ut- targets is requested.
2018-08-01 08:59:02 +00:00
He Yin Ling
1884151ca8 CI: support test one case multiple times by @bot 2018-07-28 15:06:18 +08:00
He Yin Ling
bf72ed92a9 CI: erase nvs partition before test:
Latest NVS partition bin can't be parsed by old IDF revision. Need to erase before test.
2018-07-28 15:03:30 +08:00
Angus Gratton
d0b8f2865f docs: Switch base URL from esp-idf.readthedocs.io to docs.espressif.com 2018-06-19 11:23:33 +00:00
Angus Gratton
73f6fb9fe7 Merge branch 'feature/spi_functions_in_iram' into 'master'
feature(spi_master): allow to place functions into IRAM to get higher efficiency

See merge request idf/esp-idf!2538
2018-06-19 07:25:12 +08:00
Sagar Bijwe
fd7b794e81 FATFS support without wear levelling
This change allows readonly FATFS to be mounted without wear levelling
support. This will provide the customers a simple way to mount FATFS images
generated on host and flashed onto the chip during factory provisioning.
Since NVS encryption is not supported yet and NVS entry size is limited,
the change will provide an easy alternative for securing the provisioning data
by just marking FATFS parition as encrypted.
2018-06-16 16:02:35 +08:00
Michael (XIAO Xufeng)
9c23b8e596 feature(spi_master): allow to place functions into IRAM to get higher efficiency 2018-06-14 20:22:40 +08:00
Ivan Grokhotkov
7663782e8d unity: allow test task stack size to be configured 2018-06-11 23:26:56 +08:00
Ivan Grokhotkov
9b1876a458 unit-test-app: allow specifying subset of tests for configuration
For some test configurations, not all tests need to be run. This
change allows adding a comment in the configuration file of the
following form:

unit-test-app makefile will use it to determine which components to
build. If the comment is not present, all components will be built
(TESTS_ALL=1).

Also add test configuration for libsodium. It is a separate test
configuration due to the large binary size generated when building
libsodium tests.
2018-06-11 23:26:55 +08:00
Konstantin Kondrashov
7e2a3da643 esp32: Fix not the right time spent in a deep sleep
Before entering the deep sleep, the RTC and FRC counters are synchronized. Updating the boot_time.
Added a unit test for this case.
Fixed warnings for MULTIPLE_STAGES

Closes https://github.com/espressif/esp-idf/issues/1840
2018-06-06 18:59:30 +05:00
Angus Gratton
10eab26854 unit test app: Require 4MB flash
PSRAM config unit tests had outgrown the 0x14000 byte allocated factory size.
2018-05-25 12:16:26 +10:00
He Yin Ling
1a1514b69c unit-test-app: udpate CI related part to README 2018-05-24 03:40:03 +00:00
He Yin Ling
3b24bc42d2 CI: assign unit test cases according to sdkconfig:
We have built unit-test-app with different configs.
Currently we use the config name as tags to match runners.
It's not easy to add new configs (need to update tags to existed runners).

Now we'll parse required test runner tags from `sdkconfig` file.
For example, if config enables `CONFIG_SPIRAM_SUPPORT`, then it requires `psram` tag.
This will make adding new configs easier.

In this commit we change the one behavior of assign test: match keys of
cases should be exactly the same with job tags. This fixes cases select
jobs include their tags, and jobs requires those tags can't be assigned.
2018-05-24 03:40:03 +00:00
Angus Gratton
e8525396dd test: Allow per-unit-test timeouts
Work around for "(WL) write/read speed test" taking >30s in some configs
2018-05-21 12:27:10 +00:00
Roland Dobai
18e83bcd53 Allow VFS file descriptors in select() 2018-05-18 08:06:33 +02:00
Ivan Grokhotkov
48379b8bbe unit-test.py: increase timeout for test app start up 2018-04-26 18:52:45 +08:00
Ivan Grokhotkov
c61c2a63d0 unity: flush test name before starting the test, use printf everywhere
Unit test runner expects to see the test name echoed after test
selection is made. If the unit test immediately goes into sleep mode,
UART output will not be complete, and test runner will not see the
test name. This flushes the stream buffer and waits for UART FIFO to
be empty before starting the test.

Additionally some parts of code used unity_printf and some used
printf. Since unity_printf was only useful during very early tests
when newlib was not available, replace all its usages with printf.
2018-04-26 18:52:45 +08:00
Ivan Grokhotkov
6185e722c3 Revert "Merge branch 'feature/vfs_select' into 'master'"
This reverts merge request !2074
2018-04-20 11:51:41 +08:00
Roland Dobai
6852d653bd Allow VFS file descriptors in select() 2018-04-17 11:25:30 +02:00
Roland Dobai
33480d1a2c Enable -Wwrite-strings when compiling IDF's own C files 2018-04-10 08:53:33 +02:00
Angus Gratton
53234ef2bc Merge branch 'refactor/rtc_split_module' into 'master'
bugfix(rtc): make sure peripherals (DAC, HALL) are turned off before conversion.

See merge request idf/esp-idf!1848
2018-04-04 09:00:58 +08:00
Ivan Grokhotkov
d7c8866896 Merge branch 'test/support_multi_stage_unit_test_case' into 'master'
unit-test-app: support multi stage unit test case

See merge request idf/esp-idf!2139
2018-04-03 18:20:16 +08:00
He Yin Ling
fee844d22c unit-test-app: support multi stages test 2018-03-30 11:38:49 +08:00
Michael (Xiao Xufeng)
cef8baf424 bugfix(rtc): make sure peripherals (DAC, HALL) are turned off before conversion.
refactor structure of ``rtc_module.c`` to make it more clearly.

Closes https://github.com/espressif/esp-idf/issues/1517
2018-03-28 17:10:01 +08:00
Anton Maklakov
f3d61015f7 build: Fix problems with building kconfig and generating sdkconfig
We had some problems:
    simultaneous compiling of kconfig in the same tree;
    attempt to use menuconfig in some examples and ut in batch mode (w/o interactive console)

Also increase debug abilities in CI:
    force non-interactive building;
    add variable DEBUG_SHELL to toggle verbosity of scripts
2018-03-28 10:39:20 +08:00
houchenyao
5b8a9478a3 CI: new CI ut framework, and can run it in local PC 2018-02-05 06:58:22 +00:00
houchenyao
cb3c88fb2f unit-test-app: use '-' to show test history 2018-02-05 06:58:22 +00:00
Ivan Grokhotkov
82aeb18c3f Merge branch 'test/UT_master_slave_mode' into 'master'
unit-test-app: support multiple devices test cases

See merge request !1220
2017-12-11 15:22:51 +08:00
houchenyao
7a31b93fa3 unit-test-app: support multiple devices test cases:
current unit-test-app don't support test components need to communicate
with each other (like GPIO, SPI ...). Now we add multiple devices mode
to unit test app, support writing and running test with multiple DUTs.

please refer to `docs/api-guides/unit-tests.rst` for detail.
2017-12-07 13:57:26 +08:00
Ivan Grokhotkov
2b92119840 Merge branch 'bugfix/freertos_check_task_waiting_termination' into 'master'
Freertos Task Deletion backport and FPU documentation

See merge request !1591
2017-12-07 11:55:10 +08:00
Darian Leung
38afa32cfb freertos/fix SMP bug with Idle task clean up
This commit backports vTaskDelete() behavior from FreeRTOS v9.0.0  which
allows for the immediate freeing of task memory if the task being deleted
is not currently running and not pinned to the other core. This commit also
fixes a bug in prvCheckTasksWaitingTermination which prevented the
Idle Task from cleaning up all tasks awaiting deletion. Each iteration of the Idle
Task should traverse the xTasksWaitingTermination list and clean up all tasks
not pinned to the other core. The previous implementation would cause
prvCheckTasksWaitingTermination to return when encountering a task
pinned to the other core whilst traversing the xTasksWaitingTermination list.

The test case for vTaskDelete() has been updated to test for the bugfix and
backported deletion behavior.
2017-12-05 18:13:56 +08:00
Ivan Grokhotkov
f0547d58e4 esp_timer: add documentation, expose profiling option in Kconfig 2017-11-29 11:44:46 +08:00
Ivan Grokhotkov
067c0e1ffe Merge branch 'bugfix/cpp_unit_tests_not_executed_by_ci' into 'master'
CI: fix C++ unit test cases not executed by CI

See merge request !1589
2017-11-27 12:48:12 +08:00
Angus Gratton
02304ad83e Merge branch 'feature/freertos_backported_functions' into 'master'
freertos/backport and test v9.0.0 functions

See merge request !1515
2017-11-24 08:49:59 +08:00
He Yin Ling
dd371289aa CI: fix C++ unit test cases not executed by CI 2017-11-23 17:14:23 +08:00
Darian Leung
c1d101dd41 freertos/backport and test v9.0.0 functions
This commit backports the following features from FreeRTOS v9.0.0
- uxSemaphoreGetCount()
- vTimerSetTimerId(), xTimerGetPeriod(), xTimerGetExpiryTime()
- xTimerCreateStatic()
- xEventGroupCreateStatic()
- uxSemaphoreGetCount()

Functions backported previously
- xTaskCreateStatic()
- xQueueCreateStatic()
- xSemaphoreCreateBinaryStatic(), xSemaphoreCreateCountingStatic()
- xSemaphoreCreateMutexStatic(), xSemaphoreCreateRecursiveMutexStatic()
- pcQueueGetName()
- vTaskSetThreadLocalStoragePointer()
- pvTaskGetThreadLocalStoragePointer()

Unit tests were also written for the functions above (except for pcQueueGetName
which is tested in a separate Queue Registry MR). The original tlsp and del cb test case
was deleted and integrated into the test cases of this MR.
2017-11-23 14:18:09 +08:00