Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CUBRIDQA-1245] modify CTP for circleci #694

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 42 additions & 2 deletions CTP/conf/shell.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,20 @@
# default.ssh.port=<ssh port>
# Define default parameters for all instance nodes to configure cubrid.conf
# default.cubrid.<property>=<property value>
default.cubrid.cubrid_port_id=1568
# Define default parameters for all instance nodes to configure the broker section in cubrid_broker.conf
# default.brokercommon.<property>=<property value>
# Define default parameters for all instance nodes to configure the broker %query_editor section in cubrid_broker.conf
# default.broker1.<property>=<property value>
default.broker1.BROKER_PORT=10090
default.broker1.APPL_SERVER_SHM_ID=10090
# Define default parameters for all instance nodes to configure the broker %BROKER1 section in cubrid_broker.conf
# default.broker2.<property>=<property value>
default.broker2.BROKER_PORT=13091
default.broker2.APPL_SERVER_SHM_ID=13091
# Define default parameters for all instance nodes to configure cubrid_ha.conf
# default.ha.<property>=<property value>
default.ha.ha_port_id=19909
# Define default parameters for all instance nodes to configure cm.conf
# default.cm.<property>=<property value>

Expand Down Expand Up @@ -66,11 +72,45 @@
# cubrid_download_url=http://127.0.0.1/download/CUBRID-10.1.0.6929-b049ba5-Linux.x86_64.sh

# Define the path of test cases used for testing, it should be checked out on test node
scenario=${HOME}/cubrid-testcases/shell
scenario=${HOME}/cubrid-testcases-private-ex/shell
testcase_exclude_from_file=${HOME}/cubrid-testcases-private-ex/shell/config/daily_regression_test_excluded_list_linux.conf

# Define the max retry count for the failed case, when the case testing is failed, CTP will repeat to execute the failed case,
# and once it's PASS during retry process, CTP will stop retry and start to execute the next case.
testcase_retry_num=0

# Define the max timeout time (unit: second) for each case
testcase_timeout_in_secs=7200
testcase_timeout_in_secs=300

# When the test is interrupted and started again, we can choose whether to run it continuously or re-run it.
test_continue_yn=false

#Whether update test cases before test
testcase_update_yn=true
testcase_git_branch=develop

test_platform=linux
test_category=shell

# If the macro is included in the case, it will be excluded from the test.
# For example, if 'LINUX_NOT_SUPPORTED' is included in the case, it will not be run in linux shell test.
testcase_exclude_by_macro=LINUX_NOT_SUPPORTED

# Some times there is not enough disk space on the test machine, so we need to delete all the files under the test case path after the case is run.
delete_testcase_after_each_execution_yn=false
enable_check_disk_space_yn=false

# set test result feed back type: file or database
feedback_type=file
#feedback_notice_qahome_url=http://192.168.1.86:8080/qaresult/shellImportAction.nhn?main_id=<MAINID>

#git_user=cubridqa
#[email protected]
#git_pwd=GITPASSWORD

#these parameters are used when feedback_type=database
#feedback_db_host=192.168.1.86
#feedback_db_port=33080
#feedback_db_name=qaresu
#feedback_db_user=dba
#feedback_db_pwd=
28 changes: 14 additions & 14 deletions CTP/shell/init_path/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ begin_time=0
## the end time for case
end_time=0
#0: not count time 1: count time
need_count_time=0
need_count_time=1
cubrid_major=""
cubrid_minor=""
IGNORE_TEST_PERFORMANCE=""
Expand Down Expand Up @@ -637,16 +637,15 @@ function count_time
duration=$(($end_time-$begin_time))
date_str=`date +"%Y-%m-%d"`
time_str=`date +%H:%M:%S`
cur_pwd=`pwd`
echo $time_str----$cur_pwd---'time'=$duration >> ~/shell_cases_log/$date_str-time.log
echo $time_str----$cur_path--- time="$duration" >> ${cur_path}/$result_file
if [ $duration -gt 7200 ]; then # 2hours
echo $time_str----$cur_pwd---$duration >> ~/shell_cases_log/$date_str-gt_2hours.log
echo $time_str----$cur_pwd--- over 2hour time="$duration" >> ${cur_path}/$result_file
elif [ $duration -gt 3600 ]; then # 1hours
echo $time_str----$cur_pwd---$duration >> ~/shell_cases_log/$date_str-gt_1hours.log
echo $time_str----$cur_pwd--- over 1hour time="$duration" >> ${cur_path}/$result_file
elif [ $duration -gt 1800 ]; then # 30minutes
echo $time_str----$cur_pwd---$duration >> ~/shell_cases_log/$date_str-gt_30minutes.log
echo $time_str----$cur_pwd--- over 30minutes time="$duration" >> ${cur_path}/$result_file
elif [ $duration -gt 600 ]; then # 10minutes
echo $time_str----$cur_pwd---$duration >> ~/shell_cases_log/$date_str-gt_10minutes.log
echo $time_str----$cur_pwd--- over 10minutes time="$duration" >> ${cur_path}/$result_file
fi
}

Expand Down Expand Up @@ -683,20 +682,21 @@ function get_language()
function init
{
echo "[INFO] TEST START (`date`)"
if [ $need_count_time -eq 1 ]; then
begin_time=`get_curr_second`
date_str=`date +"%Y-%m-%d"`
time_str=`date +%H:%M:%S`
echo $time_str----`pwd` >> ~/shell_cases_log/$date_str-time.log
fi

cur_path=`pwd`
cd $cur_path
case_no=1
full_name=$0
answer_no=1
mode=$1


if [ $need_count_time -eq 1 ]; then
begin_time=`get_curr_second`
date_str=`date +"%Y-%m-%d"`
time_str=`date +%H:%M:%S`
echo $time_str----$cur_path---- test start >> ${cur_path}/$result_file
fi

if [ "$OS" = "Windows_NT" ]; then
export init_path=`cygpath "${init_path}"`
export REAL_INIT_PATH=`cygpath -w "${init_path}"`
Expand Down
Loading