[gjs: 1/2] Fix failed redirect of output in CommandLine tests
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 1/2] Fix failed redirect of output in CommandLine tests
- Date: Tue, 24 Mar 2020 04:25:09 +0000 (UTC)
commit 106cbe9f99580e03e9f85e17f9c568d5eb87cd0e
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 1c9ab29f..6f07dd50 100755
--- a/installed-tests/scripts/testCommandLine.sh
+++ b/installed-tests/scripts/testCommandLine.sh
@@ -185,7 +185,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
@@ -196,13 +196,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]