Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
revert code except loader/
Browse files Browse the repository at this point in the history
  • Loading branch information
lichunzhu committed May 7, 2021
1 parent a0bf0fc commit f31d5dc
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ vendor
tidb-slow.log
/monitoring/dashboards/dm.json
/monitoring/rules/dm_worker.rules.yml
mysql.*.log
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ RUN GO111MODULE=on go mod download

COPY . .

RUN apk update && apk add bash

RUN make dm-worker dm-master dmctl

FROM alpine:3.10
Expand Down
2 changes: 2 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* `bin/dm-worker.test.previous` # generated from `bin/dm-worker.test` by `make compatibility_test`
* [gh-ost](https://github.com/github/gh-ost) # must be added to path, or you can `export GHOST_BINARY=/path/to/gh-ost-binary`
* [pt-online-schema-change](https://www.percona.com/doc/percona-toolkit/LATEST/pt-online-schema-change.html) # must be added to path, or you can `export PTOSC_BINARY=/path/to/pt-osc-binary`
* [GNU sed](https://www.gnu.org/software/sed/) # must be added to path, BSD sed user should be attention
* [GNU awk](https://www.gnu.org/software/gawk/) # must be added to path

2. The following programs must be installed:

Expand Down
6 changes: 4 additions & 2 deletions tests/_utils/env_variables
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ MYSQL_PASSWORD1=${MYSQL_PASSWORD1:-123456}
MYSQL_PASSWORD2=${MYSQL_PASSWORD2:-123456}
TIDB_PASSWORD=${TIDB_PASSWORD:-123456}

TIDB_PORT=4000
TIDB_PORT=${TIDB_PORT:-4000}
MASTER_PORT=8261
MASTER_PORT1=8261
MASTER_PORT2=8361
Expand All @@ -21,4 +21,6 @@ WORKER4_PORT=18262
WORKER5_PORT=18263
SOURCE_ID1="mysql-replica-01"
SOURCE_ID2="mysql-replica-02"
RESET_MASTER=${RESET_MASTER:-true}
RESET_MASTER=${RESET_MASTER:-true}

VERBOSE=${VERBOSE:-false}
17 changes: 13 additions & 4 deletions tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,19 @@ start_services
function run() {
script=$1
echo "Running test $script..."
TEST_DIR="$TEST_DIR" \
PATH="tests/_utils:$PATH" \
TEST_NAME="$(basename "$(dirname "$script")")" \
bash +x "$script"
# run in verbose mode?
echo "Verbose mode = $VERBOSE"
if $VERBOSE ; then
TEST_DIR="$TEST_DIR" \
PATH="tests/_utils:$PATH" \
TEST_NAME="$(basename "$(dirname "$script")")" \
bash -x "$script"
else
TEST_DIR="$TEST_DIR" \
PATH="tests/_utils:$PATH" \
TEST_NAME="$(basename "$(dirname "$script")")" \
bash +x "$script"
fi
}

if [ "$test_case" == "*" ]; then
Expand Down

0 comments on commit f31d5dc

Please sign in to comment.