Skip to content

Instantly share code, notes, and snippets.

@lembergerth
Last active January 27, 2019 11:23
Show Gist options
  • Save lembergerth/ac8fe696013b93916c172101a38de337 to your computer and use it in GitHub Desktop.
Save lembergerth/ac8fe696013b93916c172101a38de337 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Requires `yq`.
# Execute from directory `sv-benchmarks/c`.
echo > candidates.txt
for i in $(grep -l "coverage-" **/*.yml); do
inp=$(yq --raw-output '.input_files' $i)
if egrep -q "=.*__VERIFIER_nondet_pointer" $(dirname $i)/$inp; then
echo "$i"
echo $(dirname $i)/$inp >> candidates.txt
elif egrep -q "return.*__VERIFIER_nondet_pointer" $(dirname $i)/$inp; then
echo "$i"
echo $(dirname $i)/$inp >> candidates.txt
fi
done | xargs sed -i -e "/coverage-.*/d"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment