-
Notifications
You must be signed in to change notification settings - Fork 104
/
Copy pathassess-scan-regression.sh
executable file
·44 lines (36 loc) · 1.12 KB
/
assess-scan-regression.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
# Copyright Kani Contributors
# SPDX-License-Identifier: Apache-2.0 OR MIT
set -eu
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
KANI_DIR=$SCRIPT_DIR/..
echo "Running assess scan test:"
cd $KANI_DIR/tests/assess-scan-test-scaffold
cargo kani --enable-unstable assess scan
# Clean up
(cd foo && cargo clean)
(cd bar && cargo clean)
(cd compile_error && cargo clean)
(cd manifest_error && cargo clean)
# Check for expected files (and clean up)
EXPECTED_FILES=(
bar/bar.kani-assess.log
bar/bar.kani-assess-metadata.json
compile_error/compile_error.kani-assess.log
compile_error/compile_error.kani-assess-metadata.json
manifest_error/manifest_error.kani-assess.log
manifest_error/manifest_error.kani-assess-metadata.json
foo/foo.kani-assess.log
foo/foo.kani-assess-metadata.json
)
errors=0
for file in ${EXPECTED_FILES[@]}; do
if [ -f $KANI_DIR/tests/assess-scan-test-scaffold/$file ]; then
rm $KANI_DIR/tests/assess-scan-test-scaffold/$file
else
errors=1
echo "Failed to find $file"
fi
done
echo "Done with assess scan test"
exit $errors