Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
abdullh.alsoleman
Front-End
Commits
4a33ce7d
Unverified
Commit
4a33ce7d
authored
Aug 28, 2020
by
Casey Hillers
Committed by
GitHub
Aug 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fuchsia] Refactor fuchsia_ctl use to a function (#64736)
parent
e8252817
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
12 deletions
+18
-12
run_fuchsia_tests.sh
dev/bots/run_fuchsia_tests.sh
+18
-12
No files found.
dev/bots/run_fuchsia_tests.sh
View file @
4a33ce7d
...
...
@@ -41,24 +41,31 @@ else
echo
"Connecting to device
$device_name
"
fi
# Wrapper function to pass common args to fuchsia_ctl.
fuchsia_ctl
()
{
$script_dir
/fuchsia_ctl
-d
$device_name
\
--device-finder-path
$script_dir
/device-finder
"
$@
"
}
reboot
()
{
$script_dir
/fuchsia_ctl
-d
$device_name
ssh
\
-c
"log_listener --dump_logs yes --file /tmp/log.txt"
\
echo
"
$(
date
)
START:DEVICE_LOGS ------------------------------------------"
fuchsia_ctl ssh
\
--timeout-seconds
$ssh_timeout_seconds
\
--identity-file
$pkey
--identity-file
$pkey
\
-c
"log_listener --dump_logs yes --file /tmp/log.txt"
# As we are not using recipes we don't have a way to know the location
# to upload the log to isolated. We are saving the log to a file to avoid dart
# hanging when running the process and then just using printing the content to
# the console.
$script_dir
/fuchsia_ctl
-d
$device_name
ssh
\
-c
"cat /tmp/log.txt"
\
fuchsia_ctl ssh
\
--timeout-seconds
$ssh_timeout_seconds
\
--identity-file
$pkey
--identity-file
$pkey
\
-c
"cat /tmp/log.txt"
echo
"
$(
date
)
END:DEVICE_LOGS ------------------------------------------"
echo
"
$(
date
)
START:REBOOT ------------------------------------------"
# note: this will set an exit code of 255, which we can ignore.
$script_dir
/fuchsia_ctl
-d
$device_name
\
--device-finder-path
$script_dir
/device-finder
\
ssh
--identity-file
$pkey
\
fuchsia_ctl ssh
\
--identity-file
$pkey
\
-c
"dm reboot-recovery"
||
true
echo
"
$(
date
)
END:REBOOT --------------------------------------------"
}
...
...
@@ -67,13 +74,12 @@ trap reboot EXIT
echo
"
$(
date
)
START:PAVING ------------------------------------------"
ssh-keygen
-y
-f
$pkey
>
key.pub
$script_dir
/fuchsia_ctl
-d
$device_name
pave
-i
$1
--public-key
"key.pub"
fuchsia_ctl pave
-i
$1
--public-key
"key.pub"
echo
"
$(
date
)
END:PAVING --------------------------------------------"
echo
"
$(
date
)
START:PUSH_PACKAGES -------------------------------"
$script_dir
/fuchsia_ctl push-packages
\
-d
$device_name
\
fuchsia_ctl push-packages
\
--identity-file
$pkey
\
--repoArchive
generic-x64.tar.gz
\
-p
tiles
-p
tiles_ctl
...
...
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