开发版型号: T507小熊派开发版
软件版本:Openharmony3.0 tag: OpenHarmony-v3.0-LTS
在Windows工作台上,找到从Linux服务器上拷贝下来的测试套件用例目录,在Windows命令窗口进入对应目录,直接执行acts\run.bat。出现如下错误:
C:\Users\liuzhaoqin>acts\run.bat
C:\Users\liuzhaoqin\python\python.exe: No module named xdevice
C:\Users\liuzhaoqin\acts>
是xdevice没安装到环境上,确认下tools目录下是不是没有xdevice对应编译后tar.gz包?
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
方便的话提供下编译后包或者截图
out/ohos-arm-release/suites/acts/tools/ 该目录为空,没有任何东西。
我这边执行的编译命令:./build.sh suite=acts system_size=standard product_name=T507
编译提示是成功的:
......
[297/305] STAMP obj/test/xts/acts/storage/storagefmssharejstest/storagefmsshare_js_test.stamp
[298/305] ACTION //test/xts/acts/updater/update_test:update_js_test(//build/toolchain/ohos:ohos_clang_arm)
Trying to copy "/home/liuzhaoqin/work/bearpi_harmony3.0/sdk/out/ohos-arm-release/suites/haps/updatejstest.hap" to "/home/liuzhaoqin/work/bearpi_harmony3.0/sdk/out/ohos-arm-release/suites/acts/testcases/updatejstest.hap"
[299/305] ACTION //test/xts/acts/storage/storagedsmjstest:storagedsm_js_test(//build/toolchain/ohos:ohos_clang_arm)
Trying to copy "/home/liuzhaoqin/work/bearpi_harmony3.0/sdk/out/ohos-arm-release/suites/haps/storagedsmjstest.hap" to "/home/liuzhaoqin/work/bearpi_harmony3.0/sdk/out/ohos-arm-release/suites/acts/testcases/storagedsmjstest.hap"
[300/305] STAMP obj/test/xts/acts/updater/update_test/update_js_test.stamp
[301/305] STAMP obj/test/xts/acts/storage/storagedsmjstest/storagedsm_js_test.stamp
[302/305] STAMP obj/test/xts/acts/updater/update.stamp
[303/305] STAMP obj/test/xts/acts/storage/storage.stamp
[304/305] ACTION //test/xts/acts:acts(//build/toolchain/ohos:ohos_clang_arm)
make archive disabled
used: 62 seconds
pycache statistics
manage pycache contents
pycache daemon exit
c targets overlap rate statistics
subsystem files NO. percentage builds NO. percentage overlap rate
ark 420 3.1% 753 5.2% 1.79
utils 205 1.5% 245 1.7% 1.20
third_party 6930 51.0% 7523 51.7% 1.09
aafwk 200 1.5% 200 1.4% 1.00
account 14 0.1% 14 0.1% 1.00
ace 1257 9.2% 1257 8.6% 1.00
appexecfwk 370 2.7% 370 2.5% 1.00
ccruntime 29 0.2% 29 0.2% 1.00
communication 464 3.4% 464 3.2% 1.00
developtools 77 0.6% 77 0.5% 1.00
distributeddatamgr 328 2.4% 328 2.3% 1.00
distributedhardware 33 0.2% 33 0.2% 1.00
distributedschedule 41 0.3% 41 0.3% 1.00
global 19 0.1% 19 0.1% 1.00
graphic 133 1.0% 133 0.9% 1.00
hdf 44 0.3% 44 0.3% 1.00
hiviewdfx 135 1.0% 135 0.9% 1.00
miscservices 62 0.5% 62 0.4% 1.00
multimedia 272 2.0% 272 1.9% 1.00
multimodalinput 29 0.2% 29 0.2% 1.00
notification 127 0.9% 127 0.9% 1.00
powermgr 50 0.4% 50 0.3% 1.00
security 268 2.0% 268 1.8% 1.00
startup 57 0.4% 57 0.4% 1.00
telephony 225 1.7% 225 1.5% 1.00
test 36 0.3% 36 0.2% 1.00
updater 81 0.6% 81 0.6% 1.00
wpa_supplicant-2.9 89 0.7% 89 0.6% 1.00
xts 36 0.3% 36 0.2% 1.00
c overall build overlap rate: 1.07
post_process
=====build T507 successful.
2021-11-16 09:47:40
++++++++++++++++++++++++++++++++++++++++
liuzhaoqin@GZExdroid03:~/work/bearpi_harmony3.0/sdk/test/xts/acts$
这个是编译后目录截图。
安装xdevice后进行编译,目录如下,请问属于正常吗? 另外请问developertest需要安装马?
@GZExdroid03:/work/bearpi_harmony3.0/sdk/out/ohos-arm-release/suites/acts/tools$ ls -al/work/bearpi_harmony3.0/sdk/out/ohos-arm-release/suites/acts/tools$
total 448
drwxrwxr-x 2 liuzhaoqin liuzhaoqin 4096 11月 16 10:37 .
drwxrwxr-x 5 liuzhaoqin liuzhaoqin 4096 11月 16 10:37 ..
-rw-r--r-- 1 liuzhaoqin liuzhaoqin 300054 11月 16 10:34 xdevice-0.0.0-py3.8.egg
-rw-r--r-- 1 liuzhaoqin liuzhaoqin 145936 11月 16 10:35 xdevice_extension-0.0.0-py3.8.egg
@GZExdroid03:
不需要developertest。 xdevice-0.0.0-py3.8.egg,xdevice_extension-0.0.0-py3.8.egg 这两个包就是xdevice编译后的产物。
恩 我这边运行起来了, 但是所有模块都报required device does not exist,请问是不是需要配置user_config.xml文件,如何进行配置?
部分log 如下:
testsuite disabled="0" errors="0" failures="0" ignored="0" message="DeviceError: The 'C:\Users\liuzhaoqin\acts\testcases\ActsAnsGetSlotTestCallback.json' required device does not exist" modulename="ActsAnsGetSlotTestCallback" name="ActsAnsGetSlotTestCallback" tests="0" time="0.0" unavailable="1"
另外发现在执行acts\run.bat 后会出现如下打印,请问PC是否需要连接外网?
Reading https://pypi.org/simple/xdevice-extension/
Download error on https://pypi.org/simple/xdevice-extension/: timed out -- Some packages may not be found!
Couldn't find index page for 'xdevice-extension' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.org/simple/
Download error on https://pypi.org/simple/: timed out -- Some packages may not be found!
No local packages or working download links found for xdevice-extension==0.0.0
error: Could not find suitable distribution for Requirement.parse('xdevice-extension==0.0.0')
"Error occurs to install xdevice_extension-0.0.0-py3.8.egg!"
[2021-11-16 17:13:21,782] [Main] [INFO] [*************** xDevice Test Framework Starting ***************]
run acts
当执行该命令后,会进行acts,然后就会出现上面所说的required device does not exist 错误了。请问如何修复?
user_config.xml中配置:
<environment>
<support_device>
<device>true</device>
</support_device>
<device type="usb-hdc">
<ip>127.0.0.1</ip>
<port>8710</port>
<sn>xxx</sn>
</device>
</environment>
sn通过hdc_std list targets命令获取, hdc_std是连接设备的调试工具,可以在https://gitee.com/openharmony/developtools_hdc_standard仓获取,需要将这个工具加入环境变量。
另外,我们这块文档有一些欠缺,最近会补齐。
修改之后,还是一样的错误。 user_config.xml中配置如下:
<user_config>
<environment>
<support_device>
<device>true</device>
</support_device>
<device type="usb-hdc">
<ip>127.0.0.1</ip>
<port>8710</port>
<sn>d601004d4d43384742516c88046b18c9</sn>
</device>
</environment>
<testcases>
<dir></dir>
</testcases>
<resource>
<dir></dir>
</resource>
</user_config>
hdc_std.exe名字没有改吧?
登录 后才可以发表评论