Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 9 additions & 1 deletion kani-driver/src/call_cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use crate::session::{KaniSession, ReachabilityMode};
use anyhow::{Context, Result};
use cargo_metadata::{Metadata, MetadataCommand, Package};
use std::ffi::OsString;
use std::fs;
use std::path::{Path, PathBuf};
use std::process::Command;

Expand All @@ -32,9 +33,16 @@ impl KaniSession {
.target_dir
.as_ref()
.unwrap_or(&metadata.target_directory.clone().into())
.clone();
.clone()
.join("kani");
let outdir = target_dir.join(build_target).join("debug/deps");

// Clean directory before building since we are unable to handle cache today.
// TODO: https://github.com/model-checking/kani/issues/1736
if target_dir.exists() {
fs::remove_dir_all(&target_dir)?;
}

let mut kani_args = self.kani_specific_flags();
let rustc_args = self.kani_rustc_flags();

Expand Down
2 changes: 1 addition & 1 deletion tests/output-files/check-output.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ echo
echo "Running multi-file check..."
rm -rf build
RUST_BACKTRACE=1 cargo kani --target-dir build --gen-c --enable-unstable --quiet
cd build/${TARGET}/debug/deps/
cd build/kani/${TARGET}/debug/deps/

if ! [ -e cbmc-linked.for-main.c ]
then
Expand Down