mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Add a fuzzing subcommand
This commit is contained in:
parent
81acdafc51
commit
f61830d676
3 changed files with 35 additions and 7 deletions
|
@ -139,3 +139,20 @@ pub fn install_format_hook() -> Result<()> {
|
|||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn run_fuzzer() -> Result<()> {
|
||||
match Command::new("cargo")
|
||||
.args(&["fuzz", "--help"])
|
||||
.stderr(Stdio::null())
|
||||
.stdout(Stdio::null())
|
||||
.status()
|
||||
{
|
||||
Ok(status) if status.success() => (),
|
||||
_ => run("cargo install cargo-fuzz", ".")?,
|
||||
};
|
||||
|
||||
run(
|
||||
"rustup run nightly -- cargo fuzz run parser",
|
||||
"./crates/ra_syntax",
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue