未验证 提交 59be57cc 编写于 作者: O openharmony_ci 提交者: Gitee

!871 libc-test执行脚本优化与用例修复

Merge pull request !871 from mwx1087526/up-test-scripts
......@@ -43,7 +43,7 @@ void readdir_0200(void)
DIR *dir = (DIR *)"";
struct dirent *ret;
ret = readdir(dir);
EXPECT_TRUE("readdir_0200", NULL == ret);
EXPECT_TRUE(" readdir_0200", NULL == ret);
}
int main(int argc, char *argv[])
......
......@@ -8,6 +8,12 @@ touch /data/tests/libc-test/FileList.txt
touch /data/tests/libc-test/SkipList.txt
echo 'root:This.is.a.test:18997:0:99999:7:::'>/etc/shadow
ARCH=arm
ABILIST=$(param get const.product.cpu.abilist)
if [ $ABILIST == "arm64-v8a" ]; then
ARCH=aarch64
fi
function FileSuffix() {
local filename="$1"
if [ -n "$filename" ]; then
......@@ -29,8 +35,15 @@ ShieldedList=("trace_stresstest" "syslog" "vsyslog" "runtest"
#Some math test cases need to skip.
"acoshl" "asinhl" "erfcl" "fenv" "fma" "fmaf" "fmal" "lgammal" "nearbyint" "nearbyintf"
"nearbyintl" "rint" "rintf" "rintl" "sqrt" "sqrtf" "sqrtl" "tgammal"
#TODO-arm32
"dlopen_ns" "malloc-brk-fail" "pthread_cancel" "res_send"
)
#TODO-aarch64
if [ $ARCH == "aarch64" ]; then
ShieldedList+=("faccessat" "signal" "unittest_hilog_vsnprint" "yn")
fi
for skiped in ${ShieldedList[*]};do
echo $skiped >> /data/tests/libc-test/SkipList.txt
done
......@@ -62,4 +75,4 @@ do
./runtest -w '' -t 30 $file >> /data/tests/libc-test/REPORT
fi
fi
done
\ No newline at end of file
done
......@@ -14,6 +14,7 @@ set REMOTE=/data/tests/libc-test
set REMOTESYSTEM=/system/lib
@REM runtest脚本所在目录
set SHDIR=%LOCAL%\third_party\musl\scripts
set ARCH=arm
@REM 检查设备是否连接
echo checking HDC device
......@@ -33,6 +34,11 @@ if exist %TESTDIR% (
@REM 在单板创建目录, 需要预先创建好才能传输到相应位置。
:hdcStart
for /F "usebackq delims==" %%r in (`hdc shell param get const.product.cpu.abilist`) DO (
echo %%r | findstr "arm64-v8a" && set ARCH=aarch64
)
echo detect arch = %ARCH%
echo.
echo now mkdir...
hdc shell rm -rf /data/tests/libc-test
......@@ -56,9 +62,9 @@ hdc shell chmod +x %REMOTE%/src/*
hdc shell mount -o rw,remount /
hdc shell chmod 777 /etc
hdc shell cp /etc/ld-musl-namespace-arm.ini /etc/ld-musl-namespace-arm.ini.bak
hdc file send %LOCAL%\third_party\musl\porting\linux\user\config\ld-musl-namespace-arm-test.ini ^
/etc/ld-musl-namespace-arm.ini
hdc shell cp /etc/ld-musl-namespace-%ARCH%.ini /etc/ld-musl-namespace-%ARCH%.ini.bak
hdc file send %LOCAL%\third_party\musl\porting\linux\user\config\ld-musl-namespace-%ARCH%-test.ini ^
/etc/ld-musl-namespace-%ARCH%.ini
hdc shell mkdir %REMOTE%/src/A
hdc shell mkdir %REMOTE%/src/B
hdc shell mkdir %REMOTE%/src/C
......@@ -97,7 +103,7 @@ if exist Summary.txt (
hdc file recv %REMOTE%/FileList.txt %~dp0FileList.txt
hdc file recv %REMOTE%/SkipList.txt %~dp0SkipList.txt
for /f "delims=:" %%a in ('dir /b "%TESTDIR%" ^| findstr /n .*') do set all=%%a
for /f "delims=:" %%a in ('dir /b /a:-d "%TESTDIR%" ^| findstr /n .*') do set all=%%a
for /f %%b in (' find /c /v "" ^<"FileList.txt" ') do set /a run=%%b
for /f %%c in (' find /c "FAIL" ^<"REPORT" ') do set fail=%%c
......@@ -106,13 +112,13 @@ echo ===================================
set /a pass=%run%-%fail%
set /a skip=%all%-%run%
echo SUMMARY
echo SUMMARY-%ARCH%
echo All: %all% ^| Run: %run% ^| Skip: %skip%
echo Pass: [%pass%/%run%]
echo Fail: [%fail%/%run%]
(
echo SUMMARY
echo SUMMARY-%ARCH%
echo All: %all% ^| Run: %run% ^| Skip: %skip%
echo Pass: [%pass%/%run%]
echo Fail: [%fail%/%run%]
......@@ -140,4 +146,4 @@ echo Device not found, please check your device.
:end
echo.
pause
exit
\ No newline at end of file
exit
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册