Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / src / test_driver / happy / README.md
1 ## Happy Tests
2
3 > Happy simulates complex network topologies. On a single Linux machine, Happy
4 > can create multiple nodes with network stacks that are independent from each
5 > other. Some nodes may be connected to simulated Thread networks, others may
6 > connect to simulated Wi-Fi, WAN (Internet), or cellular networks.
7
8 **You need to run happy tests on Linux platforms.**
9
10 ### Usage
11
12 -   We suggest using
13     [rootless Docker](https://docs.docker.com/engine/security/rootless/) if you
14     have concerns about `--privileged` option on docker run. In your
15     project-chip checkout path, run:
16
17             $ docker run --rm --privileged \
18               --entrypoint /bin/bash \
19               --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" \
20               -it --mount type=bind,source=`pwd`,target=`pwd` \
21               connectedhomeip/chip-build:latest
22
23     Mount your checkout to the same path as your local path avoids errors during
24     bootstrap.
25
26 -   Install packages
27
28             $ sudo scripts/tests/happy_tests.sh install_packages
29
30 -   Install happy framework
31
32             $ scripts/tests/happy_tests.sh bootstrap
33
34 -   Build CHIP
35
36             $ scripts/build/gn_bootstrap.sh
37             $ scripts/build/gn_gen.sh --args="chip_enable_happy_tests=true"
38             $ scripts/build/gn_build.sh
39
40 -   Run Tests
41
42             $ RUN_HAPPY_TESTS=1 scripts/tests/gn_tests.sh
43
44 -   Run a single test
45
46             $ scripts/tests/happy_test_wrapper.py" --test-bin-dir "out/tests" {test script path}