Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re860_factory
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
waterword
re860_factory
Commits
4ad59484
Commit
4ad59484
authored
Sep 28, 2025
by
lyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:自动化测试增加OTG
parent
a8fe216e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
7 deletions
+21
-7
factoryTest_plugin/factory_autoFactoryTest.js
factoryTest_plugin/factory_autoFactoryTest.js
+14
-6
factoryTest_plugin/factory_autoFactoryTestUtil.js
factoryTest_plugin/factory_autoFactoryTestUtil.js
+7
-1
No files found.
factoryTest_plugin/factory_autoFactoryTest.js
View file @
4ad59484
...
...
@@ -79,7 +79,15 @@ function doScan(fd) {
send
(
fd
,
scanList
);
}
}
function
doOtg
(
fd
)
{
send
(
fd
,
'
+OTG_OK
'
);
}
function
doOtg
(
fd
)
{
if
(
autoUtil
.
checkUsbDeviceExist
()
==
true
)
{
console
.
log
(
"
doOtg 1
"
)
send
(
fd
,
'
+OK
'
);
}
else
{
console
.
log
(
"
doOtg 0
"
)
send
(
fd
,
'
+FAIL
'
);
}
}
var
cntLcd
=
0
;
function
doLcd
(
fd
)
{
cntLcd
+=
1
;
...
...
@@ -140,7 +148,7 @@ function doWriteLic(fd, recvBuf) {
if
(
ret
==
1
)
{
send
(
fd
,
'
+OK
'
);
}
else
if
(
ret
==
-
2
)
{
if
(
uartMode
==
1
)
{
restartUart
();
}
else
if
(
uartMode
==
2
)
{
...
...
@@ -242,7 +250,7 @@ function uartCarrieWave() {
console
.
log
(
"
!!!uart_init error
"
);
return
;
}
uart_set_mode
(
fd
,
"
raw
"
)
uart_set_mode
(
fd
,
"
raw
"
)
initEvent
(
fd
);
console
.
log
(
"
uart_init ok
"
);
idtimerAutoFactory
=
setInterval
(
function
()
{
...
...
@@ -419,13 +427,13 @@ function restartUartCarrieWave() {
console
.
log
(
"
reset usart error
"
);
return
-
1
;
}
uart_set_mode
(
fd
,
"
raw
"
)
uart_set_mode
(
fd
,
"
raw
"
)
console
.
log
(
"
reset usart success,fd=
"
+
fd
);
return
fd
;
}
function
uart_set_mode
(
fd
,
mode
){
switch
(
mode
)
{
function
uart_set_mode
(
fd
,
mode
)
{
switch
(
mode
)
{
case
"
canonical
"
:
uart
.
uart_set_canonical
(
fd
);
break
;
case
"
raw
"
:
uart
.
uart_set_raw
(
fd
);
break
;
default
:
uart
.
uart_set_canonical
(
fd
);
...
...
factoryTest_plugin/factory_autoFactoryTestUtil.js
View file @
4ad59484
...
...
@@ -42,6 +42,11 @@ function parseWifiScanResults(output) {
return
results
;
}
function
checkUsbDeviceExist
()
{
var
eUSB
=
require
(
"
eUSB.js
"
);
return
eUSB
.
isExist
(
"
/sys/devices/platform/soc@3000000/4200000.ehci1-controller/usb1/1-1
"
);
}
function
enableScan
()
{
console
.
log
(
"
!!!!!!!!!!!!Is @@@@@@@@@@@@@@@@@@@@@@@@@@#enableScan
"
)
...
...
@@ -452,5 +457,6 @@ module.exports = {
figureChecksum
:
figureChecksum
,
testLicParce
:
testLicParce
,
initUartPWM
:
initUartPWM
,
devExist
:
devExist
devExist
:
devExist
,
checkUsbDeviceExist
:
checkUsbDeviceExist
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment