Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
arch-boxes
Commits
d007e76b
Commit
d007e76b
authored
Sep 02, 2020
by
Kristian Klausen
🎉
Browse files
Change default timeout to 30 sec and use 240 for build.sh "step"
parent
8bff2545
Changes
1
Hide whitespace changes
Inline
Side-by-side
build-in-qemu.sh
View file @
d007e76b
...
...
@@ -74,11 +74,12 @@ function start_qemu() {
function expect() {
local length="
${#
1
}
"
local i=0
local timeout="
${
2
:-
30
}
"
# We can't use ex: grep as we could end blocking forever, if the string isn't followed by a newline
while true; do
# read should never exit with a non-zero exit code,
# but it can happen if the fd is EOF or it times out
IFS= read -r -u 10 -n 1 -t
240
c
IFS= read -r -u 10 -n 1 -t
"
${
timeout
}
"
c
if [ "
${
1
:
${
i
}
:1
}
" = "
${
c
}
" ]; then
i="
$((
i
+
1
))
"
if [ "
${
length
}
" -eq "
${
i
}
" ]; then
...
...
@@ -131,7 +132,7 @@ function main() {
## Start build and copy output to local disk
send
"bash -x ./build.sh
\n
"
expect
"# "
expect
"# "
240 # qemu-img convert can take a long time
send
"cp -r --preserve=mode,timestamps output /mnt/arch-boxes/tmp/
$(
basename
"
${
TMPDIR
}
"
)
/
\n
"
expect
"# "
mv output/*
"
${
OUTPUT
}
/"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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