src/templates/mercury/tests/*: using shell script to sort test outcomes