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
88b34e27
Commit
88b34e27
authored
Oct 11, 2025
by
lyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:自动化测试增加获取Mac
parent
d487a615
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
2 deletions
+32
-2
factoryTest_plugin/factory_autoFactoryTest.js
factoryTest_plugin/factory_autoFactoryTest.js
+5
-1
factoryTest_plugin/factory_autoFactoryTestUtil.js
factoryTest_plugin/factory_autoFactoryTestUtil.js
+27
-1
No files found.
factoryTest_plugin/factory_autoFactoryTest.js
View file @
88b34e27
...
...
@@ -124,7 +124,11 @@ function doTempHum(fd) {
console
.
log
(
"
tempHum:
"
+
tempHum
);
send
(
fd
,
tempHum
);
}
function
doGetMac
(
fd
)
{
send
(
fd
,
'
+ab:cd:ef:12:34:56
'
);
}
function
doGetMac
(
fd
)
{
var
mac
=
"
+
"
+
autoUtil
.
getWifiInfo
(
"
address
"
);
console
.
log
(
"
!!get mac:
"
+
mac
);
send
(
fd
,
mac
);
}
function
doGetSn
(
fd
)
{
var
sn
=
"
+
"
+
autoUtil
.
getSn
();
console
.
log
(
'
get sn:
'
+
sn
);
...
...
factoryTest_plugin/factory_autoFactoryTestUtil.js
View file @
88b34e27
...
...
@@ -471,6 +471,31 @@ function initautoFactorySetting() {
var
soundLevelText
=
"
tinymix set 16 7
"
system
(
soundLevelText
);
}
function
getWifiInfo
(
options
)
{
// wpa_state=SCANNING
// p2p_device_address=c2:f5:35:81:41:8e
// address=c0:f5:35:81:41:8e
// uuid=e1a83a1d-97b6-52eb-93f8-d323a8c9badf
var
switchOption
=
options
+
"
=
"
system
(
"
wpa_cli -p /tmp/wpa_supplicant/sockets -i wlan0 status > /tmp/wifi_status.txt
"
);
const
statusContent
=
fs
.
read
(
"
/tmp/wifi_status.txt
"
,
"
r
"
);
if
(
statusContent
)
{
const
statusLines
=
statusContent
.
split
(
'
\n
'
);
for
(
let
i
=
0
;
i
<
statusLines
.
length
;
i
++
)
{
const
line
=
statusLines
[
i
].
trim
();
if
(
line
.
startsWith
(
switchOption
))
{
const
state
=
line
.
split
(
'
=
'
)[
1
];
// if (state == "COMPLETED") {
// isConnected = true;
// break;
// }
return
state
;
}
}
}
return
"
FAil
"
;
}
function
system
(
cmd
)
{
systemCtrl
.
executeSystemCommand
(
cmd
)
...
...
@@ -504,5 +529,6 @@ module.exports = {
getRtcTimer
:
getRtcTimer
,
setSsid
:
setSsid
,
getssid
:
getssid
,
initautoFactorySetting
:
initautoFactorySetting
initautoFactorySetting
:
initautoFactorySetting
,
getWifiInfo
:
getWifiInfo
}
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