test-sysroot.js: set "strict mode" when sourcing libtest.sh

As with the C tests in commit 08580118, this makes sure the test
fails as soon as something goes wrong.

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #335
Approved by: giuseppe
This commit is contained in:
Simon McVittie 2016-06-11 19:07:40 +01:00 committed by Atomic Bot
parent d258b124a2
commit 0cf0fa8154

View File

@ -37,7 +37,7 @@ function libtestExec(shellCode) {
let testdatadir = GLib.getenv("G_TEST_SRCDIR");
let libtestPath = GLib.build_filenamev([testdatadir, 'libtest.sh'])
let proc = GSystem.Subprocess.new_simple_argv(['bash', '-c',
'. ' + GLib.shell_quote(libtestPath) + '; ' + shellCode],
'set -xeuo pipefail; . ' + GLib.shell_quote(libtestPath) + '; ' + shellCode],
GSystem.SubprocessStreamDisposition.INHERIT,
GSystem.SubprocessStreamDisposition.INHERIT,
null);