Skip to content

Commit eabaca1

Browse files
committed
add more debug printing
1 parent 2bf8392 commit eabaca1

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

scripts/run-kani.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ run_verification_subset() {
178178
harness_args="$harness_args --harness $harness"
179179
done
180180

181-
echo "Running verification for harnesses: ${harnesses[*]}"
181+
echo "Running verification for harnesses:"
182+
printf '%s\n' "${harnesses[@]}"
182183
"$kani_path" verify-std -Z unstable-options ./library \
183184
-Z function-contracts \
184185
-Z mem-predicates \
@@ -245,12 +246,22 @@ main() {
245246
if [[ -n "$PARALLEL_INDEX" && -n "$PARALLEL_TOTAL" ]]; then
246247
echo "Running as parallel worker $PARALLEL_INDEX of $PARALLEL_TOTAL"
247248
get_harnesses "$kani_path"
249+
250+
echo "All harnesses:"
251+
printf '%s\n' "${ALL_HARNESSES[@]}"
252+
echo "Total number of harnesses: $HARNESS_COUNT"
248253

249254
# Calculate this worker's portion
250255
chunk_size=$(( (HARNESS_COUNT + PARALLEL_TOTAL - 1) / PARALLEL_TOTAL ))
256+
echo "Number of harnesses this worker will run: $chunk_size"
257+
251258
start_idx=$(( (PARALLEL_INDEX - 1) * chunk_size ))
252259
end_idx=$(( start_idx + chunk_size ))
260+
# If end_idx > HARNESS_COUNT, truncate it to $HARNESS_COUNT
253261
[[ $end_idx -gt $HARNESS_COUNT ]] && end_idx=$HARNESS_COUNT
262+
263+
echo "Start index into ALL_HARNESSES is $start_idx"
264+
echo "End index into ALL_HARNESSES is $end_idx"
254265

255266
# Extract this worker's harnesses
256267
worker_harnesses=("${ALL_HARNESSES[@]:$start_idx:$chunk_size}")

0 commit comments

Comments
 (0)