Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sébastien Peillet
otb
Commits
14935049
Commit
14935049
authored
7 years ago
by
Guillaume Pasero
Browse files
Options
Downloads
Patches
Plain Diff
PKG: use a retry loop to close otbgui
parent
665b5a6b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Packaging/Files/selftester.sh
+24
-17
24 additions, 17 deletions
Packaging/Files/selftester.sh
with
24 additions
and
17 deletions
Packaging/Files/selftester.sh
+
24
−
17
View file @
14935049
...
...
@@ -122,25 +122,32 @@ for app in $OTB_APPS; do
echo
""
>
tmp.log
"bin/otbgui_
$app
"
>
tmp.log 2>&1 &
GUI_PID
=
$!
sleep
5s
# Check process tree
CHILD_PROC
=
$(
ps_children
$GUI_PID
|
grep
"bin/otbgui
$app
"
)
if
[
-n
"
$CHILD_PROC
"
]
;
then
CHILD_PID
=
$(
echo
"
$CHILD_PROC
"
|
cut
-d
' '
-f
1
)
NEXT_CHILD_PROC
=
$(
ps_children
"
$CHILD_PID
"
|
grep
'otbApplicationLauncherQt'
)
if
[
-n
"
$NEXT_CHILD_PROC
"
]
;
then
NEXT_CHILD_PID
=
$(
echo
"
$NEXT_CHILD_PROC
"
|
cut
-d
' '
-f
1
)
kill
-9
"
$NEXT_CHILD_PID
"
wait
"
$NEXT_CHILD_PID
"
2>/dev/null
else
echo
"ERROR: otbApplicationLauncherQt
$app
failed to launch"
tee
-a
selftest_report.log < tmp.log
exit_if
CHILD_PID
=
""
NEXT_CHILD_PID
=
""
nb_try
=
0
while
[
-z
"
$NEXT_CHILD_PID
"
-a
$nb_try
-lt
10
]
;
do
sleep
1s
CHILD_PROC
=
$(
ps_children
$GUI_PID
|
grep
"bin/otbgui
$app
"
)
if
[
-n
"
$CHILD_PROC
"
]
;
then
CHILD_PID
=
$(
echo
"
$CHILD_PROC
"
|
cut
-d
' '
-f
1
)
NEXT_CHILD_PROC
=
$(
ps_children
"
$CHILD_PID
"
|
grep
'otbApplicationLauncherQt'
)
if
[
-n
"
$NEXT_CHILD_PROC
"
]
;
then
NEXT_CHILD_PID
=
$(
echo
"
$NEXT_CHILD_PROC
"
|
cut
-d
' '
-f
1
)
fi
fi
nb_try
=
$((
nb_try
+
1
))
done
if
[
-n
"
$NEXT_CHILD_PID
"
]
;
then
kill
-9
"
$NEXT_CHILD_PID
"
wait
"
$NEXT_CHILD_PID
"
2>/dev/null
elif
[
-n
"
$CHILD_PID
"
]
;
then
echo
"ERROR: otbApplicationLauncherQt
$app
failed to launch"
tee
-a
selftest_report.log < tmp.log
exit_if
else
echo
"ERROR: bin/otbgui_
$app
failed to launch"
tee
-a
selftest_report.log < tmp.log
exit_if
echo
"ERROR: bin/otbgui_
$app
failed to launch"
tee
-a
selftest_report.log < tmp.log
exit_if
fi
fi
app_index
=
$((
app_index
+
1
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment