@@ -225,7 +225,7 @@ test_single() {
225225 cat $tests_path /$test_name /create.sql
226226 return 1
227227 fi
228-
228+
229229 if [ -f $tests_path /$test_name /before.sql ]; then
230230 gh-ost-test-mysql-master --default-character-set=utf8mb4 test < $tests_path /$test_name /before.sql
231231 gh-ost-test-mysql-replica --default-character-set=utf8mb4 test < $tests_path /$test_name /before.sql
@@ -310,7 +310,13 @@ test_single() {
310310 echo_dot
311311 echo $cmd > $exec_command_file
312312 echo_dot
313- bash $exec_command_file 1> $test_logfile 2>&1
313+ {
314+ echo " ==============================================================================="
315+ echo " TEST: $test_name "
316+ echo " TIME: $( date ' +%Y-%m-%d %H:%M:%S' ) "
317+ echo " ==============================================================================="
318+ } > $test_logfile 2>&1
319+ bash $exec_command_file > $test_logfile 2>&1
314320
315321 execution_result=$?
316322 cleanup
@@ -332,7 +338,10 @@ test_single() {
332338 if [ -f $tests_path /$test_name /expect_failure ]; then
333339 if [ $execution_result -eq 0 ]; then
334340 echo
335- echo " ERROR $test_name execution was expected to exit on error but did not. cat $test_logfile "
341+ echo " ERROR $test_name execution was expected to exit on error but did not."
342+ echo " === Last 50 lines of $test_logfile ==="
343+ tail -n 50 $test_logfile
344+ echo " === End log excerpt ==="
336345 return 1
337346 fi
338347 if [ -s $tests_path /$test_name /expect_failure ]; then
@@ -342,7 +351,10 @@ test_single() {
342351 return 0
343352 fi
344353 echo
345- echo " ERROR $test_name execution was expected to exit with error message '${expected_error_message} ' but did not. cat $test_logfile "
354+ echo " ERROR $test_name execution was expected to exit with error message '${expected_error_message} ' but did not."
355+ echo " === Last 50 lines of $test_logfile ==="
356+ tail -n 50 $test_logfile
357+ echo " === End log excerpt ==="
346358 return 1
347359 fi
348360 # 'expect_failure' file has no content. We generally agree that the failure is correct
0 commit comments