Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[casr-python][casr-java] Add sub-tool option #115

Merged
merged 5 commits into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion casr/src/bin/casr-java.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fn main() -> Result<()> {
.default_value("casr-san")
.action(ArgAction::Set)
.value_parser(clap::value_parser!(PathBuf))
SweetVishnya marked this conversation as resolved.
Show resolved Hide resolved
.value_name("BIN")
.value_name("PATH")
.help(
"Path to sub tool for crash analysis that will be called when main tool fails to detect a crash",
),
Expand Down
2 changes: 1 addition & 1 deletion casr/src/bin/casr-python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ fn main() -> Result<()> {
.default_value("casr-san")
.action(ArgAction::Set)
.value_parser(clap::value_parser!(PathBuf))
.value_name("BIN")
.value_name("PATH")
.help(
"Path to sub tool for crash analysis that will be called when main tool fails to detect a crash",
SweetVishnya marked this conversation as resolved.
Show resolved Hide resolved
),
Expand Down
2 changes: 1 addition & 1 deletion casr/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub fn call_sub_tool(matches: &ArgMatches, argv: &[&str], name: &str) -> Result<
bail!("Sub tool {tool:?} doesn't exist");
}
if !tool.is_file() {
bail!("Sub tool {tool:?} isn't exist");
bail!("Sub tool {tool:?} isn't file");
SweetVishnya marked this conversation as resolved.
Show resolved Hide resolved
}
if tool.metadata()?.permissions().mode() & 0o111 == 0 {
bail!("Sub tool {tool:?} isn't executable");
Expand Down
4 changes: 4 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ Create CASR reports (.casrep) from python reports
--stdin <FILE> Stdin file for program
--ignore <FILE> File with regular expressions for functions and file paths that
should be ignored
--sub-tool <BIN> Path to sub tool bin for crash analyze that will be called in
SweetVishnya marked this conversation as resolved.
Show resolved Hide resolved
case main tool fails [default: casr-san]
-h, --help Print help
-V, --version Print version

Expand All @@ -140,6 +142,8 @@ Create CASR reports (.casrep) from java reports
--stdin <FILE> Stdin file for program
--ignore <FILE> File with regular expressions for functions and file paths that
should be ignored
--sub-tool <BIN> Path to sub tool bin for crash analyze that will be called in
case main tool fails [default: casr-san]
-h, --help Print help
-V, --version Print version

Expand Down
Loading