Skip to content

Commit 2a5437e

Browse files
Merge pull request #57 from kamil-holubicki/DISTMYSQL-432
DISTMYSQL-432: gtid-errant test fails when the test is done with PS 8.0.x
2 parents 27b1572 + e87286e commit 2a5437e

File tree

90 files changed

+2096
-123
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+2096
-123
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
#
3+
# If this script is present, and it returns zero, the test is executed.
4+
# Otherwise the test is skipped.
5+
6+
set -e
7+
8+
mysql_version=$(mysql -uci -pci -h 127.0.0.1 --port=10111 -e "select @@global.version" -s -N)
9+
10+
required_version="8.4.0"
11+
12+
echo "run_condition script: mysql_version: ${mysql_version}, required_version: ${required_version}"
13+
14+
if [[ "$mysql_version" < "$required_version" ]]; then
15+
exit 1
16+
fi
17+
18+
exit 0

tests/system/test.sh

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ tests_successful_file=/tmp/system-tests-successful.txt
2121
tests_failed_file=/tmp/system-tests-failed.txt
2222
unstable_tests=
2323
failed_tests=
24+
skipped_tests=
2425

2526
exec_cmd() {
2627
echo "$@"
@@ -187,6 +188,14 @@ test_step() {
187188
test_single() {
188189
local test_name="$1"
189190

191+
if [ -f $tests_path/$test_name/run_condition ] ; then
192+
bash $tests_path/$test_name/run_condition
193+
if [ $? -ne 0 ] ; then
194+
echo "Skipping execution of test $test_name, because its run condition is not met"
195+
return 2
196+
fi
197+
fi
198+
190199
bash $tests_path/setup 1> $setup_teardown_logfile 2>&1
191200
if [ $? -ne 0 ] ; then
192201
echo "ERROR global setup failed"
@@ -310,6 +319,7 @@ test_all() {
310319
local passed_cnt=0
311320
local unstable_cnt=0
312321
local failed_cnt=0
322+
local skipped_cnt=0
313323
local total_cnt=0
314324
local expected_cnt=`find $tests_path -mindepth 1 -maxdepth 1 ! -path . -type d | wc -l`
315325

@@ -336,13 +346,17 @@ test_all() {
336346
fi
337347
test_single "$test_name"
338348
test_single_result=$?
339-
if [ $test_single_result -eq 0 ] ; then
349+
if [[ $test_single_result -eq 0 || $test_single_result -eq 2 ]] ; then
340350
break
341351
fi
342352
done
343353
if [ $test_single_result -eq 0 ] ; then
344354
echo "Test finished. Testname: ${test_name} status: ${test_status}"
345355
echo "$test_name" >> $tests_successful_file
356+
elif [ $test_single_result -eq 2 ] ; then
357+
test_status="SKIPPED"
358+
echo "Test finished. Testname: ${test_name} status: ${test_status}"
359+
echo "$test_name" >> $tests_successful_file
346360
else
347361
echo "$test_name" >> $tests_failed_file
348362
test_status="FAILED"
@@ -361,6 +375,9 @@ test_all() {
361375
elif [ "${test_status}" == "UNSTABLE" ] ; then
362376
((unstable_cnt++))
363377
unstable_tests+="${test_name} "
378+
elif [ "${test_status}" == "SKIPPED" ] ; then
379+
((skipped_cnt++))
380+
skipped_tests+="${test_name} "
364381
elif [ "${test_status}" == "FAILED" ] ; then
365382
((failed_cnt++))
366383
failed_tests+="${test_name} "
@@ -383,10 +400,14 @@ test_all() {
383400
echo "Test results (cnt/executed_tests_cnt/total_tests_count):"
384401
echo "PASSED: ${passed_cnt}/${total_cnt}/${expected_cnt}"
385402
echo "UNSTABLE: ${unstable_cnt}/${total_cnt}/${expected_cnt}"
403+
echo "SKIPPED: ${skipped_cnt}/${total_cnt}/${expected_cnt}"
386404
echo "FAILED: ${failed_cnt}/${total_cnt}/${expected_cnt}"
387405
if [[ -n ${unstable_tests} ]]; then
388406
echo "UNSTABLE TESTS: ${unstable_tests}"
389407
fi
408+
if [[ -n ${skipped_tests} ]]; then
409+
echo "SKIPPED TESTS: ${skipped_tests}"
410+
fi
390411
if [[ -n ${failed_tests} ]]; then
391412
echo "FAILED TESTS: ${failed_tests}"
392413
fi

vendor/golang.org/x/crypto/LICENSE

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/LICENSE

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/unix/README.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/unix/ioctl_linux.go

Lines changed: 96 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/unix/mkerrors.sh

Lines changed: 16 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/unix/syscall_aix.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/unix/syscall_darwin.go

Lines changed: 49 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/unix/syscall_hurd.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)