diff options
author | Aditya Tayade <Aditya.Tayade@kpit.com> | 2019-03-25 15:27:11 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-03-26 14:02:09 +0000 |
commit | a9ec38c65e1f0cafd4431a3cb017d60d17abdfdd (patch) | |
tree | ee189ce8215c5f1142bdb2c9076dc88f7ed0262f /meta/recipes-core/glib-2.0 | |
parent | f26680fad518a49259fe9689e476edec832d770c (diff) | |
download | poky-a9ec38c65e1f0cafd4431a3cb017d60d17abdfdd.tar.gz |
run-ptest: use error handling for useradd and userdel
Error handling in shell scripts is too easy to forget and
get wrong. It is possible to check every external command
for return values but it is better to use a generic setting
which halts execution of the script on any failures.
Upstream-Status: Pending
(From OE-Core rev: 4868de2e67bd304e41ac2158ccfcb166cfe16242)
Signed-off-by: Aditya Tayade <Aditya.Tayade@kpit.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glib-2.0')
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/run-ptest | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest index 5b85e8fabe..8f082d34f6 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest +++ b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest | |||
@@ -1,5 +1,6 @@ | |||
1 | #! /bin/sh | 1 | #! /bin/sh |
2 | 2 | ||
3 | set -eux | ||
3 | useradd glib2-test | 4 | useradd glib2-test |
4 | su glib2-test -c gnome-desktop-testing-runner glib | 5 | su glib2-test -c gnome-desktop-testing-runner glib |
5 | userdel glib2-test | 6 | userdel glib2-test |