diff --git a/libc-test/src/functionalext/ldso_cfi/BUILD.gn b/libc-test/src/functionalext/ldso_cfi/BUILD.gn index c003fe86375d2be85c4310725ba31c2ee7de43c3..cda215393d0e509c0f8ca9ce20e47589904e913d 100644 --- a/libc-test/src/functionalext/ldso_cfi/BUILD.gn +++ b/libc-test/src/functionalext/ldso_cfi/BUILD.gn @@ -55,7 +55,7 @@ ohos_shared_library("cfi_cross_dso_test_lib") { debug = true } subsystem_name = "musl" - part_name = "libc-test" + part_name = "libc-test-lib" include_dirs = [ "../common", "//third_party/musl/porting/linux/user/include", diff --git a/scripts/runtest_Windows.bat b/scripts/runtest_Windows.bat index c9664fc6fe9c57799aca39c276a3defec2450471..2298b09805516a639b8188f0c61842ea4825c9d3 100644 --- a/scripts/runtest_Windows.bat +++ b/scripts/runtest_Windows.bat @@ -32,6 +32,24 @@ if exist %TESTDIR% ( goto end ) +@REM Xts test require all so should exist in DYNLIB +setlocal enabledelayedexpansion +for %%j in (%TESTDIR%\*) do ( + set tmp_file=%%j + set tmp_file_suffix=!tmp_file:~-3! + if "!tmp_file_suffix!" == ".so" ( + set /a TOTAL_SO_IN_TESTDIR+=1 + call set SO_NAMES=%%SO_NAMES%%;%%j + ) +) + +if !TOTAL_SO_IN_TESTDIR! gtr 0 ( + echo Error: so shoul not exist in %TESTDIR%, you should modify your part_name in gn to set so in %DYNLIB%. + echo Total so:%TOTAL_SO_IN_TESTDIR% + echo So list:&echo\ %SO_NAMES:~1,10000% + goto end +) + @REM 在单板创建目录, 需要预先创建好才能传输到相应位置。 :hdcStart for /F "usebackq delims==" %%r in (`hdc shell param get const.product.cpu.abilist`) DO ( diff --git a/scripts/runtest_linux.sh b/scripts/runtest_linux.sh index c923583980ae1cc0fd6c8d5122adf04eb2b01103..91d2f8c07de18d4306282a2ad4de77d6ccb0a262 100755 --- a/scripts/runtest_linux.sh +++ b/scripts/runtest_linux.sh @@ -70,6 +70,15 @@ if [ ! -d ${TESTDIR} ]; then exit 1 fi +# Xts test require all so should exist in ${DYNLIB} +TOTAL_SO_IN_TESTDIR=$(ls ${TESTDIR} | grep -E "*.so$" | wc -l) +SO_NAMES=$(ls ${TESTDIR} | grep -E "*.so$") +if [ $TOTAL_SO_IN_TESTDIR -gt 0 ]; then + echo Error: so shoul not exist in ${TESTDIR}, you should modify your part_name in gn to set so in ${DYNLIB}. + echo "Total so:${TOTAL_SO_IN_TESTDIR}" + echo -e "So list:\n${SO_NAMES}" + exit 1 +fi echo now mkdir ${CMD} shell rm -rf ${REMOTE}