This is an automated email from the ASF dual-hosted git repository.
wangdan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git
The following commit(s) were added to refs/heads/master by this push:
new 9a2b93ed4 test: support gutil_test in scripts and run it on CI (#2338)
9a2b93ed4 is described below
commit 9a2b93ed49083c39f6f0d0907e466813285708c4
Author: Dan Wang <[email protected]>
AuthorDate: Tue Dec 23 19:25:35 2025 +0800
test: support gutil_test in scripts and run it on CI (#2338)
---
.github/workflows/lint_and_test_cpp.yaml | 6 ++++++
run.sh | 1 +
src/gutil/test/CMakeLists.txt | 2 +-
src/gutil/test/run.sh | 24 ++++++++++++++++++++++--
4 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/lint_and_test_cpp.yaml
b/.github/workflows/lint_and_test_cpp.yaml
index be73a099d..311533b1d 100644
--- a/.github/workflows/lint_and_test_cpp.yaml
+++ b/.github/workflows/lint_and_test_cpp.yaml
@@ -171,6 +171,7 @@ jobs:
- dsn_task_tests
- dsn_utils_tests
- dsn.zookeeper.tests
+ - gutil_test
# TODO(yingchun): Disable it because we find it's too flaky, we will
re-enable it after
# it has been optimized.
# - partition_split_test
@@ -258,6 +259,10 @@ jobs:
- dsn_task_tests
- dsn_utils_tests
- dsn.zookeeper.tests
+ # TODO(wangdan): absl::node_hash_map will fail when ASan tests run
because some objects
+ # have different structures between non-ASan and ASan building. Will
be enabled after
+ # this issue is fixed.
+ # - gutil_test
# TODO(yingchun): Disable it because we find it's too flaky, we will
re-enable it after
# it has been optimized.
# - partition_split_test
@@ -350,6 +355,7 @@ jobs:
# - dsn_task_tests
# - dsn_utils_tests
# - dsn.zookeeper.tests
+# - gutil_test
# - partition_split_test
# - pegasus_geo_test
# - pegasus_rproxy_test
diff --git a/run.sh b/run.sh
index 04ab68ea2..f63a7bd1b 100755
--- a/run.sh
+++ b/run.sh
@@ -434,6 +434,7 @@ function run_test()
dsn_runtime_tests
dsn_utils_tests
dsn.zookeeper.tests
+ gutil_test
partition_split_test
pegasus_geo_test
pegasus_rproxy_test
diff --git a/src/gutil/test/CMakeLists.txt b/src/gutil/test/CMakeLists.txt
index 75e489cd7..c62d83d7c 100644
--- a/src/gutil/test/CMakeLists.txt
+++ b/src/gutil/test/CMakeLists.txt
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-set(MY_PROJ_NAME pgs_gutil_test)
+set(MY_PROJ_NAME gutil_test)
set(MY_PROJ_SRC "")
set(MY_SRC_SEARCH_MODE "GLOB")
set(MY_PROJ_LIBS
diff --git a/src/gutil/test/run.sh b/src/gutil/test/run.sh
index 798d1ac20..73b5a97cf 100755
--- a/src/gutil/test/run.sh
+++ b/src/gutil/test/run.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/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
@@ -16,4 +16,24 @@
# specific language governing permissions and limitations
# under the License.
-./pgs_gutil_test
+if [ -z "${REPORT_DIR}" ]; then
+ REPORT_DIR="."
+fi
+
+output_xml="${REPORT_DIR}/gutil_test.xml"
+GTEST_OUTPUT="xml:${output_xml}" ./gutil_test
+
+if [ $? -ne 0 ]; then
+ echo "run gutil_test failed"
+ echo "---- ls ----"
+ ls -l
+ if [ `find . -name pegasus.log.* | wc -l` -ne 0 ]; then
+ echo "---- tail -n 100 pegasus.log.* ----"
+ tail -n 100 `find . -name pegasus.log.*`
+ fi
+ if [ -f core ]; then
+ echo "---- gdb ./gutil_test core ----"
+ gdb ./gutil_test core -ex "thread apply all bt" -ex "set pagination 0"
-batch
+ fi
+ exit 1
+fi
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]