pd-ut

command
v0.0.0-...-1679dbc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

README

pd-ut

pd-ut is a tool to run unit tests for PD.

Build

  1. Go Version 1.21 or later
  2. In the root directory of the PD project, use the make pd-ut command to compile and generate bin/pd-ut

Usage

This section describes how to use the pd-ut tool.

brief run all tests
make ut 
run by pd-ut
  • You should make failpoint-enable before running the tests.
  • And after running the tests, you should make failpoint-disable and make clean-test to disable the failpoint and clean the environment.
Flags description
// run all tests
pd-ut

// show usage
pd-ut -h

// list all packages
pd-ut list

// list test cases of a single package
pd-ut list $package

// list test cases that match a pattern
pd-ut list $package 'r:$regex'

// run all tests
pd-ut run

// run test all cases of a single package
pd-ut run $package

// run test cases of a single package
pd-ut run $package $test

// run test cases that match a pattern
pd-ut run $package 'r:$regex'

// build all test package
pd-ut build

// build a test package
pd-ut build xxx

// write the junitfile
pd-ut run --junitfile xxx

// test with race flag
pd-ut run --race

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL