github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/dm/tests/compatibility_run.sh (about) 1 #!/bin/bash 2 3 set -eu 4 5 TEST_DIR=/tmp/dm_test 6 CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) 7 8 function run() { 9 if [ $1 == "all" ]; then 10 $CUR/run.sh 11 else 12 $CUR/run.sh $1 13 fi 14 } 15 16 if [ "$#" -ge 1 ]; then 17 if [ $1 == "all" ]; then 18 run compatibility 19 fi 20 21 test_case=$1 22 else 23 run compatibility 24 exit 0 25 fi 26 27 echo "run test with current dm-master and previous dm-worker" 28 cp $PWD/bin/dm-master.test.current $PWD/bin/dm-master.test 29 cp $PWD/bin/dm-worker.test.previous $PWD/bin/dm-worker.test 30 31 run "$test_case" 32 33 echo "run test with previous dm-master and current dm-worker" 34 cp $PWD/bin/dm-master.test.previous $PWD/bin/dm-master.test 35 cp $PWD/bin/dm-worker.test.current $PWD/bin/dm-worker.test 36 37 run "$test_case"