aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2016-11-30 19:56:17 +0000
committerbloodstalker <thabogre@gmail.com>2016-11-30 19:56:17 +0000
commitec16931c372db4363761044c077d26de534eb7d8 (patch)
treeba1175555514519595f7221939c2b00cdd1a9a1d
parentadded a comment regarding replacements (diff)
downloadmutator-ec16931c372db4363761044c077d26de534eb7d8.tar.gz
mutator-ec16931c372db4363761044c077d26de534eb7d8.zip
fixed a problem where the default input list returned an error
-rwxr-xr-xmutator.sh14
1 files changed, 3 insertions, 11 deletions
diff --git a/mutator.sh b/mutator.sh
index 26d786e..f83104e 100755
--- a/mutator.sh
+++ b/mutator.sh
@@ -4,7 +4,7 @@
#the arguments' positions are not important. you also get long and short options.
#default args
-INPUT='./test/testFuncs1.c ./test/main.c ./test/testFuncs2.c'
+INPUT="./test/testFuncs1.c ./test/main.c ./test/testFuncs2.c"
OUTPUT="./mutant.c"
OUTPUT_FORMAT="./mutant_format.c"
COMMAND="jack"
@@ -46,14 +46,6 @@ do
-i|--input|-input)
INPUT="$2"
shift
- while [[ $# -gt 0 ]]
- do
- case &arg in
- -*)
- ;;
- default)
- esac
- done
;;
-o|--output|-output)
OUTPUT="$2"
@@ -88,13 +80,13 @@ elif [[ "$COMMAND" == "build-all" ]]; then
"make" all
elif [[ "$COMMAND" == "run" ]];then
echo "Running executables on target file..."
- "./mutator" "$INPUT" -- > mutant-lvl1.c
+ "./mutator" $INPUT -- > mutant-lvl1.c
"./mutator-lvl2" mutant-lvl1.c -- > $OUTPUT
elif [[ "$COMMAND" == "misrac" ]]; then
echo "Removing previous XML report..."
"rm" ./test/misrareport.xml
echo "checking input file(s) against Misra-C 2004..."
- "./mutator-lvl0" "$INPUT" -- > ./test/misra-log
+ "./mutator-lvl0" $INPUT -- > ./test/misra-log
elif [[ "$COMMAND" == "default" ]]; then
echo "Building all target executables..."
"make" all