mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 03:34:32 +02:00
docs: Fix snippet with example cmake build command to create mocks
This commit is contained in:
@@ -306,7 +306,7 @@ of time spent on waiting for code/data in case of a cache miss, then subtract th
|
|||||||
One limitation of the cache compensated timer is that the task that benchmarked functions should be pinned to a core. This is due to each core having its own event counters that are independent of each other. For example, if ``ccomp_timer_start`` gets called on one core, put to sleep by the scheduler, wakes up, and gets rescheduled on the other core, then the corresponding ``ccomp_timer_stop`` will be invalid.
|
One limitation of the cache compensated timer is that the task that benchmarked functions should be pinned to a core. This is due to each core having its own event counters that are independent of each other. For example, if ``ccomp_timer_start`` gets called on one core, put to sleep by the scheduler, wakes up, and gets rescheduled on the other core, then the corresponding ``ccomp_timer_stop`` will be invalid.
|
||||||
|
|
||||||
Mocks
|
Mocks
|
||||||
-----------------------------------------
|
-----
|
||||||
|
|
||||||
ESP-IDF has a component which integrates the CMock mocking framework.
|
ESP-IDF has a component which integrates the CMock mocking framework.
|
||||||
CMock usually uses Unity as a submodule, but due to some Espressif-internal limitations with CI, we still have Unity as an ordinary module in ESP-IDF.
|
CMock usually uses Unity as a submodule, but due to some Espressif-internal limitations with CI, we still have Unity as an ordinary module in ESP-IDF.
|
||||||
@@ -316,7 +316,7 @@ Refer to :component_file:`cmock/CMock/lib/cmock_generator.rb` to see how the Uni
|
|||||||
|
|
||||||
An example cmake build command to create mocks of a component inside that component's CMakeLists.txt may look like this:
|
An example cmake build command to create mocks of a component inside that component's CMakeLists.txt may look like this:
|
||||||
|
|
||||||
.. code-block:: cmake
|
.. code-block:: cmake
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${MOCK_OUTPUT}
|
OUTPUT ${MOCK_OUTPUT}
|
||||||
|
Reference in New Issue
Block a user