Skip to content

Commit

Permalink
br: maintain the README.md (pingcap#27526)
Browse files Browse the repository at this point in the history
  • Loading branch information
joccau authored Aug 25, 2021
1 parent 655c527 commit 83feadf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
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:

```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
```
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 83feadf

Please sign in to comment.