Unit Testing Issues in v6.6.0

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: v6.6.0 单位测试问题

| username: killua

On Mac
make failpoint-enable && go test $(go list ./… | grep -v /br/) -coverprofile a.c -tags=intest -timeout 1m && make failpoint-disable

— FAIL: TestGracefulShutdown (0.00s)
graceshutdown_test.go:120:
Error Trace: /Users/aabb/Documents/work/code/tidb/tests/graceshutdown/graceshutdown_test.go:120
Error: Received unexpected error:
fork/exec bin/tidb-server: no such file or directory
github.com/pingcap/errors.AddStack
/Users/aabb/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20221009092201-b66cddb77c32/errors.go:174
github.com/pingcap/errors.Trace
/Users/aabb/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20221009092201-b66cddb77c32/juju_adaptor.go:15
github.com/pingcap/tidb/tests/graceshutdown.startTiDBWithoutPD
/Users/aabb/Documents/work/code/tidb/tests/graceshutdown/graceshutdown_test.go:51
github.com/pingcap/tidb/tests/graceshutdown.TestGracefulShutdown
tidb/tests/graceshutdown/graceshutdown_test.go:119
testing.tRunner
/usr/local/Cellar/go/1.20.3/libexec/src/testing/testing.go:1576
runtime.goexit
/usr/local/Cellar/go/1.20.3/libexec/src/runtime/asm_amd64.s:1598
Test: TestGracefulShutdown

In addition to tidb-server, there is also an error for pd-server
fork/exec bin/pd-server: no such file or directory

I would like to ask how to run this UT to pass, and the method to run UT locally. Thanks

| username: redgame | Original post link

Manually check if it exists. It seems that tidb-server cannot be found.

| username: killua | Original post link

The tidb-server issue is easy to solve, but the key is the pd-server and others. I saw many dependencies in the br_bins section of the Makefile. I couldn’t find relevant content in our development documentation, nor useful information from commits, issues, or PRs.

Seeking official guidance.

| username: tidb菜鸟一只 | Original post link

Can’t find this command?

| username: killua | Original post link

In UT, you need to actively start tidb-server, but the binary is not generated.

Similarly, there are also pd-server and others. I don’t know where to get these binaries.

| username: knull | Original post link

Actually, if the issue is just needing the binaries, you can directly go to the official download site: 分布式数据库 TiDB 社区版 | PingCAP
Select the corresponding version and architecture, and you can download all the necessary software.