xref: /aosp_15_r20/external/zstd/tests/regression/README.md (revision 01826a4963a0d8a59bc3812d29bdf0fb76416722)
1*01826a49SYabin Cui# Regression tests
2*01826a49SYabin Cui
3*01826a49SYabin CuiThe regression tests run zstd in many scenarios and ensures that the size of the compressed results doesn't change. This helps us ensure that we don't accidentally regress zstd's compression ratio.
4*01826a49SYabin Cui
5*01826a49SYabin CuiThese tests get run every night by CircleCI. If the job fails you can read the diff printed by the job to ensure the change isn't a regression. If all is well you can download the `results.csv` artifact and commit the new results. Or you can rebuild it yourself following the instructions below.
6*01826a49SYabin Cui
7*01826a49SYabin Cui## Rebuilding results.csv
8*01826a49SYabin Cui
9*01826a49SYabin CuiFrom the root of the zstd repo run:
10*01826a49SYabin Cui
11*01826a49SYabin Cui```
12*01826a49SYabin Cui# Build the zstd binary
13*01826a49SYabin Cuimake clean
14*01826a49SYabin Cuimake -j zstd
15*01826a49SYabin Cui
16*01826a49SYabin Cui# Build the regression test binary
17*01826a49SYabin Cuicd tests/regression
18*01826a49SYabin Cuimake clean
19*01826a49SYabin Cuimake -j test
20*01826a49SYabin Cui
21*01826a49SYabin Cui# Run the regression test
22*01826a49SYabin Cui./test --cache data-cache --zstd ../../zstd --output results.csv
23*01826a49SYabin Cui
24*01826a49SYabin Cui# Check results.csv to ensure the new results are okay
25*01826a49SYabin Cuigit diff
26*01826a49SYabin Cui
27*01826a49SYabin Cui# Then submit the PR
28*01826a49SYabin Cui```
29