[gjs/gnome-3-34] Fix failed redirect of output in CommandLine tests
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/gnome-3-34] Fix failed redirect of output in CommandLine tests
- Date: Sat, 28 Mar 2020 05:49:34 +0000 (UTC)
commit b6a4f66959794e993322bc2158d19c05d162677b
Author: Liban Parker <liban parker gmail com>
Date: Mon Mar 23 20:41:44 2020 +0000
Fix failed redirect of output in CommandLine tests
The bashism &> is used to redirect both stderr and stdout to /dev/null.
/bin/sh executes the line up to & as a background job that prints to
stdout. This causes meson errors like
'TAP parsing error: unexpected input at line 34'
installed-tests/scripts/testCommandLine.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/installed-tests/scripts/testCommandLine.sh b/installed-tests/scripts/testCommandLine.sh
index b77d66f4..98a19854 100755
--- a/installed-tests/scripts/testCommandLine.sh
+++ b/installed-tests/scripts/testCommandLine.sh
@@ -183,7 +183,7 @@ done
# --profile
rm -f gjs-*.syscap foo.syscap
-$gjs -c 'imports.system.exit(0)' && ! stat gjs-*.syscap &> /dev/null
+$gjs -c 'imports.system.exit(0)' && ! stat gjs-*.syscap > /dev/null 2>&1
report "no profiling data should be dumped without --profile"
# Skip some tests if built without profiler support
@@ -194,13 +194,13 @@ if $gjs --profile -c 1 2>&1 | grep -q 'Gjs-Message.*Profiler is disabled'; then
skip "GJS_ENABLE_PROFILER=1 should enable the profiler" "$reason"
else
rm -f gjs-*.syscap
- $gjs --profile -c 'imports.system.exit(0)' && stat gjs-*.syscap &> /dev/null
+ $gjs --profile -c 'imports.system.exit(0)' && stat gjs-*.syscap > /dev/null 2>&1
report "--profile should dump profiling data to the default file name"
rm -f gjs-*.syscap
$gjs --profile=foo.syscap -c 'imports.system.exit(0)' && test -f foo.syscap
report "--profile with argument should dump profiling data to the named file"
rm -f foo.syscap && rm -f gjs-*.syscap
- GJS_ENABLE_PROFILER=1 $gjs -c 'imports.system.exit(0)' && stat gjs-*.syscap &> /dev/null
+ GJS_ENABLE_PROFILER=1 $gjs -c 'imports.system.exit(0)' && stat gjs-*.syscap > /dev/null 2>&1
report "GJS_ENABLE_PROFILER=1 should enable the profiler"
rm -f gjs-*.syscap
fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]