You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Check that the file exists before performing actions on it
73
-
if [ -s all_mutants.txt ]; then
74
-
echo "The file containing mutants is missing or empty!"
75
-
exit 1
76
-
fi
77
-
78
-
# Split the differences from git into 2 parts, big packages ('stacks-node' and 'stackslib') and small packages (all others) and put them into separate files
79
-
while IFS= read -r line; do
80
-
package=$(echo "$line" | cut -d'/' -f1)
81
-
if [[ $package == "testnet" || $package == "stackslib" ]]; then
echo "<summary>What are missed mutants?</summary>" >> "$GITHUB_STEP_SUMMARY"
299
-
echo "<br>" >> "$GITHUB_STEP_SUMMARY"
300
-
echo "No test failed with this mutation applied, which seems to indicate a gap in test coverage. Or, it may be that the mutant is undistinguishable from the correct code. You may wish to add a better test, or mark that the function should be skipped." >> "$GITHUB_STEP_SUMMARY"
301
-
echo "</details>" >> "$GITHUB_STEP_SUMMARY"
302
-
echo "" >> "$GITHUB_STEP_SUMMARY"
303
-
elif [[ "$section_title" == "Timeout:" ]]; then
304
-
echo "<details>" >> "$GITHUB_STEP_SUMMARY"
305
-
echo "<summary>What are timeout mutants?</summary>" >> "$GITHUB_STEP_SUMMARY"
306
-
echo "<br>" >> "$GITHUB_STEP_SUMMARY"
307
-
echo "The mutation caused the test suite to run for a long time, until it was eventually killed. You might want to investigate the cause and potentially mark the function to be skipped." >> "$GITHUB_STEP_SUMMARY"
308
-
echo "</details>" >> "$GITHUB_STEP_SUMMARY"
309
-
echo "" >> "$GITHUB_STEP_SUMMARY"
310
-
elif [[ "$section_title" == "Unviable:" ]]; then
311
-
echo "<details>" >> "$GITHUB_STEP_SUMMARY"
312
-
echo "<summary>What are unviable mutants?</summary>" >> "$GITHUB_STEP_SUMMARY"
313
-
echo "<br>" >> "$GITHUB_STEP_SUMMARY"
314
-
echo "The attempted mutation doesn't compile. This is inconclusive about test coverage and no action is needed, unless you wish to test the specific function, in which case you may wish to add a 'Default::default()' implementation for the specific return type." >> "$GITHUB_STEP_SUMMARY"
echo "### To resolve this issue, consider one of the following options:" >> "$GITHUB_STEP_SUMMARY"
327
-
echo "- Modify or add tests including this function." >> "$GITHUB_STEP_SUMMARY"
328
-
echo "- If you are absolutely certain that this function should not undergo mutation testing, add '#[mutants::skip]' or '#[cfg_attr(test, mutants::skip)]' function header to skip it." >> "$GITHUB_STEP_SUMMARY"
329
-
elif [[ "$section_title" == "Timeout:" ]]; then
330
-
echo "### To resolve this issue, consider one of the following options:" >> "$GITHUB_STEP_SUMMARY"
331
-
echo "- Modify the tests that include this funcion." >> "$GITHUB_STEP_SUMMARY"
332
-
echo "- Add '#[mutants::skip]' or '#[cfg_attr(test, mutants::skip)]' function header to skip it." >> "$GITHUB_STEP_SUMMARY"
333
-
elif [[ "$section_title" == "Unviable:" ]]; then
334
-
echo "### To resolve this issue, consider one of the following options:" >> "$GITHUB_STEP_SUMMARY"
335
-
echo "- Create 'Default::default()' implementation for the specific structure." >> "$GITHUB_STEP_SUMMARY"
336
-
echo "- Add '#[mutants::skip]' or '#[cfg_attr(test, mutants::skip)]' function header to skip it." >> "$GITHUB_STEP_SUMMARY"
0 commit comments