aboutsummaryrefslogtreecommitdiffstats
path: root/mutator.sh
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2016-11-06 10:23:51 +0000
committerbloodstalker <thabogre@gmail.com>2016-11-06 10:23:51 +0000
commit2184588b48745258bfff88f80bae43739fa60889 (patch)
treee30ee48b07ceabfd9f457700d7fa48fdaa4faf8a /mutator.sh
parentnow detects switchstm without breaks or the default cluase. (diff)
downloadmutator-2184588b48745258bfff88f80bae43739fa60889.tar.gz
mutator-2184588b48745258bfff88f80bae43739fa60889.zip
added the misra-c check command
Diffstat (limited to '')
-rwxr-xr-xmutator.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/mutator.sh b/mutator.sh
index 616b9cc..189df7a 100755
--- a/mutator.sh
+++ b/mutator.sh
@@ -28,6 +28,7 @@ do
echo " default runs build-all and then run."
echo " format calls clang-format to format the mutant. later to be used for the test command."
echo " test runs the tests on the executables and checks the results."
+ echo " misrac checks for misrac rules"
echo "-v, --version prints out the version."
echo "-i, --input, -input lets you choose the input file that is going to be passed to the mutator executable(s)."
echo "-o, --output, -output lets you choose where to put the mutant."
@@ -76,6 +77,9 @@ elif [[ "$COMMAND" == "run" ]];then
echo "Running executables on target file..."
"./mutator" "$INPUT" -- > mutant-lvl1.c
"./mutator-lvl2" mutant-lvl1.c -- > $OUTPUT
+elif [[ "$COMMAND" == "misrac" ]]; then
+ echo "checking input file(s) against Misra-C 2004..."
+ "./mutator-lvl0" "$INPUT" -- > misra-log
elif [[ "$COMMAND" == "default" ]]; then
echo "Building all target executables..."
"make" all