Added an option for clickhouse-test to generate reference for just one test. Added reference for one test query. [#METR-10566]

This commit is contained in:
Michael Kolupaev 2014-03-25 23:19:22 +04:00
parent 755fa64369
commit 42be4d6ec5
2 changed files with 5 additions and 2 deletions

View File

@ -68,11 +68,11 @@ do
cat $result_file
elif [ ! -e "$reference_file" ]; then
# надо сгенерировать эталонный результат
if [ "$1" == "--generate" ]; then
if [ "$1" == "--generate" ] && ( [ "$2" == "" ] || [ "$2" == "$test_name" ] ); then
cp $result_file $reference_file
echo -e "$MSG_GENERATED - no reference file"
else
echo -e "$MSG_UNKNOWN - no reference file (use --generate to create)"
echo -e "$MSG_UNKNOWN - no reference file (use --generate [test_name] to create)"
fi
else
diff $reference_file $result_file > $diff_file

View File

@ -0,0 +1,3 @@
[0,0,0]
[0,0,0]