Test 175: use BAIL_OUT instead of `die`

BAIL_OUT produces a friendlier message explaining why the tests cannot
continue on the command line. `die` produces a cryptic message that some
test failed for some reason.
This commit is contained in:
Tony Crisci 2014-03-18 23:07:01 -04:00 committed by Michael Stapelberg
parent c23db20cb5
commit 1263d2c0e8
1 changed files with 3 additions and 3 deletions

View File

@ -84,7 +84,7 @@ is_num_children($first_ws, 0, 'no containers on this workspace yet');
# echo its $DESKTOP_STARTUP_ID. We (blockingly) read the variable into
# $startup_id in the testcase.
my $tmp = tmpnam();
mkfifo($tmp, 0600) or die "Could not create FIFO in $tmp";
mkfifo($tmp, 0600) or BAIL_OUT "Could not create FIFO in $tmp";
cmd qq|exec echo \$DESKTOP_STARTUP_ID >$tmp|;
@ -182,7 +182,7 @@ is_num_children($third_ws, 2, 'two containers on the third workspace');
# environment variable.
######################################################################
mkfifo($tmp, 0600) or die "Could not create FIFO in $tmp";
mkfifo($tmp, 0600) or BAIL_OUT "Could not create FIFO in $tmp";
cmd qq|exec --no-startup-id echo \$DESKTOP_STARTUP_ID >$tmp|;
@ -198,7 +198,7 @@ is($startup_id, '', 'startup_id empty');
# 4) same thing, but with double quotes in exec
######################################################################
mkfifo($tmp, 0600) or die "Could not create FIFO in $tmp";
mkfifo($tmp, 0600) or BAIL_OUT "Could not create FIFO in $tmp";
cmd qq|exec --no-startup-id "echo \$DESKTOP_STARTUP_ID >$tmp"|;