You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/04/01 03:22:20 UTC

[GitHub] [incubator-doris] EmmyMiao87 commented on a change in pull request #8792: [test][enhance][refactor] support suite block to specify multiple group, suppo…

EmmyMiao87 commented on a change in pull request #8792:
URL: https://github.com/apache/incubator-doris/pull/8792#discussion_r840199987



##########
File path: run-regression-test.sh
##########
@@ -80,20 +84,24 @@ Default config file: \${DORIS_HOME}/regression-test/conf/regression-conf.groovy
 
 CLEAN=
 WRONG_CMD=
+TEAMCITY=
 RUN=
 if [ $# == 0 ] ; then
     #default
     CLEAN=0
     WRONG_CMD=0
+    TEAMCITY=0
     RUN=1
 else
     CLEAN=0
     RUN=0
+    TEAMCITY=0
     WRONG_CMD=0
     while true; do
         case "$1" in
-            --clean) CLEAN=1 ; shift ;;
-            --run) RUN=1 ; shift ;;
+            --clean)    CLEAN=1 ; shift ;;
+	     --teamcity) TEAMCITY=1 ; shift ;;

Review comment:
       ```suggestion
   	    --teamcity) TEAMCITY=1 ; shift ;;
   ```

##########
File path: run-regression-test.sh
##########
@@ -80,20 +84,24 @@ Default config file: \${DORIS_HOME}/regression-test/conf/regression-conf.groovy
 
 CLEAN=
 WRONG_CMD=
+TEAMCITY=
 RUN=
 if [ $# == 0 ] ; then
     #default
     CLEAN=0
     WRONG_CMD=0
+    TEAMCITY=0
     RUN=1
 else
     CLEAN=0
     RUN=0
+    TEAMCITY=0
     WRONG_CMD=0
     while true; do
         case "$1" in
-            --clean) CLEAN=1 ; shift ;;
-            --run) RUN=1 ; shift ;;
+            --clean)    CLEAN=1 ; shift ;;
+	     --teamcity) TEAMCITY=1 ; shift ;;
+              --run)      RUN=1 ; shift ;;

Review comment:
       ```suggestion
                --run)      RUN=1 ; shift ;;
   ```

##########
File path: regression-test/framework/src/main/groovy/org/apache/doris/regression/util/TeamcityUtils.groovy
##########
@@ -0,0 +1,104 @@
+// 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.
+
+package org.apache.doris.regression.util
+
+import groovy.transform.CompileStatic
+import org.apache.doris.regression.suite.ScriptContext
+import org.apache.doris.regression.suite.SuiteContext
+import org.apache.tools.ant.util.DateUtils
+
+@CompileStatic
+class TeamcityUtils {
+    static String formatNow() {
+        return DateUtils.format(System.currentTimeMillis(), "yyyy-MM-dd'T'HH:mm:ss.SSSZ")
+    }
+
+    static String formatStdOut(SuiteContext suiteContext, String msg) {
+        String timestamp = formatNow()
+        return "##teamcity[testStdOut name='${suiteContext.flowName}' out='${escape(msg)}' flowId='${suiteContext.flowId}' timestamp='${timestamp}']"
+    }
+
+    static String formatStdErr(SuiteContext suiteContext, String msg) {
+        String timestamp = formatNow()
+        return "##teamcity[testStdErr name='${suiteContext.flowName}' out='${escape(msg)}' flowId='${suiteContext.flowId}' timestamp='${timestamp}']"
+    }
+
+//    static void testSuiteStarted(ScriptContext scriptContext) {

Review comment:
       Remove it directly ~

##########
File path: docs/zh-CN/developer-guide/regression-testing.md
##########
@@ -489,4 +531,11 @@ thread, lazyCheck, events, connect, selectUnionAll
 
 # 使用查询结果自动生成sql_action用例的.out文件,如果.out文件存在则覆盖
 ./run-regression-test.sh --run sql_action -forceGenOut
+```
+
+## CI/CD的支持
+### TeamCity
+可以使用--teamcity开启TeamCity Service Message. `-Dteamcity.enableStdErr=false`可以让错误日志也打印到stdout中,方便按顺序分析日志。

Review comment:
       如果开启 --teamcity 的话,输出的文件是在哪里?以及在teamcity 上需要什么特殊的配置嘛?




-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org