Skip to content

Commit 3d05d3f

Browse files
authored
Fix symtab json file removal and reduce regression scope (rust-lang#2447)
This fixes a regression introduced in rust-lang#2439 when write symtab json is enabled. We still need to take that into consideration and remove them if needed. This change also simplifies the write symtab json regression to avoid the out of disk space issue we've been seeing since rust-lang#2439.
1 parent 2df67e3 commit 3d05d3f

File tree

3 files changed

+14
-19
lines changed

3 files changed

+14
-19
lines changed

.github/workflows/kani.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ jobs:
4545
os: ubuntu-20.04
4646

4747
- name: Build Kani
48-
run: cargo build-dev
48+
run: cargo build-dev -- --features write_json_symtab
49+
50+
- name: Run tests
51+
run: |
52+
cargo run -p compiletest --quiet -- --suite kani --mode kani --quiet --no-fail-fast
53+
cargo run -p compiletest --quiet -- --suite expected --mode expected --quiet --no-fail-fast
54+
cargo run -p compiletest --quiet -- --suite cargo-kani --mode cargo-kani --quiet --no-fail-fast
4955
50-
- name: Execute Kani regression
51-
env:
52-
KANI_ENABLE_WRITE_JSON_SYMTAB: 1
53-
run: ./scripts/kani-regression.sh
5456
5557
benchcomp-tests:
5658
runs-on: ubuntu-20.04

kani-driver/src/project.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ impl Project {
129129
let goto = Artifact::try_new(&goto_path, Goto)?;
130130

131131
// All other harness artifacts that may have been generated as part of the build.
132-
artifacts.extend([TypeMap, VTableRestriction, PrettyNameMap].iter().filter_map(
133-
|typ| {
132+
artifacts.extend(
133+
[SymTab, TypeMap, VTableRestriction, PrettyNameMap].iter().filter_map(|typ| {
134134
let artifact = Artifact::try_from(&symtab_out, *typ).ok()?;
135135
Some(artifact)
136-
},
137-
));
136+
}),
137+
);
138138
artifacts.push(symtab_out);
139139
artifacts.push(goto);
140140
}

scripts/kani-regression.sh

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@ check_kissat_version.sh
2727
${SCRIPT_DIR}/kani-fmt.sh --check
2828

2929
# Build all packages in the workspace
30-
if [[ "" != "${KANI_ENABLE_WRITE_JSON_SYMTAB-}" ]]; then
31-
cargo build-dev -- --features write_json_symtab
32-
else
33-
cargo build-dev
34-
fi
30+
cargo build-dev
3531

3632
# Unit tests
3733
cargo test -p cprover_bindings
@@ -69,11 +65,8 @@ for testp in "${TESTS[@]}"; do
6965
--quiet --no-fail-fast
7066
done
7167

72-
# Don't run std regression if using JSON symtab to avoid OOM issues.
73-
if [[ -z "${KANI_ENABLE_WRITE_JSON_SYMTAB-}" ]]; then
74-
# Check codegen for the standard library
75-
time "$SCRIPT_DIR"/std-lib-regression.sh
76-
fi
68+
# Check codegen for the standard library
69+
time "$SCRIPT_DIR"/std-lib-regression.sh
7770

7871
# We rarely benefit from re-using build artifacts in the firecracker test,
7972
# and we often end up with incompatible leftover artifacts:

0 commit comments

Comments
 (0)