Revision 8fdeb449 scripts/gen_test_suite.sh
scripts/gen_test_suite.sh | ||
---|---|---|
162 | 162 |
|
163 | 163 |
# We call kind-inter to rebuild the expected output |
164 | 164 |
xsltproc ${inputcsv_xsl} tmp/tmp_${name}_last_input_new.res| grep -v xml | sed "s/ //g" | grep -v "^$" > tmp/input_test |
165 |
timeout $timeout kind-inter -xml -f tmp/input_test -xml ${file_flat} > tmp/tmp_${name}_last_new.res
|
|
165 |
timeout $timeout kind-inter -xml -f tmp/input_test ${file_flat} > tmp/tmp_${name}_last_new.res |
|
166 | 166 |
# cat tmp/${file_flat}.xml |
167 | 167 |
|
168 | 168 |
new_tests="" |
... | ... | |
217 | 217 |
$binary < tmp/test_tmp_${name} | sed "s/^.*: '\([^']*\)'/\1/g" | xargs > tmp/result_tmp_${name} |
218 | 218 |
echo $test | xsltproc ${outputxsl} - | grep -v xml | sed "s/true/1/g;s/false/0/g" | xargs > tmp/oracle_tmp_${name} |
219 | 219 |
diff tmp/oracle_tmp_${name} tmp/result_tmp_${name} > /dev/null |
220 |
[ $? -eq 1 ] && echo "Failure:" && echo "inputs: $inputs" && echo "outputs: \"`cat tmp/result_tmp_${name}`\"" && echo "expected outputs: \"`cat tmp/oracle_tmp_${name}`\"" && echo $test && exit 1 |
|
220 |
res_diff=$? |
|
221 |
[ ${res_diff} -eq 1 ] && echo "Failure: ${inputs}. Result is `cat tmp/result_tmp_${name}`. Expected outputs: `cat tmp/oracle_tmp_${name}`" | tee -a ${summary}_run #&& echo $test && exit 1 |
|
222 |
[ ${res_diff} -eq 0 ] && echo "Test ok: ${inputs}. Result is `cat tmp/result_tmp_${name}`" | tee -a ${summary}_run |
|
221 | 223 |
done < "$suitef" |
222 | 224 |
done |
223 | 225 |
} |
Also available in: Unified diff