Skip to content

Instantly share code, notes, and snippets.

@roohitavaf
Created June 1, 2022 03:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roohitavaf/0bf0ad11e282ef2d33640e87497dc7b2 to your computer and use it in GitHub Desktop.
Save roohitavaf/0bf0ad11e282ef2d33640e87497dc7b2 to your computer and use it in GitHub Desktop.
rm -rf POutput/netcoreapp3.1
pc -proj:myProtocol.pproj
#usage: ./run_tests iterations [threshold]
function run_test() {
pmc POutput/netcoreapp3.1/myProtocol.dll -m $1 -i $2 --coverage activity $3
}
function save_bug() {
cp POutput/netcoreapp3.1/Output/myProtocol.dll/CoyoteOutput/myProtocol_0_0.schedule "bugs/$1_$(date +"%m-%d-%y-%R").schedule"
cp POutput/netcoreapp3.1/Output/myProtocol.dll/CoyoteOutput/myProtocol_0_0.txt "bugs/$1_$(date +"%m-%d-%y-%R").txt"
}
TESTS=(
Test1
Test2
Test3
)
for i in "${TESTS[@]}"
do
echo "Running:----------------------- $i -----------------------"
if [ ! -z "$2" ]
then
threshold="--liveness-temperature-threshold $2"
else
threshold=""
fi
echo $threshold
if ! run_test "PImplementation.$i.Execute" $1 "$threshold"
then
save_bug $i
echo "Bug found for $i. The schedule and output copied to the bug folder."
else
echo "No bug found for $i"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment