[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Quilt-dev] [PATCH 1/2] test: Be verbose on directory error
From: |
Jean Delvare |
Subject: |
[Quilt-dev] [PATCH 1/2] test: Be verbose on directory error |
Date: |
Sat, 27 Jan 2018 15:54:33 +0100 |
Being a little more verbose when mkdir or chdir fails, can't hurt.
Signed-off-by: Jean Delvare <address@hidden>
---
test/run | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- quilt.orig/test/run 2018-01-25 22:12:45.169098410 +0100
+++ quilt/test/run 2018-01-25 22:14:13.551150649 +0100
@@ -254,8 +254,8 @@ sub process_test($$$$) {
}
# Create a dedicated working directory
-mkdir $workdir or die;
-chdir $workdir or die;
+mkdir $workdir or die "Failed to create directory $workdir: $!";
+chdir $workdir or die "Failed to change to directory $workdir: $!";
$ENV{PWD} = getcwd;
if (defined $ARGV[0]) {
@@ -302,7 +302,7 @@ process_test($prog, $prog_line, $in, $ou
close(SOURCE);
# Clean up the mess
-chdir $origdir or die;
+chdir $origdir or die "Failed to change back to directory $origdir: $!";
system "rm -rf $workdir" unless $keep_workdir and $failed;
my $status = sprintf("%d commands (%d passed, %d failed)",
--
Jean Delvare
SUSE L3 Support
- [Quilt-dev] [PATCH 1/2] test: Be verbose on directory error,
Jean Delvare <=