]> code.ossystems Code Review - openembedded-core.git/commitdiff
run-ptest: use error handling for useradd and userdel
authorAditya Tayade <Aditya.Tayade@kpit.com>
Mon, 25 Mar 2019 15:27:11 +0000 (15:27 +0000)
committerArmin Kuster <akuster808@gmail.com>
Sat, 13 Apr 2019 19:39:12 +0000 (12:39 -0700)
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
Signed-off-by: Aditya Tayade <Aditya.Tayade@kpit.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/recipes-core/glib-2.0/glib-2.0/run-ptest

index 5b85e8fabe5ed4040dd2443d6a3f6dded43a0831..8f082d34f6087b62c9f29a5382d4c8d7ec6d1614 100644 (file)
@@ -1,5 +1,6 @@
 #! /bin/sh
 
+set -eux
 useradd glib2-test
 su glib2-test -c gnome-desktop-testing-runner glib
 userdel glib2-test