tests: Port sysroot.js away from libgsystem
My case-sensitive `git grep` didn't find this one originally, but the Travis+Debian setup was configured to run it. Closes: #451 Approved by: jlebon
This commit is contained in:
parent
519292114f
commit
56a922280f
|
|
@ -19,8 +19,6 @@
|
||||||
|
|
||||||
const GLib = imports.gi.GLib;
|
const GLib = imports.gi.GLib;
|
||||||
const Gio = imports.gi.Gio;
|
const Gio = imports.gi.Gio;
|
||||||
|
|
||||||
const GSystem = imports.gi.GSystem;
|
|
||||||
const OSTree = imports.gi.OSTree;
|
const OSTree = imports.gi.OSTree;
|
||||||
|
|
||||||
function assertEquals(a, b) {
|
function assertEquals(a, b) {
|
||||||
|
|
@ -36,12 +34,8 @@ function assertNotEquals(a, b) {
|
||||||
function libtestExec(shellCode) {
|
function libtestExec(shellCode) {
|
||||||
let testdatadir = GLib.getenv("G_TEST_SRCDIR");
|
let testdatadir = GLib.getenv("G_TEST_SRCDIR");
|
||||||
let libtestPath = GLib.build_filenamev([testdatadir, 'libtest.sh'])
|
let libtestPath = GLib.build_filenamev([testdatadir, 'libtest.sh'])
|
||||||
let proc = GSystem.Subprocess.new_simple_argv(['bash', '-c',
|
let proc = Gio.Subprocess.new(['bash', '-c', 'set -xeuo pipefail; . ' + GLib.shell_quote(libtestPath) + '; ' + shellCode], 0);
|
||||||
'set -xeuo pipefail; . ' + GLib.shell_quote(libtestPath) + '; ' + shellCode],
|
proc.wait_check(null);
|
||||||
GSystem.SubprocessStreamDisposition.INHERIT,
|
|
||||||
GSystem.SubprocessStreamDisposition.INHERIT,
|
|
||||||
null);
|
|
||||||
proc.wait_sync_check(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
libtestExec('setup_os_repository archive-z2 syslinux');
|
libtestExec('setup_os_repository archive-z2 syslinux');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue