From 79ed14cba950f267aa37d532c80e674a36a739a8 Mon Sep 17 00:00:00 2001 From: EmelyanenkoK Date: Fri, 3 Nov 2023 15:53:11 +0300 Subject: [PATCH] Add information on running tests (#796) Co-authored-by: SpyCheese --- README.md | 2 +- doc/Tests.md | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 doc/Tests.md diff --git a/README.md b/README.md index 88e02711b..7e78bb04a 100644 --- a/README.md +++ b/README.md @@ -70,4 +70,4 @@ If a CI workflow fails not because of your changes but workflow issues, try to f ## Running tests -Tests are executed by running `ctest` in the build directory. \ No newline at end of file +Tests are executed by running `ctest` in the build directory. See `doc/Tests.md` for more information. \ No newline at end of file diff --git a/doc/Tests.md b/doc/Tests.md new file mode 100644 index 000000000..c883731a9 --- /dev/null +++ b/doc/Tests.md @@ -0,0 +1,24 @@ +# Tests execution +TON contains multiple unit-tests, that facilitate detection of erroneous blockchain behaviour on each commit. +## Build tests +Go inside the build directory and, if you use ninja, build the tests using the following command: + +```ninja test-ed25519 test-ed25519-crypto test-bigint test-vm test-fift test-cells test-smartcont test-net test-tdactor test-tdutils test-tonlib-offline test-adnl test-dht test-rldp test-rldp2 test-catchain test-fec test-tddb test-db test-validator-session-state``` + +For more details on how to build TON artifacts, please refer to any of Github actions. + +For cmake use: + +```cmake --build . --target test-ed25519 test-ed25519-crypto test-bigint test-vm test-fift test-cells test-smartcont test-net test-tdactor test-tdutils test-tonlib-offline test-adnl test-dht test-rldp test-rldp2 test-catchain test-fec test-tddb test-db test-validator-session-state``` + +## Run tests +Go inside the build directory and with ninja execute: + +```ninja test``` + +with ctest: + +```ctest``` + +## Integration of tests into CI +Most relevant GitHub actions include the step ```Run tests``` that executes the tests. If any of tests fails, the action will be interrupted and no artifacts will be provided. \ No newline at end of file