Skip to content

Commit e34a5c6

Browse files
vonakaFedor Ryabinin
andauthored
Setting the appropriate target when running autoharness-analyzer (#384)
… run-kani.sh This finds the appropriate target directory instead of hard-coding `x86_64-unknown-linux-gnu`. Resolves #381 By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses. Co-authored-by: Fedor Ryabinin <rfedor@amazon.com>
1 parent 4b3883d commit e34a5c6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

scripts/run-kani.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -351,19 +351,19 @@ main() {
351351
--cbmc-args --object-bits 12
352352
# remove metadata file for Kani-generated "dummy" crate that we won't
353353
# get scanner data for
354-
rm target/kani_verify_std/target/x86_64-unknown-linux-gnu/debug/deps/dummy-*
354+
local target=$(find "target/kani_verify_std/target/" -mindepth 1 \
355+
-type d -exec test -e '{}'/debug/deps/ \; -print)
356+
rm $target/debug/deps/dummy-*
355357
echo "Running Kani's std-analysis command..."
356358
pushd scripts/kani-std-analysis
357359
./std-analysis.sh $build_dir
358360
popd
359361
echo "Running autoharness-analyzer command..."
360362
pushd scripts/autoharness_analyzer
361363
cargo run -- --per-crate \
362-
../../target/kani_verify_std/target/x86_64-unknown-linux-gnu/debug/deps/ \
363-
/tmp/std_lib_analysis/results/
364+
../../$target/debug/deps/ /tmp/std_lib_analysis/results/
364365
cargo run -- --per-crate --unsafe-fns-only \
365-
../../target/kani_verify_std/target/x86_64-unknown-linux-gnu/debug/deps/ \
366-
/tmp/std_lib_analysis/results/
366+
../../$target/debug/deps/ /tmp/std_lib_analysis/results/
367367
popd
368368
fi
369369
}

0 commit comments

Comments
 (0)