diff --git a/tests/README.md b/tests/README.md index db039886c98b5..ce2cfa63ebab5 100644 --- a/tests/README.md +++ b/tests/README.md @@ -3,14 +3,14 @@ Unit tests (the `*_test.go` files inside the source directory) should *never* rely on external programs. -Run `make test` to execute all unit tests. +Run `make br_unit_test` to execute all unit tests for br. To run a specific test, pass `ARGS` into `make test` like ```sh -make test ARGS='github.com/pingcap/br/pkg/cdclog --test.v --check.v --check.f TestColumn' -# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# which package to test more extra test flags +make br_unit_test ARGS='github.com/pingcap/tidb/br/pkg/cdclog --test.v --check.v --check.f TestColumn' +# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# which package to test more extra test flags ``` You can also run unit tests directly via `go test` like: @@ -18,7 +18,7 @@ You can also run unit tests directly via `go test` like: ```sh make failpoint-enable -go test github.com/pingcap/br/pkg/cdclog --test.v --check.v --check.f TestColumn +go test github.com/pingcap/tidb/br/pkg/cdclog --test.v --check.v --check.f TestColumn make failpoint-disable ``` @@ -67,7 +67,7 @@ If you have docker installed, you can skip step 1 and step 2 by running ## Running -Run `make integration_test` to execute the integration tests. This command will +Run `make br_integration_test` to execute the integration tests. This command will 1. Build `br` 2. Check that all 9 required executables and `br` executable exist @@ -82,7 +82,7 @@ This script will Run `tests/run.sh --debug` to pause immediately after all servers are started. -After executing the tests, run `make coverage` to get a coverage report at +After executing the tests, run `make br_coverage` to get a coverage report at `/tmp/backup_restore_test/all_cov.html`. ## Writing new tests