chore: add script to test ProVerif example files

This commit is contained in:
Benjamin Lipp
2025-12-08 16:58:11 +01:00
parent 3a1b981ce3
commit 2c35c5b4ad

23
marzipan/test_parser.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
shopt -s nullglob globstar
proverif_repo=$1
# Prerequisites:
# * built ProVerif
# * ran ./test (and aborted it) such that the preparation scripts have been run
# Test pitype files
for f in $proverif_repo/examples/pitype/**/*.pv; do
[[ $f == *.m4.pv ]] && continue
echo "$f"
nix run .# -- parse "$f"
done
# Test cryptoverif files
for f in $proverif_repo/examples/cryptoverif/**/*.pcv; do
[[ $f == *.m4.pcv ]] && continue
echo "$f"
nix run .# -- parse "$f"
done