zhangy5 commented on code in PR #22883: URL: https://github.com/apache/doris/pull/22883#discussion_r1311182940
########## pytest/run_case.sh: ########## @@ -0,0 +1,325 @@ +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +export ROOT_PATH=$(pwd) +export SYS_PATH=${ROOT_PATH}/sys +export QE_PATH=${ROOT_PATH}/qe/palo2/src +export QE_BUG_PATH=${ROOT_PATH}/qe/query_regression +export REPORT_PATH=${ROOT_PATH}/result +export ENV_PATH=${ROOT_PATH}/lib +export PYTHONPATH=${PYTHONPATH}:${ROOT_PATH}:${ROOT_PATH}/sys:${ROOT_PATH}/qe/palo2/lib:${ROOT_PATH}/deploy +rm -f ${ROOT_PATH}/*.xml | tee +rm -f ${ROOT_PATH}/*.html | tee +rm -rf ${REPORT_PATH} +mkdir -p ${REPORT_PATH} + +cd ${SYS_PATH} + +if [[ -z ${testsuite} ]]; then + testsuite=normal +fi + +if [[ -z ${PROCESS_NUM} ]]; then + PROCESS_NUM=30 +fi + +if [[ -z ${RESTART_BE_AUTO} ]]; then + RESTART_BE_AUTO=false +fi + +[[ -e /tmp/fd1 ]] || mkfifo /tmp/fd1 +exec 3<>/tmp/fd1 +rm -rf /tmp/fd1 + +for ((i=1;i<=PROCESS_NUM;i++)) +do + echo >&3 +done + +function check_cluster () +{ + # check if fe or be dead and start it + cd ${ENV_PATH} + python node_op.py -c ''' + import Node + Node.check_cluster(fe_check=False) + ''' +} + +function pytest_execute () +{ + case_file=$1 + ls ${case_file} + pytest -sv --junit-xml="${REPORT_PATH}"/"${case_file%.py}".xml --html="${REPORT_PATH}"/"${case_file%.py}".html "${case_file}" --tb=native 2>&1 > "${case_file%.py}".log Review Comment: done ########## pytest/run_case.sh: ########## @@ -0,0 +1,325 @@ +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +export ROOT_PATH=$(pwd) +export SYS_PATH=${ROOT_PATH}/sys +export QE_PATH=${ROOT_PATH}/qe/palo2/src +export QE_BUG_PATH=${ROOT_PATH}/qe/query_regression +export REPORT_PATH=${ROOT_PATH}/result +export ENV_PATH=${ROOT_PATH}/lib +export PYTHONPATH=${PYTHONPATH}:${ROOT_PATH}:${ROOT_PATH}/sys:${ROOT_PATH}/qe/palo2/lib:${ROOT_PATH}/deploy +rm -f ${ROOT_PATH}/*.xml | tee +rm -f ${ROOT_PATH}/*.html | tee +rm -rf ${REPORT_PATH} +mkdir -p ${REPORT_PATH} + +cd ${SYS_PATH} + +if [[ -z ${testsuite} ]]; then + testsuite=normal +fi + +if [[ -z ${PROCESS_NUM} ]]; then + PROCESS_NUM=30 +fi + +if [[ -z ${RESTART_BE_AUTO} ]]; then + RESTART_BE_AUTO=false +fi + +[[ -e /tmp/fd1 ]] || mkfifo /tmp/fd1 +exec 3<>/tmp/fd1 +rm -rf /tmp/fd1 + +for ((i=1;i<=PROCESS_NUM;i++)) +do + echo >&3 +done + +function check_cluster () +{ + # check if fe or be dead and start it + cd ${ENV_PATH} + python node_op.py -c ''' + import Node + Node.check_cluster(fe_check=False) + ''' +} + +function pytest_execute () +{ + case_file=$1 + ls ${case_file} + pytest -sv --junit-xml="${REPORT_PATH}"/"${case_file%.py}".xml --html="${REPORT_PATH}"/"${case_file%.py}".html "${case_file}" --tb=native 2>&1 > "${case_file%.py}".log + sleep 1 +} + +function case_execute () +{ + for case_file in "$@" Review Comment: done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org