Created
June 1, 2022 03:41
-
-
Save roohitavaf/0bf0ad11e282ef2d33640e87497dc7b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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