3
# This script is a hack for lazy developers who want to get a quick
4
# start on the result file. The code here is rather dirty, but it works
5
# If you have a spare moment feel free to improve it - the right way is
6
# to start mysqld yourself and run mysqltest -r
9
if [ -z "$EDITOR" ] ; then
21
echo "Usage: $0 test_name"
27
[ -z "$test_name" ] && usage
29
result_file=$RESULT_DIR/$test_name.result
30
reject_file=$RESULT_DIR/$test_name.reject
32
[ -f $result_file ] && die "result file $result_file has already been created"
35
echo "Running the test case against empty file, will fail, but don't worry"
36
./mysql-test-run --local $test_name
38
if [ -f $reject_file ] ; then
39
echo "Below are the contents of the reject file:"
40
echo "-----start---------------------"
42
echo "-----end-----------------------"
43
echo "Is this the output you expected from your test case?(y/n)[n]"
45
if [ x$yes_no = xy ] ; then
46
echo "Press any key to edit it in $EDITOR, or Ctrl-C to abort"
51
echo "Save $edited file as master result? (y/n)[y]"
53
if [ x$yes_no != xn ]; then
54
mv $reject_file $result_file
57
echo "Your test failed so bad, it did not even produce a reject file"
58
echo "You need to fix your bugs in the test case, the code, or both"