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/11 14:34:01 UTC

[GitHub] [incubator-doris] morningman commented on a diff in pull request #8958: [refactor] Unify all unit tests into one binary file

morningman commented on code in PR #8958:
URL: https://github.com/apache/incubator-doris/pull/8958#discussion_r847387912


##########
be/src/geo/geo_functions.cpp:
##########
@@ -236,7 +236,8 @@ void GeoFunctions::st_contains_prepare(doris_udf::FunctionContext* ctx,
             if (str->is_null) {
                 contains_ctx->is_null = true;
             } else {
-                contains_ctx->shapes[i] = GeoShape::from_encoded(str->ptr, str->len);
+                contains_ctx->shapes[i] =
+                        std::shared_ptr<GeoShape>(GeoShape::from_encoded(str->ptr, str->len));

Review Comment:
   Why using shared_ptr instead of unique_ptr?



##########
run-be-ut.sh:
##########
@@ -242,15 +229,11 @@ if [ ${VECTORIZED_ONLY} -eq 1 ]; then
     echo "Run Vectorized ut only"
     export DORIS_TEST_BINARY_DIR=${DORIS_TEST_BINARY_DIR}/vec
 fi
-
-test_files=`find ${DORIS_TEST_BINARY_DIR} -type f -perm -111 -name "*test"`
-
-for test in ${test_files[@]}
-do
-    file_name=${test##*/}
-    if [ -z $RUN_FILE ] || [ $file_name == $RUN_FILE ]; then
-        echo "=== Run $file_name ==="
-        $test --gtest_output=xml:${GTEST_OUTPUT_DIR}/${file_name}.xml
-    fi
-done
-echo "=== Finished. Gtest output: ${GTEST_OUTPUT_DIR}"
+test=${DORIS_TEST_BINARY_DIR}doris_be_test
+echo "${FILTER}"
+if [ -f "$test" ]; then
+    $test --gtest_output=xml:${GTEST_OUTPUT_DIR}/${file_name}.xml  --gtest_print_time=true "${FILTER}"

Review Comment:
   `${file_name}` is not defined



##########
be/test/CMakeLists.txt:
##########
@@ -0,0 +1,389 @@
+# 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.
+
+# where to put generated libraries
+set(LIBRARY_OUTPUT_PATH "${BUILD_DIR}/test")
+
+# where to put generated libraries
+set(EXECUTABLE_OUTPUT_PATH "${BUILD_DIR}/test")
+
+set(AGENT_TEST_FILES
+    agent/utils_test.cpp
+    # agent/agent_server_test.cpp
+    # agent/cgroups_mgr_test.cpp
+    # agent/heartbeat_server_test.cpp
+)
+set(COMMON_TEST_FILES
+    common/resource_tls_test.cpp
+    common/status_test.cpp
+    common/config_test.cpp
+)
+set(ENV_TEST_FILES
+    env/env_posix_test.cpp
+)
+
+set(EXEC_TEST_FILES
+    exec/hash_table_test.cpp
+    exec/olap_common_test.cpp
+    exec/json_scanner_test.cpp
+    exec/json_scanner_with_jsonpath_test.cpp
+    exec/parquet_scanner_test.cpp
+    exec/orc_scanner_test.cpp
+    exec/plain_text_line_reader_uncompressed_test.cpp
+    exec/plain_text_line_reader_gzip_test.cpp
+    exec/plain_text_line_reader_bzip_test.cpp
+    exec/plain_text_line_reader_lz4frame_test.cpp
+    exec/broker_scanner_test.cpp
+    exec/broker_scan_node_test.cpp
+    exec/tablet_info_test.cpp
+    exec/tablet_sink_test.cpp
+    exec/buffered_reader_test.cpp
+    exec/es_http_scan_node_test.cpp
+    exec/es_predicate_test.cpp
+    exec/es_query_builder_test.cpp
+    exec/es_scan_reader_test.cpp
+    exec/s3_reader_test.cpp
+    exec/multi_bytes_separator_test.cpp
+    # exec/hdfs_file_reader_test.cpp

Review Comment:
   How to address these tests?



-- 
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