Project

General

Profile

Revision 6423979f

View differences:

scripts/gen_test_suite.sh
126 126
  top_call=`echo $outputs | sed "s/:[^';']*;/,/g;s/:.*//"`
127 127
  mutant_call=`echo $outputs_mutant | sed "s/:[^';']*;/,/g;s/:.*//"`
128 128
  input_args=`echo $inputs | sed "s/:[^';']*;/,/g;s/:.*//"`
129
  echo $input_args
130 129
  for unkilled in $unkilleds; do
131 130
    mutant=mutants/${name}/`basename $unkilled _${node}_mutant`.lus
132 131
    echo "Trying to create a new test to kill $mutant"
......
144 143
    tmp_uid=v$(echo `date +%N`)
145 144
    tmp_vars=tmp/$tmp_uid
146 145
    touch ${tmp_vars} 
147
    for i in $input_args; do echo "($i or not $i)" > ${tmp_vars}; done
146
    cat $file | grep -v "^[' ']*--" | xargs | sed "s/.*node ${node}[' ']*(\([^')']*\))[' ']*returns[' ']*(\([^')']*\))[' ']*;.*/\1/" | sed "s/:[^';']*;/\n/g;s/:.*/\n/;s/,/\n/g" | xargs | sed "s/ /\n/g" > tmp/inputs
147
    while read i; do
148
    	echo "($i=$i)" >> ${tmp_vars}; 
149
    done < tmp/inputs
148 150
    tautology=`cat $tmp_vars | xargs | sed "s/) (/) and (/g"`
149 151
    rm ${tmp_vars}
150 152
    echo "  kill_the_mutant = ($top_call = $mutant_call) and ${tautology};" >>  ${kill_main}

Also available in: Unified diff