Skip to content

Commit

Permalink
Merge branch 'main' into move-symtab-earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsn authored Sep 30, 2022
2 parents 35e950a + fbf0533 commit 12c88ba
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 4 deletions.
2 changes: 1 addition & 1 deletion kani-compiler/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ fn hier_logs(args: &ArgMatches, filter: EnvFilter) {
let subscriber = Registry::default().with(filter);
let subscriber = subscriber.with(
HierarchicalLayer::default()
.with_writer(std::io::stdout)
.with_writer(std::io::stderr)
.with_indent_lines(true)
.with_ansi(use_colors)
.with_targets(true)
Expand Down
2 changes: 1 addition & 1 deletion kani-driver/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub struct KaniArgs {
#[structopt(long, short)]
pub quiet: bool,
/// Output processing stages and commands, along with minor debug information
#[structopt(long, short)]
#[structopt(long, short, default_value_if("debug", None, "true"), min_values(0))]
pub verbose: bool,
/// Enable usage of unstable options
#[structopt(long, hidden_short_help(true))]
Expand Down
2 changes: 0 additions & 2 deletions kani-driver/src/call_single_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ impl KaniSession {

if self.args.debug {
flags.push("--log-level=debug".into());
} else if self.args.verbose {
flags.push("--log-level=info".into());
} else {
flags.push("--log-level=warn".into());
}
Expand Down
11 changes: 11 additions & 0 deletions tests/cargo-ui/debug/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright Kani Contributors
# SPDX-License-Identifier: Apache-2.0 OR MIT
[package]
name = "debug"
version = "0.1.0"
edition = "2021"

[dependencies]

[package.metadata.kani.flags]
debug=true
3 changes: 3 additions & 0 deletions tests/cargo-ui/debug/expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DEBUG kani_compiler
goto-cc
cbmc
10 changes: 10 additions & 0 deletions tests/cargo-ui/debug/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright Kani Contributors
// SPDX-License-Identifier: Apache-2.0 OR MIT
//
//! This is just to test that cargo kani --debug works.
#[cfg(kani)]
mod harnesses {
#[kani::proof]
fn harness() {}
}
11 changes: 11 additions & 0 deletions tests/cargo-ui/verbose/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright Kani Contributors
# SPDX-License-Identifier: Apache-2.0 OR MIT
[package]
name = "verbose"
version = "0.1.0"
edition = "2021"

[dependencies]

[package.metadata.kani.flags]
verbose=true
2 changes: 2 additions & 0 deletions tests/cargo-ui/verbose/expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
goto-cc
cbmc
10 changes: 10 additions & 0 deletions tests/cargo-ui/verbose/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright Kani Contributors
// SPDX-License-Identifier: Apache-2.0 OR MIT
//
//! This is just to test that cargo kani --verbose works.
#[cfg(kani)]
mod harnesses {
#[kani::proof]
fn harness() {}
}

0 comments on commit 12c88ba

Please sign in to comment.