aboutsummaryrefslogtreecommitdiffstats
path: root/mutator.sh
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2016-11-02 08:56:51 +0000
committerbloodstalker <thabogre@gmail.com>2016-11-02 08:56:51 +0000
commitdbebd7a2b945c086160756ff0c52a41ad8020abf (patch)
tree44871770d4590b08926df0e911e269fc0d2d5b58 /mutator.sh
parentthe folder that holds the c functions later needed for mutants running. (diff)
downloadmutator-dbebd7a2b945c086160756ff0c52a41ad8020abf.tar.gz
mutator-dbebd7a2b945c086160756ff0c52a41ad8020abf.zip
added the option of using clang-format on the mutant
Diffstat (limited to 'mutator.sh')
-rwxr-xr-xmutator.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/mutator.sh b/mutator.sh
index 1f834c7..4cd5310 100755
--- a/mutator.sh
+++ b/mutator.sh
@@ -6,6 +6,7 @@
#default args
INPUT="./covtest/testFuncs1.c"
OUTPUT="./mutant.c"
+OUTPUT_FORMAT="./mutant_format.c"
COMMAND="jack"
while [[ $# -gt 0 ]]
@@ -25,6 +26,8 @@ do
echo " build-all runs make all."
echo " run runs the mutator executable on the target."
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 "-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."
@@ -61,6 +64,11 @@ if [[ "$COMMAND" == "clean" ]]; then
echo "Killing all mutants..."
"make" clean
rm "$OUTPUT"
+elif [[ "$COMMAND" == "format" ]]; then
+ echo 'using clang-format to format the mutant...'
+ "/home/bloodstalker/llvm-clang/build/bin/clang-format" $OUTPUT > $OUTPUT_FORMAT
+elif [[ "$COMMAND" == "test" ]]; then
+ echo "you haven't implemented it yet..."
elif [[ "$COMMAND" == "build-all" ]]; then
echo "Building all executables..."
"make" all