github.com/matrixorigin/matrixone@v1.2.0/optools/compose_bvt/compose_bvt.sh (about) 1 #!/bin/bash 2 3 set -e 4 5 MO_WORKSPACE=$1 6 COMPOSE_LAUNCH=$2 7 8 function export_logs() { 9 cd ${MO_WORKSPACE} 10 rm -f ./etc/launch-tae-compose/config/*.bak 11 curl http://localhost:12345/debug/pprof/goroutine\?debug=2 -o docker-compose-log/cn-0-dump-stacks.log 12 curl http://localhost:22345/debug/pprof/goroutine\?debug=2 -o docker-compose-log/cn-1-dump-stacks.log 13 14 } 15 16 function compose_bvt() { 17 trap "export_logs" EXIT 18 19 cd ${MO_WORKSPACE} 20 21 docker compose -f etc/launch-tae-compose/compose.yaml --profile "${COMPOSE_LAUNCH}" up -d --build 22 docker build -t matrixorigin/compose_tester:local -f optools/compose_bvt/Dockerfile.tester . 23 docker run -it --name compose-tester --privileged --network launch-tae-compose_monet -v ${MO_WORKSPACE}/docker-compose-log:/test --rm matrixorigin/compose_tester:local 24 exit 0 25 } 26 27 #create the dir for export logs 28 rm -rf ${MO_WORKSPACE}/docker-compose-log && mkdir -p ${MO_WORKSPACE}/docker-compose-log 29 30 compose_bvt 31 32 exit $?