summaryrefslogtreecommitdiffstats
path: root/extras/hs-test/README.rst
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2023-01-31 10:34:18 +0100
committerFilip Tehlar <ftehlar@cisco.com>2023-02-24 14:38:15 +0100
commit671cf51d6d0b08c216a99696aa30f17faff5e653 (patch)
tree569ca122ed05396a4174c91c775d289b75769cf4 /extras/hs-test/README.rst
parent182d2b466d158de4b2320fd280c1e7beb5bb37e4 (diff)
hs-test: improve test infra
- add support for building/running debug/release images - have one point of control (Makefile) - list all test cases Type: test Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I97949abc2fff85d7a2b3784122be159aeec72b52
Diffstat (limited to 'extras/hs-test/README.rst')
-rw-r--r--extras/hs-test/README.rst8
1 files changed, 5 insertions, 3 deletions
diff --git a/extras/hs-test/README.rst b/extras/hs-test/README.rst
index 47d3a53ecbf..8d1ee3537b8 100644
--- a/extras/hs-test/README.rst
+++ b/extras/hs-test/README.rst
@@ -16,14 +16,16 @@ Anatomy of a test case
**Prerequisites**:
-* Tests use *hs-test*'s own docker image, so building it before starting tests is a prerequisite. Run ``sudo make`` to do so
+* Install hs-test dependencies with ``make install-deps``
+* Tests use *hs-test*'s own docker image, so building it before starting tests is a prerequisite. Run ``make build[-debug]`` to do so
* Docker has to be installed and Go has to be in path of both the running user and root
* Root privileges are required to run tests as it uses Linux ``ip`` command for configuring topology
**Action flow when running a test case**:
-#. It starts with running ``./test``. This script is basically a wrapper for ``go test`` and accepts its parameters,
- for example following runs a specific test: ``./test -run TestNs/TestHttpTps``
+#. It starts with running ``make test``. Optional arguments are VERBOSE, PERSIST (topology configuration isn't cleaned up after test run),
+ and TEST=<test-name> to run specific test.
+#. ``make list-tests`` (or ``make help``) shows all test names.
#. ``go test`` compiles package ``main`` along with any files with names matching the file pattern ``*_test.go``
and then runs the resulting test binaries
#. The go test framework runs each function matching :ref:`naming convention<test-convention>`. Each of these corresponds to a `test suite`_