Lines Matching +full:test +full:- +full:docs
1 .. _docs-get-started-upstream:
9 :ref:`docs-get-started` if you're looking for instructions on how to use
16 If you haven't already, :ref:`docs-first-time-setup`.
18 -------------
20 -------------
23 all the steps to :ref:`docs-first-time-setup`. The express setup
26 #. **Host** - Mac, Linux, or Windows. Builds and runs tests
27 #. **Device/STM32F429** - Build only; Optionally, the STM32F429I-DISC1 kit to
29 #. **Docs** - Builds the Pigweed docs
38 .. code-block:: bash
55 .. code-block:: bash
62 .. code-block:: bash
79 making a test fail.
83 ``EXPECT_EQ(0, 1);`` in a test.
86 test if you feel like it.
88 #. Open the generated docs in ``out/docs/gen/docs/html/index.html`` in your
91 #. Edit ``docs/getting_started.rst`` (this file!) and make any change. Save.
92 See the watcher rebuild the docs. Reload your browser, and see the changes.
98 ``activate.bat`` on Windows) to re-activate the environment without
99 re-bootstrapping.
101 ---------
103 ---------
110 .. code-block:: bash
118 .. code-block:: batch
125 Below is a real-time demo with roughly what you should expect to see as output:
127 .. image:: https://storage.googleapis.com/pigweed-media/pw_env_setup_demo.gif
133 .. _activate-pigweed-environment:
135 ---------------------------------
137 ---------------------------------
145 .. code-block:: bash
151 .. code-block:: batch
156 into host tooling changes after a pull it may be worth re-running bootstrap.
158 ----------------------
160 ----------------------
162 builds in-development, but they are incomplete and don't have feature parity
166 `Ninja <https://ninja-build.org/>`_ build files.
174 .. code-block:: bash
195 Now you *could* manually invoke the host build using ``ninja -C out`` every
200 .. code-block:: bash
210 ``pw_status/public/pw_status/status.h`` and watch the build re-trigger when you
215 .. image:: https://storage.googleapis.com/pigweed-media/pw_watch_build_demo.gif
219 ------------------
221 ------------------
224 of being quiet in the success case, and only output test results when there's a
227 To see a test failure, modify ``pw_status/status_test.cc`` to fail by changing
228 one of the strings in the "KnownString" test.
230 .. image:: https://storage.googleapis.com/pigweed-media/pw_watch_test_demo.gif
232 :alt: example test failure using pw watch
237 will be re-built and re-run.
239 Try running the ``pw_status`` test manually:
241 .. code-block:: bash
243 $ ./out/pw_strict_host_{clang,gcc}_debug/obj/pw_status/test/status_test
248 ---------------------
250 ---------------------
254 target (the STMicroelectronics STM32F429I-DISC1) in parallel with the host
259 .. code-block:: bash
265 .. code-block:: bash
267 $ ninja -C out stm32f429i
269 -------------------------
271 -------------------------
274 pass on the host, it's crucial to verify the same with on-device testing. We've
280 Connect any number of STM32F429I-DISC1 boards to your computer using the mini
288 .. image:: https://storage.googleapis.com/pigweed-media/stm32f429i-disc1_connected.jpg
292 2. Launch test server
295 test requests to a server running in the background. Launch the server in
299 .. code-block:: bash
309 stm32f429i-disc1 target.
311 .. code-block:: bash
315 # on-device unit tests.
325 .. image:: https://storage.googleapis.com/pigweed-media/pw_watch_on_device_demo.gif
327 :alt: pw watch running on-device tests
329 --------------------------
331 --------------------------
333 information-rich RST files that are used to generate HTML documentation. All
334 the docs are hosted at https://pigweed.dev/, and are built as a part of the
337 ``out/docs/gen/docs/html``.
341 .. code-block:: bash
343 $ ninja -C out docs
347 ---------------------------
349 ---------------------------
350 Sometimes it's faster to incrementally build a single test target rather than
351 waiting for the whole world to build and all tests to run. GN has a built-in
353 step. In order to build and run the right test, it's important to explicitly
354 specify which target to build the test under (e.g. host, SM32F529I-DISC1).
358 .. code-block:: none
363 $ ninja -C out pw_strict_host_clang_debug/obj/pw_status/status_test.run.pw_pystamp
367 The ``.run`` following the test target name is a sub-target created as part of
368 the ``pw_test`` GN template. If you remove ``.run``, the test will build but
373 .. code-block:: bash
375 …s:status_test.run(//targets/host/pigweed_internal:pw_strict_host_clang_debug)" | xargs ninja -C out
377 ----------
379 ----------
383 Visit :ref:`docs-get-started` to learn how to set up a new Bazel-based
384 project, how to add Pigweed to an existing Bazel-based project, and more.
389 :ref:`docs-module-guides`.
391 The :ref:`docs-kudzu` repo demonstrates how to use Pigweed in your own project.
397 Check out the :ref:`module-pw_ide` for setting up editor configurations or run
400 .. code-block:: bash
407 <https://hackaday.com/2021/01/13/remoticon-video-pigweed-brings-embedded-unit-testing-library-integ…