mirror of
https://github.com/rosenpass/rosenpass.git
synced 2026-02-28 06:23:08 -08:00
feat: move parsing of RESULT lines to Python
Co-Authored-By: Anja Rabich <a.rabich@uni-luebeck.de>
This commit is contained in:
@@ -43,6 +43,18 @@ def cpp(file, cpp_prep):
|
||||
return exc(params, stderr=pkgs.sys.stderr)
|
||||
|
||||
|
||||
@click.command()
|
||||
def parse_result_line():
|
||||
for outp in pkgs.sys.stdin:
|
||||
match = pkgs.re.search(r'^RESULT .* \b(true|false)\b\.$', outp)
|
||||
|
||||
if match:
|
||||
result = match.group(1)
|
||||
print(result, flush=True)
|
||||
else:
|
||||
pass
|
||||
|
||||
|
||||
@click.command()
|
||||
@click.argument("cpp_prep")
|
||||
@click.argument("awk_prep")
|
||||
@@ -153,5 +165,6 @@ main.add_command(clean)
|
||||
main.add_command(run_proverif)
|
||||
main.add_command(cpp)
|
||||
main.add_command(awk_prep)
|
||||
main.add_command(parse_result_line)
|
||||
main.add_command(pretty_output)
|
||||
main.add_command(clean_warnings)
|
||||
|
||||
@@ -43,12 +43,7 @@ metaverif() {
|
||||
run_proverif "${awk_prep}" "$@" \
|
||||
| clean_warnings \
|
||||
| tee "${log}" \
|
||||
| awk '
|
||||
/^RESULT/ {
|
||||
gsub(/\./, "", $NF);
|
||||
print($NF);
|
||||
fflush(stdout);
|
||||
}' \
|
||||
| exc rosenpass-marzipan parse-result-line \
|
||||
| pretty_output "${cpp_prep}"
|
||||
} || {
|
||||
echo "TODO: Commented out some debug output"
|
||||
|
||||
Reference in New Issue
Block a user