Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
300a3bce
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
300a3bce
编写于
8月 06, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 06, 2022
浏览文件
操作
浏览文件
下载
差异文件
!4851 【xts_acts】【master】XTS测试套件部件化配置,修改UsbDevicePipeJsunit_A.test.js文件
Merge pull request !4851 from 李晓枫/usb0805_master
上级
b755841c
174ccdeb
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
99 addition
and
14 deletion
+99
-14
usb/usb_standard/BUILD.gn
usb/usb_standard/BUILD.gn
+3
-1
usb/usb_standard/src/main/js/test/List.test.js
usb/usb_standard/src/main/js/test/List.test.js
+2
-0
usb/usb_standard/src/main/js/test/UsbDevicePipeJsunit_A.test.js
...b_standard/src/main/js/test/UsbDevicePipeJsunit_A.test.js
+84
-3
usb/usb_standard/src/main/js/test/UsbPortAndFunctionJsunit.test.js
...tandard/src/main/js/test/UsbPortAndFunctionJsunit.test.js
+10
-10
未找到文件。
usb/usb_standard/BUILD.gn
浏览文件 @
300a3bce
...
...
@@ -9,7 +9,7 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
...
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("usb_js_test") {
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsUsbJSApiTest"
subsystem_name = "usb"
part_name = "usb_manager"
}
ohos_js_assets("usb_js_assets") {
js2abc = true
...
...
usb/usb_standard/src/main/js/test/List.test.js
浏览文件 @
300a3bce
...
...
@@ -19,6 +19,7 @@ import UsbPortJsFunctionsTestEx from './UsbPortJsunitEx.test.js'
import
UsbFunctionsJsFunctionsTestEx
from
'
./UsbFunctionsJsunitEx.test.js
'
import
UsbFunctionsJsFunctionsTest
from
'
./UsbFunctionsJsunit.test.js
'
import
UsbDevicePipeJsFunctionsTest
from
'
./UsbDevicePipeJsunit.test.js
'
import
UsbDevicePipeJsFunctionsTestA
from
'
./UsbDevicePipeJsunit_A.test.js
'
import
UsbDevicePipeJsFunctionsTestEx
from
'
./UsbDevicePipeJsunitEx.test.js
'
import
UsbCoreJsFunctionsTest
from
'
./UsbCoreJsunit.test.js
'
import
UsbCoreJsFunctionsTestEx
from
'
./UsbCoreJsunitEx.test.js
'
...
...
@@ -28,6 +29,7 @@ UsbAutoJsunit()
UsbCoreJsFunctionsTest
()
UsbCoreJsFunctionsTestEx
()
UsbDevicePipeJsFunctionsTest
()
UsbDevicePipeJsFunctionsTestA
()
UsbDevicePipeJsFunctionsTestEx
()
UsbFunctionsJsFunctionsTest
()
UsbFunctionsJsFunctionsTestEx
()
...
...
usb/usb_standard/src/main/js/test/UsbDevicePipeJsunit_A.test.js
浏览文件 @
300a3bce
...
...
@@ -20,14 +20,14 @@ import parameter from '@ohos.systemparameter';
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
@ohos/hypium
'
/* usb device pipe test */
export
default
function
UsbDevicePipeJsFunctionsTest
()
{
describe
(
'
UsbDevicePipeJsFunctionsTest
'
,
function
()
{
export
default
function
UsbDevicePipeJsFunctionsTest
A
()
{
describe
(
'
UsbDevicePipeJsFunctionsTest
A
'
,
function
()
{
var
gDeviceList
var
gPipe
var
portCurrentMode
beforeAll
(
function
()
{
console
.
log
(
'
*************Usb Unit UsbDevicePipeJsFunctionsTest Begin*************
'
);
console
.
log
(
'
*************Usb Unit UsbDevicePipeJsFunctionsTest
A
Begin*************
'
);
var
Version
=
usb
.
getVersion
()
console
.
info
(
'
usb unit begin test getversion :
'
+
Version
)
// version > 17 host currentMode = 2 device currentMode = 1
...
...
@@ -151,6 +151,12 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
*/
it
(
'
SUB_USB_JS_0630
'
,
0
,
function
()
{
console
.
info
(
'
usb SUB_USB_JS_0630 begin
'
);
console
.
info
(
'
usb SUB_USB_JS_0630 portcurrentMode ret :
'
+
portCurrentMode
)
if
(
portCurrentMode
==
1
)
{
console
.
info
(
'
usb case get_device port is device
'
)
expect
(
false
).
assertFalse
();
return
}
var
testParam
=
getTransferTestParam
()
if
(
testParam
.
interface
==
null
||
testParam
.
inEndpoint
==
null
)
{
expect
(
false
).
assertTrue
();
...
...
@@ -180,6 +186,11 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
*/
it
(
'
SUB_USB_JS_0640
'
,
0
,
function
()
{
console
.
info
(
'
usb SUB_USB_JS_0640 begin
'
);
if
(
portCurrentMode
==
1
)
{
console
.
info
(
'
usb case get_device port is device
'
)
expect
(
false
).
assertFalse
();
return
}
var
testParam
=
getTransferTestParam
()
if
(
testParam
.
interface
==
null
||
testParam
.
outEndpoint
==
null
)
{
expect
(
false
).
assertTrue
();
...
...
@@ -217,6 +228,11 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
*/
it
(
'
SUB_USB_JS_0420
'
,
0
,
function
()
{
console
.
info
(
'
usb SUB_USB_JS_0420 begin
'
);
if
(
portCurrentMode
==
1
)
{
console
.
info
(
'
usb case get_device port is device
'
)
expect
(
false
).
assertFalse
();
return
}
if
(
gDeviceList
.
length
==
0
)
{
console
.
info
(
'
usb 01 case get_device_list is null
'
)
expect
(
gDeviceList
.
length
).
assertEqual
(
-
1
);
...
...
@@ -278,6 +294,11 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
*/
it
(
'
SUB_USB_JS_0740
'
,
0
,
function
()
{
console
.
info
(
'
usb SUB_USB_JS_0740 begin
'
);
if
(
portCurrentMode
==
1
)
{
console
.
info
(
'
usb case get_device port is device
'
)
expect
(
false
).
assertFalse
();
return
}
if
(
gDeviceList
.
length
==
0
)
{
console
.
info
(
'
usb case get_device_list is null
'
)
expect
(
false
).
assertTrue
();
...
...
@@ -308,6 +329,11 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
*/
it
(
'
SUB_USB_JS_0750
'
,
0
,
function
()
{
console
.
info
(
'
usb SUB_USB_JS_0750 begin
'
);
if
(
portCurrentMode
==
1
)
{
console
.
info
(
'
usb case get_device port is device
'
)
expect
(
false
).
assertFalse
();
return
}
if
(
gDeviceList
.
length
==
0
)
{
console
.
info
(
'
usb case get_device_list is null
'
)
expect
(
false
).
assertTrue
();
...
...
@@ -332,6 +358,11 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
*/
it
(
'
SUB_USB_JS_0800
'
,
0
,
function
()
{
console
.
info
(
'
usb SUB_USB_JS_0800 begin
'
);
if
(
portCurrentMode
==
1
)
{
console
.
info
(
'
usb case get_device port is device
'
)
expect
(
false
).
assertFalse
();
return
}
if
(
gDeviceList
.
length
==
0
)
{
console
.
info
(
'
usb case get_device_list is null
'
)
expect
(
false
).
assertTrue
();
...
...
@@ -359,6 +390,11 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
*/
it
(
'
SUB_USB_JS_0810
'
,
0
,
function
()
{
console
.
info
(
'
usb SUB_USB_JS_0810 begin
'
);
if
(
portCurrentMode
==
1
)
{
console
.
info
(
'
usb case get_device port is device
'
)
expect
(
false
).
assertFalse
();
return
}
if
(
gDeviceList
.
length
==
0
)
{
console
.
info
(
'
usb case get_device_list is null
'
)
expect
(
false
).
assertTrue
()
...
...
@@ -401,6 +437,11 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
*/
it
(
'
SUB_USB_JS_0540
'
,
0
,
function
()
{
console
.
info
(
'
usb SUB_USB_JS_0540 begin
'
);
if
(
portCurrentMode
==
1
)
{
console
.
info
(
'
usb case get_device port is device
'
)
expect
(
false
).
assertFalse
();
return
}
var
testParam
=
getTransferTestParam
()
if
(
testParam
.
inEndpoint
==
null
||
testParam
.
interface
==
null
||
testParam
.
outEndpoint
==
null
)
{
expect
(
false
).
assertTrue
();
...
...
@@ -420,6 +461,11 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
*/
it
(
'
SUB_USB_JS_0550
'
,
0
,
function
()
{
console
.
info
(
'
usb SUB_USB_JS_0550 begin
'
);
if
(
portCurrentMode
==
1
)
{
console
.
info
(
'
usb case get_device port is device
'
)
expect
(
false
).
assertFalse
();
return
}
var
testParam
=
getTransferTestParam
()
if
(
testParam
.
inEndpoint
==
null
||
testParam
.
interface
==
null
||
testParam
.
outEndpoint
==
null
)
{
expect
(
false
).
assertTrue
();
...
...
@@ -439,6 +485,11 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
*/
it
(
'
SUB_USB_JS_0560
'
,
0
,
function
()
{
console
.
info
(
'
usb SUB_USB_JS_0560 begin
'
);
if
(
portCurrentMode
==
1
)
{
console
.
info
(
'
usb case get_device port is device
'
)
expect
(
false
).
assertFalse
();
return
}
var
testParam
=
getTransferTestParam
()
if
(
testParam
.
inEndpoint
==
null
||
testParam
.
interface
==
null
||
testParam
.
outEndpoint
==
null
)
{
expect
(
false
).
assertTrue
();
...
...
@@ -458,6 +509,11 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
*/
it
(
'
SUB_USB_JS_0570
'
,
0
,
function
()
{
console
.
info
(
'
usb SUB_USB_JS_0570 begin
'
);
if
(
portCurrentMode
==
1
)
{
console
.
info
(
'
usb case get_device port is device
'
)
expect
(
false
).
assertFalse
();
return
}
var
testParam
=
getTransferTestParam
()
if
(
testParam
.
inEndpoint
==
null
||
testParam
.
interface
==
null
||
testParam
.
outEndpoint
==
null
)
{
expect
(
false
).
assertTrue
();
...
...
@@ -477,6 +533,11 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
*/
it
(
'
SUB_USB_JS_0580
'
,
0
,
function
()
{
console
.
info
(
'
usb SUB_USB_JS_0580 begin
'
);
if
(
portCurrentMode
==
1
)
{
console
.
info
(
'
usb case get_device port is device
'
)
expect
(
false
).
assertFalse
();
return
}
var
testParam
=
getTransferTestParam
()
if
(
testParam
.
inEndpoint
==
null
||
testParam
.
interface
==
null
||
testParam
.
outEndpoint
==
null
)
{
expect
(
false
).
assertTrue
();
...
...
@@ -496,6 +557,11 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
*/
it
(
'
SUB_USB_JS_0590
'
,
0
,
function
()
{
console
.
info
(
'
usb SUB_USB_JS_0590 begin
'
);
if
(
portCurrentMode
==
1
)
{
console
.
info
(
'
usb case get_device port is device
'
)
expect
(
false
).
assertFalse
();
return
}
var
testParam
=
getTransferTestParam
()
if
(
testParam
.
inEndpoint
==
null
||
testParam
.
interface
==
null
||
testParam
.
outEndpoint
==
null
)
{
expect
(
false
).
assertTrue
();
...
...
@@ -515,6 +581,11 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
*/
it
(
'
SUB_USB_JS_0600
'
,
0
,
function
()
{
console
.
info
(
'
usb SUB_USB_JS_0600 begin
'
);
if
(
portCurrentMode
==
1
)
{
console
.
info
(
'
usb case get_device port is device
'
)
expect
(
false
).
assertFalse
();
return
}
var
testParam
=
getTransferTestParam
()
if
(
testParam
.
inEndpoint
==
null
||
testParam
.
interface
==
null
||
testParam
.
outEndpoint
==
null
)
{
expect
(
false
).
assertTrue
();
...
...
@@ -534,6 +605,11 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
*/
it
(
'
SUB_USB_JS_0610
'
,
0
,
function
()
{
console
.
info
(
'
usb SUB_USB_JS_0610 begin
'
);
if
(
portCurrentMode
==
1
)
{
console
.
info
(
'
usb case get_device port is device
'
)
expect
(
false
).
assertFalse
();
return
}
var
testParam
=
getTransferTestParam
()
if
(
testParam
.
inEndpoint
==
null
||
testParam
.
interface
==
null
||
testParam
.
outEndpoint
==
null
)
{
expect
(
false
).
assertTrue
();
...
...
@@ -553,6 +629,11 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
*/
it
(
'
SUB_USB_JS_0620
'
,
0
,
function
()
{
console
.
info
(
'
usb SUB_USB_JS_0620 begin
'
);
if
(
portCurrentMode
==
1
)
{
console
.
info
(
'
usb case get_device port is device
'
)
expect
(
false
).
assertFalse
();
return
}
var
testParam
=
getTransferTestParam
()
if
(
testParam
.
inEndpoint
==
null
||
testParam
.
interface
==
null
||
testParam
.
outEndpoint
==
null
)
{
expect
(
false
).
assertTrue
();
...
...
usb/usb_standard/src/main/js/test/UsbPortAndFunctionJsunit.test.js
浏览文件 @
300a3bce
...
...
@@ -77,11 +77,11 @@ describe('UsbPortAndFunctionsJsFunctionsTest', function () {
callSetCurFunction
(
'
SUB_USB_JS_0350 ACM 1
'
,
usb
.
ACM
)
})
/
/ /
**
//
* @tc.number : SUB_USB_JS_0360
//
* @tc.name : functions_test
//
* @tc.desc : 在设备模式下设置当前的USB功能列表 Set 2 设置为ECM功能
//
*/
/**
* @tc.number : SUB_USB_JS_0360
* @tc.name : functions_test
* @tc.desc : 在设备模式下设置当前的USB功能列表 Set 2 设置为ECM功能
*/
it
(
'
SUB_USB_JS_0360
'
,
0
,
function
()
{
CheckEmptyUtils
.
sleep
(
3000
)
console
.
info
(
'
usb SUB_USB_JS_0360 set ECM begin
'
);
...
...
@@ -92,11 +92,11 @@ describe('UsbPortAndFunctionsJsFunctionsTest', function () {
callSetCurFunction
(
'
SUB_USB_JS_0360 ECM 2
'
,
usb
.
ECM
)
})
/
/ /
**
//
* @tc.number : SUB_USB_JS_0370
//
* @tc.name : functions_test
//
* @tc.desc : 在设备模式下设置当前的USB功能列表 Set 3 设置为ACM、ECM功能
//
*/
/**
* @tc.number : SUB_USB_JS_0370
* @tc.name : functions_test
* @tc.desc : 在设备模式下设置当前的USB功能列表 Set 3 设置为ACM、ECM功能
*/
it
(
'
SUB_USB_JS_0370
'
,
0
,
function
()
{
CheckEmptyUtils
.
sleep
(
3000
)
console
.
info
(
'
usb SUB_USB_JS_0370 set ACM ECM begin
'
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录