Skip to content

Commit

Permalink
fix: [UT] ut shell error
Browse files Browse the repository at this point in the history
fix incorrect tab character and add xvfb test support

Log:
  • Loading branch information
hudeng-go committed Apr 13, 2023
1 parent d3fe98e commit c16f92f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
4 changes: 3 additions & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ Build-Depends:
libpcre3-dev,
deepin-anything-dev[i386 amd64],
deepin-anything-server-dev[i386 amd64],
deepin-desktop-base | deepin-desktop-server | deepin-desktop-device
deepin-desktop-base | deepin-desktop-server | deepin-desktop-device,
xvfb <!nocheck>,
dde-dock <!nocheck>
Standards-Version: 3.9.8
Homepage: http://www.deepin.org

Expand Down
4 changes: 4 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ override_dh_auto_build:
dh_auto_build -- -j8

override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_PROFILES)),)
cd tests && bash test-prj-running.sh
else
echo "skip ut test"
endif
3 changes: 2 additions & 1 deletion tests/test-prj-running.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later

Xvfb :0 &
export DISPLAY=":0"
export QT_QPA_PLATFORM=

Expand All @@ -27,7 +28,7 @@ CLEAR_COMMAND="yes"; #是否清场 no 就不清场
UT_COMMAND="all"; #运行UT类型 no all dde-file-manager
REBUILD_PTJ="yes";
CPP_CHECK_COMMAND="no"; #是否运行cppcheck,no就不运行
CPU_NUMBER=16; #当前使用CPU数目,默认为16
CPU_NUMBER=$(nproc);
SHOW_REPORT="no"; #默认为no 不显示报表

while [ $# -ge 2 ] ; do
Expand Down
4 changes: 2 additions & 2 deletions tests/ut-target-running.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RESULT_UT_REPORT_FILE=$REPORT_DIR/report/report_$REPORT_NAME.xml
ASAN_OPTIONS="new_delete_type_mismatch=0" $BUILD_DIR/$APP_NAME --gtest_output=xml:$RESULT_UT_REPORT_FILE

if [ ! -f "$RESULT_UT_REPORT_FILE" ]; then
  echo "Error: UT process is broken by: " $RESULT_UT_REPORT_FILE
echo "Error: UT process is broken by: " $RESULT_UT_REPORT_FILE
exit 1
fi

Expand All @@ -57,7 +57,7 @@ mv $RESULT_COVERAGE_DIR/index-sort-f.html $RESULT_COVERAGE_DIR/index-sort-f_$REP
mv $RESULT_COVERAGE_DIR/index-sort-l.html $RESULT_COVERAGE_DIR/index-sort-l_$REPORT_NAME.html

if [ ! -f "$LOV_REPORT_FILE" ]; then
  echo "Error: UT lcov process is broken by: " $LOV_REPORT_FILE
echo "Error: UT lcov process is broken by: " $LOV_REPORT_FILE
exit 2
fi

Expand Down

0 comments on commit c16f92f

Please sign in to comment.