Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
18834d06
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看板
未验证
提交
18834d06
编写于
7月 22, 2022
作者:
O
openharmony_ci
提交者:
Gitee
7月 22, 2022
浏览文件
操作
浏览文件
下载
差异文件
!4155 【xts_acts】【OpenHarmony-3.1-Release】参数target覆盖,注释修改
Merge pull request !4155 from 李晓枫/lxf0706_Release
上级
62b688ad
d892eee4
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
34 addition
and
31 deletion
+34
-31
usb/usb_standard/src/main/js/default/test/ListUsb.test.js
usb/usb_standard/src/main/js/default/test/ListUsb.test.js
+9
-8
usb/usb_standard/src/main/js/default/test/UsbDevicePipeJsunit.test.js
...dard/src/main/js/default/test/UsbDevicePipeJsunit.test.js
+17
-15
usb/usb_standard/src/main/js/default/test/UsbDevicePipeJsunit_A.test.js
...rd/src/main/js/default/test/UsbDevicePipeJsunit_A.test.js
+8
-8
未找到文件。
usb/usb_standard/src/main/js/default/test/ListUsb.test.js
浏览文件 @
18834d06
...
...
@@ -15,17 +15,18 @@
/* host test case */
//require('./UsbCoreJsunit.test.js')
//require('./UsbCoreJsunitEx.test.js')
//require('./UsbDevicePipeJsunit.test.js')
//require('./UsbDevicePipeJsunitEx.test.js')
// require('./UsbCoreJsunit.test.js')
// require('./UsbCoreJsunitEx.test.js')
// require('./UsbDevicePipeJsunit.test.js')
// require('./UsbDevicePipeJsunitEx.test.js')
// require('./UsbDevicePipeJsunit_A.test.js')
/* device test case */
//require('./UsbFunctionsJsunit.test.js')
//require('./UsbFunctionsJsunitEx.test.js')
//
require('./UsbFunctionsJsunit.test.js')
//
require('./UsbFunctionsJsunitEx.test.js')
/* device and host test case */
//require('./UsbPortJsunit.test.js')
//require('./UsbPortJsunitEx.test.js')
//
require('./UsbPortJsunit.test.js')
//
require('./UsbPortJsunitEx.test.js')
require
(
'
./UsbAutoJsunit.test.js
'
)
usb/usb_standard/src/main/js/default/test/UsbDevicePipeJsunit.test.js
浏览文件 @
18834d06
...
...
@@ -236,14 +236,16 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
expect
(
true
).
assertTrue
();
})
function
getTransferParam
(
iCmd
,
iReqType
,
iValue
,
iIndex
)
{
function
getTransferParam
(
iCmd
,
iReqT
arType
,
iReqT
ype
,
iValue
,
iIndex
)
{
var
tmpUint8Array
=
new
Uint8Array
(
512
);
var
requestCmd
=
iCmd
var
requestTargetType
=
iReqTarType
var
requestType
=
iReqType
var
value
=
iValue
;
var
index
=
iIndex
;
var
controlParam
=
{
request
:
requestCmd
,
target
:
requestTargetType
,
reqType
:
requestType
,
value
:
value
,
index
:
index
,
...
...
@@ -383,7 +385,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
}
var
timeout
=
5000
;
var
controlParam
=
getTransferParam
(
6
,
(
usb
.
USB_REQUEST_DIR_FROM_DEVICE
<<
7
)
var
controlParam
=
getTransferParam
(
6
,
usb
.
USB_REQUEST_TARGET_DEVICE
,
(
usb
.
USB_REQUEST_DIR_FROM_DEVICE
<<
7
)
|
(
usb
.
USB_REQUEST_TYPE_STANDARD
<<
5
)
|
(
usb
.
USB_REQUEST_TARGET_DEVICE
&
0x1f
),
(
2
<<
8
),
0
)
callControlTransfer
(
testParam
.
pip
,
controlParam
,
timeout
,
'
control_transfer_test_01 GetDescriptor
'
)
})
...
...
@@ -402,7 +404,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
}
var
timeout
=
5000
;
var
controlParam
=
getTransferParam
(
0
,
(
usb
.
USB_REQUEST_DIR_FROM_DEVICE
<<
7
)
var
controlParam
=
getTransferParam
(
0
,
usb
.
USB_REQUEST_TARGET_DEVICE
,
(
usb
.
USB_REQUEST_DIR_FROM_DEVICE
<<
7
)
|
(
usb
.
USB_REQUEST_TYPE_STANDARD
<<
5
)
|
(
usb
.
USB_REQUEST_TARGET_DEVICE
&
0x1f
),
0
,
0
)
callControlTransfer
(
testParam
.
pip
,
controlParam
,
timeout
,
'
control_transfer_test_02 GetStatus
'
)
})
...
...
@@ -421,7 +423,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
}
var
timeout
=
5000
;
var
controlParam
=
getTransferParam
(
8
,
(
usb
.
USB_REQUEST_DIR_FROM_DEVICE
<<
7
)
var
controlParam
=
getTransferParam
(
8
,
usb
.
USB_REQUEST_TARGET_DEVICE
,
(
usb
.
USB_REQUEST_DIR_FROM_DEVICE
<<
7
)
|
(
usb
.
USB_REQUEST_TYPE_STANDARD
<<
5
)
|
(
usb
.
USB_REQUEST_TARGET_DEVICE
&
0x1f
),
0
,
0
)
callControlTransfer
(
testParam
.
pip
,
controlParam
,
timeout
,
'
control_transfer_test_03 GetConfiguration
'
)
})
...
...
@@ -429,7 +431,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
/**
* @tc.number : SUB_USB_control_transfer_test_04
* @tc.name : controlTransfer
* @tc.desc : 控制传输 GetInterface: cmd
10
reqType 129 value 0 index 1
* @tc.desc : 控制传输 GetInterface: cmd
8
reqType 129 value 0 index 1
*/
it
(
'
SUB_USB_control_transfer_test_04
'
,
0
,
function
()
{
console
.
info
(
'
usb control_transfer_test_04 begin
'
);
...
...
@@ -440,7 +442,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
}
var
timeout
=
5000
;
var
controlParam
=
getTransferParam
(
10
,
(
usb
.
USB_REQUEST_DIR_FROM_DEVICE
<<
7
)
var
controlParam
=
getTransferParam
(
10
,
usb
.
USB_REQUEST_TARGET_INTERFACE
,
(
usb
.
USB_REQUEST_DIR_FROM_DEVICE
<<
7
)
|
(
usb
.
USB_REQUEST_TYPE_STANDARD
<<
5
)
|
(
usb
.
USB_REQUEST_TARGET_INTERFACE
&
0x1f
),
0
,
1
)
callControlTransfer
(
testParam
.
pip
,
controlParam
,
timeout
,
'
control_transfer_test_04 GetInterface
'
)
})
...
...
@@ -459,7 +461,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
}
var
timeout
=
5000
;
var
controlParam
=
getTransferParam
(
1
,
(
usb
.
USB_REQUEST_DIR_TO_DEVICE
<<
7
)
var
controlParam
=
getTransferParam
(
1
,
usb
.
USB_REQUEST_TARGET_DEVICE
,
(
usb
.
USB_REQUEST_DIR_TO_DEVICE
<<
7
)
|
(
usb
.
USB_REQUEST_TYPE_STANDARD
<<
5
)
|
(
usb
.
USB_REQUEST_TARGET_DEVICE
&
0x1f
),
0
,
0
)
callControlTransfer
(
testParam
.
pip
,
controlParam
,
timeout
,
'
control_transfer_test_05 ClearFeature
'
)
})
...
...
@@ -467,7 +469,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
/**
* @tc.number : SUB_USB_control_transfer_test_06
* @tc.name : controlTransfer
* @tc.desc : 控制传输 ClearFeature: cmd
1 reqType 0 value 0
index 0
* @tc.desc : 控制传输 ClearFeature: cmd
255 reqType 129 value 512
index 0
*/
it
(
'
SUB_USB_control_transfer_test_06
'
,
0
,
function
()
{
console
.
info
(
'
usb control_transfer_test_06 begin
'
);
...
...
@@ -478,7 +480,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
}
var
timeout
=
5000
;
var
controlParam
=
getTransferParam
(
255
,
(
usb
.
USB_REQUEST_DIR_FROM_DEVICE
<<
7
)
var
controlParam
=
getTransferParam
(
255
,
usb
.
USB_REQUEST_TARGET_INTERFACE
,
(
usb
.
USB_REQUEST_DIR_FROM_DEVICE
<<
7
)
|
(
usb
.
USB_REQUEST_TYPE_STANDARD
<<
5
)
|
(
usb
.
USB_REQUEST_TARGET_INTERFACE
&
0x1f
),
(
2
<<
8
),
0
)
callControlTransfer
(
testParam
.
pip
,
controlParam
,
timeout
,
'
control_transfer_test_06 ClearFeature
'
)
})
...
...
@@ -486,7 +488,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
/**
* @tc.number : SUB_USB_control_transfer_test_07
* @tc.name : controlTransfer
* @tc.desc : 控制传输 ClearFeature: cmd
1 reqType 0 value 0
index 0
* @tc.desc : 控制传输 ClearFeature: cmd
255 reqType 3 value 512
index 0
*/
it
(
'
SUB_USB_control_transfer_test_07
'
,
0
,
function
()
{
console
.
info
(
'
usb control_transfer_test_07 begin
'
);
...
...
@@ -497,7 +499,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
}
var
timeout
=
5000
;
var
controlParam
=
getTransferParam
(
255
,
(
usb
.
USB_REQUEST_DIR_TO_DEVICE
<<
7
)
var
controlParam
=
getTransferParam
(
255
,
usb
.
USB_REQUEST_TARGET_ENDPOINT
,
(
usb
.
USB_REQUEST_DIR_TO_DEVICE
<<
7
)
|
(
usb
.
USB_REQUEST_TYPE_CLASS
<<
5
)
|
(
usb
.
USB_REQUEST_TARGET_ENDPOINT
&
0x1f
),
(
2
<<
8
),
0
)
callControlTransfer
(
testParam
.
pip
,
controlParam
,
timeout
,
'
control_transfer_test_07 ClearFeature
'
)
})
...
...
@@ -505,7 +507,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
/**
* @tc.number : SUB_USB_control_transfer_test_08
* @tc.name : controlTransfer
* @tc.desc : 控制传输 ClearFeature: cmd
1 reqType 0 value 0
index 0
* @tc.desc : 控制传输 ClearFeature: cmd
255 reqType 5 value 512
index 0
*/
it
(
'
SUB_USB_control_transfer_test_08
'
,
0
,
function
()
{
console
.
info
(
'
usb control_transfer_test_08 begin
'
);
...
...
@@ -516,7 +518,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
}
var
timeout
=
5000
;
var
controlParam
=
getTransferParam
(
255
,
(
usb
.
USB_REQUEST_DIR_TO_DEVICE
<<
7
)
var
controlParam
=
getTransferParam
(
255
,
usb
.
USB_REQUEST_TARGET_OTHER
,
(
usb
.
USB_REQUEST_DIR_TO_DEVICE
<<
7
)
|
(
usb
.
USB_REQUEST_TYPE_VENDOR
<<
5
)
|
(
usb
.
USB_REQUEST_TARGET_OTHER
&
0x1f
),
(
2
<<
8
),
0
)
callControlTransfer
(
testParam
.
pip
,
controlParam
,
timeout
,
'
control_transfer_test_08 ClearFeature
'
)
})
...
...
@@ -524,7 +526,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
/**
* @tc.number : SUB_USB_control_transfer_test_09
* @tc.name : controlTransfer
* @tc.desc : 控制传输 ClearFeature: cmd
1 reqType 0
value 0 index 0
* @tc.desc : 控制传输 ClearFeature: cmd
255 reqType 4
value 0 index 0
*/
it
(
'
SUB_USB_control_transfer_test_09
'
,
0
,
function
()
{
console
.
info
(
'
usb control_transfer_test_09 begin
'
);
...
...
@@ -535,7 +537,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
}
var
timeout
=
5000
;
var
controlParam
=
getTransferParam
(
255
,
(
usb
.
USB_REQUEST_DIR_TO_DEVICE
<<
7
)
var
controlParam
=
getTransferParam
(
255
,
usb
.
USB_REQUEST_TARGET_OTHER
,
(
usb
.
USB_REQUEST_DIR_TO_DEVICE
<<
7
)
|
(
usb
.
USB_REQUEST_TYPE_CLASS
<<
5
)
|
(
usb
.
USB_REQUEST_TARGET_OTHER
&
0x1f
),
0
,
0
)
callControlTransfer
(
testParam
.
pip
,
controlParam
,
timeout
,
'
control_transfer_test_09 ClearFeature
'
)
})
...
...
usb/usb_standard/src/main/js/default/test/UsbDevicePipeJsunit_A.test.js
浏览文件 @
18834d06
...
...
@@ -20,12 +20,12 @@ import parameter from '@ohos.systemparameter';
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
/* usb device pipe test */
describe
(
'
UsbDevicePipeJsFunctionsTest
'
,
function
()
{
describe
(
'
UsbDevicePipeJsFunctionsTest
A
'
,
function
()
{
var
gDeviceList
var
gPipe
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
...
...
@@ -59,7 +59,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
afterAll
(
function
()
{
var
isPipClose
=
usb
.
closePipe
(
gPipe
)
console
.
info
(
'
usb unit close gPipe ret :
'
+
isPipClose
);
console
.
log
(
'
*************Usb Unit UsbDevicePipeJsFunctionsTest End*************
'
);
console
.
log
(
'
*************Usb Unit UsbDevicePipeJsFunctionsTest
A
End*************
'
);
})
function
findInitPoint
(
testParam
,
j
)
{
...
...
@@ -445,7 +445,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
/**
* @tc.number : SUB_USB_control_transfer_test_04
* @tc.name : controlTransfer
* @tc.desc : 控制传输 GetInterface: cmd
10
reqType 129 value 0 index 1
* @tc.desc : 控制传输 GetInterface: cmd
8
reqType 129 value 0 index 1
*/
it
(
'
SUB_USB_control_transfer_test_04
'
,
0
,
function
()
{
console
.
info
(
'
usb control_transfer_test_04 begin
'
);
...
...
@@ -483,7 +483,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
/**
* @tc.number : SUB_USB_control_transfer_test_06
* @tc.name : controlTransfer
* @tc.desc : 控制传输 ClearFeature: cmd
1 reqType 0 value 0
index 0
* @tc.desc : 控制传输 ClearFeature: cmd
255 reqType 129 value 512
index 0
*/
it
(
'
SUB_USB_control_transfer_test_06
'
,
0
,
function
()
{
console
.
info
(
'
usb control_transfer_test_06 begin
'
);
...
...
@@ -502,7 +502,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
/**
* @tc.number : SUB_USB_control_transfer_test_07
* @tc.name : controlTransfer
* @tc.desc : 控制传输 ClearFeature: cmd
1 reqType 0 value 0
index 0
* @tc.desc : 控制传输 ClearFeature: cmd
255 reqType 3 value 512
index 0
*/
it
(
'
SUB_USB_control_transfer_test_07
'
,
0
,
function
()
{
console
.
info
(
'
usb control_transfer_test_07 begin
'
);
...
...
@@ -521,7 +521,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
/**
* @tc.number : SUB_USB_control_transfer_test_08
* @tc.name : controlTransfer
* @tc.desc : 控制传输 ClearFeature: cmd
1 reqType 0 value 0
index 0
* @tc.desc : 控制传输 ClearFeature: cmd
255 reqType 5 value 512
index 0
*/
it
(
'
SUB_USB_control_transfer_test_08
'
,
0
,
function
()
{
console
.
info
(
'
usb control_transfer_test_08 begin
'
);
...
...
@@ -540,7 +540,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
/**
* @tc.number : SUB_USB_control_transfer_test_09
* @tc.name : controlTransfer
* @tc.desc : 控制传输 ClearFeature: cmd
1 reqType 0
value 0 index 0
* @tc.desc : 控制传输 ClearFeature: cmd
255 reqType 4
value 0 index 0
*/
it
(
'
SUB_USB_control_transfer_test_09
'
,
0
,
function
()
{
console
.
info
(
'
usb control_transfer_test_09 begin
'
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录