Skip to content

Commit e468030

Browse files
committed
Update README.md and BUILDING.md to simplified tests script
Signed-off-by: Hanno Becker <[email protected]>
1 parent 29b7d24 commit e468030

File tree

2 files changed

+35
-16
lines changed

2 files changed

+35
-16
lines changed

BUILDING.md

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,50 @@ To build **mlkem-native**, you need `make` and a C90 compiler. To use the test s
1111
You can build and test **mlkem-native** as follows:
1212

1313
```bash
14-
make quickcheck # With native code backend (if available)
15-
make OPT=0 quickcheck # With C backend
14+
make test # With native code backend (if available)
15+
make OPT=0 test # With C backend
1616
```
1717

18-
To merely build test and benchmarking components, use the following `make` targets:
18+
To merely build test components, use the following `make` targets:
1919

2020
```bash
21-
make mlkem
21+
make func
2222
make nistkat
2323
make kat
24+
make acvp
2425
```
2526

26-
For benchmarking, specify the cycle counting method. Currently, **mlkem-native** is supporting PERF, PMU (AArch64 and x86 only), M1 (Apple Silicon only):
27+
To run them, add `run_`:
28+
29+
```bash
30+
make run_func
31+
make run_nistkat
32+
make run_kat
33+
make run_acvp
34+
```
35+
36+
The resulting binaries can be found in `test/build` (their full path is printed by `make`).
37+
38+
For benchmarking, specify the cycle counting method. Currently, **mlkem-native** is supporting PERF, PMU (AArch64 and
39+
x86 only), M1 (Apple Silicon only):
40+
2741
```
2842
# CYCLES has to be on of PERF, PMU, M1, NO
29-
make bench CYCLES=PERF
30-
make bench_components CYCLES=PERF
43+
make run_bench CYCLES=PERF
44+
make run_bench_components CYCLES=PERF
3145
```
3246

33-
The resulting binaries can then be found in `test/build`.
34-
3547
### Using `tests` script
3648

37-
We recommend compiling and running tests and benchmarks using the [`./scripts/tests`](scripts/tests) script. For
49+
For convenience, you can also use the [`./scripts/tests`](scripts/tests) script as a wrapper around `make`. For
3850
example,
3951

4052
```bash
4153
./scripts/tests func
4254
```
4355

44-
will compile and run functionality tests. For detailed information on how to use the script, please refer to the
45-
`--help` option.
56+
will compile and run functionality tests. For detailed information on how to use the script, please refer to
57+
`./scripts/tests --help`.
4658

4759
### Windows
4860

@@ -59,11 +71,15 @@ There are further scripts used for development of mlkem-native, such as `format`
5971

6072
### nix setup
6173

62-
We specify the development environment for mlkem-native using nix. If you want to help develop mlkem-native, please setup nix using the [nix installer script](https://nixos.org/download/), not your package manager.
74+
We specify the development environment for mlkem-native using nix. If you want to help develop mlkem-native, please setup nix using the [nix installer script](https://nixos.org/download/), not your package manager.
6375

6476
All the development and build dependencies are specified in [flake.nix](flake.nix). To execute a bash shell, run
6577
```bash
6678
nix develop --experimental-features 'nix-command flakes'
6779
```
6880

6981
To confirm that everything worked, try `lint` or `tests cbmc`.
82+
83+
# Checking the proofs
84+
85+
To check the CBMC proofs, enter the `nix` development environment and use `tests cbmc`.

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,14 @@ sudo apt-get install make gcc python3 git
3030
git clone https://github.com/pq-code-package/mlkem-native.git
3131
cd mlkem-native
3232

33-
# Build and run base tests
34-
make quickcheck
33+
# Build and run tests
34+
make build
35+
make test
3536

36-
# Build and run all tests
37+
# The same using `tests`, a convenience wrapper around `make`
3738
./scripts/tests all
39+
# Show all options
40+
./scripts/tests --help
3841
```
3942

4043
See [BUILDING.md](BUILDING.md) for more information.

0 commit comments

Comments
 (0)