forked from SkyAPMTest/agent-auto-integration-testcases
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy-test.sh
executable file
·47 lines (41 loc) · 1.09 KB
/
deploy-test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
Usage(){
echo "Usage: agent-test.sh [OPTIONS]"
echo "Options:"
echo -e " -p | --project projectName \t\t Only test the case under the project. "
echo -e " -civ | --collector-image-version version \t\t Set mock collector image. "
echo -e " -b | --branch branch \t\t The branch name of Skywalking. "
}
PRG="$0"
PRGDIR=`dirname "$PRG"`
[ -z "$AGENT_TEST_HOME" ] && AGENT_TEST_HOME=`cd "$PRGDIR" >/dev/null; pwd`
#
# the define env variables
#
TEST_PROJECT_NAME=""
MOCK_COLLECTOR_IMAGE_VERSION="3.2.6-2017"
AGENT_BRANCH_NAME="master"
#
# Parse the input parameters
#
while [[ $# -gt 0 ]]; do
case "$1" in
-p | --project )
TEST_PROJECT_NAME=$2
shift 2
;;
-civ | --collector-image-version )
MOCK_COLLECTOR_IMAGE_VERSION=$2
shift 2
;;
-b | --branch )
AGENT_BRANCH_NAME=$2
shift 2
;;
* )
shift
break
esac
done
${AGENT_TEST_HOME}/.autotest/autotest-deploy.sh --project "${TEST_PROJECT_NAME}" --collector-image-version "$MOCK_COLLECTOR_IMAGE_VERSION"
${AGENT_TEST_HOME}/.autotest/agent-test.sh --max-running-size 5 --branch "$AGENT_BRANCH_NAME"