mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
fff2cb833f
Summary: The test runs the old and new algorithm and compares their result. This is more interesting than using random numbers, since the fuzzing framework will try to explore new code paths. This cannot run on stable Rust yet. I added a README for how to run it. Reviewed By: sfilipco Differential Revision: D19504096 fbshipit-source-id: 621da02c50a771dee9932f9d7a407cb1f412a543
15 lines
595 B
Plaintext
15 lines
595 B
Plaintext
Steps to run the fuzz tests with OSS toolchain:
|
|
|
|
1. Install rustup.
|
|
2. `rustup install nightly` to install nightly toolchain.
|
|
3. From `eden/scm`, run `rustup override set nightly && make local` to use the nightly toolchain.
|
|
4. From `dag` (parent directory of `fuzz`), run `cargo fuzz run $TEST_NAME`. For example, `$TEST_NAME` can be `dag`.
|
|
|
|
`cargo fuzz` supports some options. For example:
|
|
|
|
cargo fuzz run --release -j 16 gca -- -max_len=20
|
|
|
|
will build in release mode, fork into 16 processes, and generate at most 20-byte input.
|
|
|
|
See also https://rust-fuzz.github.io/book/cargo-fuzz.html.
|