From 8ceeebba73d623df3ee693fde8d42fd32a98012b Mon Sep 17 00:00:00 2001 From: Timur Aitov Date: Fri, 20 Oct 2023 13:30:20 +0300 Subject: [PATCH] update section 'Running Autotests' in README.md --- README.md | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 956c6808..5603ceb4 100644 --- a/README.md +++ b/README.md @@ -25,18 +25,40 @@ You can build YANET in [docker](https://www.docker.com/) container and run it wi Or build on bare metal. See [documentation](docs/build.md). ## Running Autotests +Add alias for run commands on docker: +``` +alias yanet-builder="docker run --rm -it -v /run/yanet:/run/yanet -v $PWD:/project yanetplatform/builder" +``` + +Pull docker image: +``` +docker pull yanetplatform/builder +``` + +Once setup `build_autotest` directory: +``` +yanet-builder meson setup -Dtarget=autotest build_autotest +``` + +Compile: +``` +yanet-builder meson compile -C build_autotest +``` + +Run autotest with all units in `autotest/units/001_one_port`: +``` +yanet-builder ./autotest/yanet-autotest-run.py --prefix=build_autotest autotest/units/001_one_port ``` -$ cd yanet -$ docker run --rm -it -v $PWD:/project yanetplatform/builder -# meson setup --prefix=/usr -Dtarget=autotest build_autotest -# meson compile -C build_autotest -# meson install -C build_autotest -# yanet-autotest-run.py autotest/units/001_one_port -or -# yanet-autotest-run.py autotest/units/001_one_port autotest/units/001_one_port/019_acl_decap_route +Or run one unit: +``` +yanet-builder ./autotest/yanet-autotest-run.py --prefix=build_autotest autotest/units/001_one_port autotest/units/001_one_port/019_acl_decap_route ``` +For more information about the autotests run: +``` +yanet-builder ./autotest/yanet-autotest-run.py -h +``` ## Dependencies - [DPDK](https://github.com/DPDK/dpdk) - [JSON](https://github.com/nlohmann/json)