[gnumeric] t6910: improve handling of tmp directory
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] t6910: improve handling of tmp directory
- Date: Sun, 3 Nov 2019 19:13:36 +0000 (UTC)
commit a5339df6dfa55f4e014fe04d7ae1640224980ee0
Author: Morten Welinder <terra gnome org>
Date: Sun Nov 3 14:13:13 2019 -0500
t6910: improve handling of tmp directory
test/t6910-graph-image-svg.pl | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/test/t6910-graph-image-svg.pl b/test/t6910-graph-image-svg.pl
index 3cfb2df55..b0f878528 100755
--- a/test/t6910-graph-image-svg.pl
+++ b/test/t6910-graph-image-svg.pl
@@ -20,6 +20,11 @@ if (-e $tmpdir || ($tmpdir =~ m{/}) || ($tmpdir eq '')) {
}
END { rmdir $tmpdir; }
+if (!mkdir $tmpdir) {
+ print STDERR "$0: failed to create $tmpdir\n";
+ die "Fail\n";
+}
+
my $nskipped = 0;
my $ngood = 0;
my $nbad = 0;
@@ -32,11 +37,6 @@ foreach my $src (@sources) {
print STDERR "Checking $src\n";
- if (!mkdir $tmpdir) {
- print STDERR "$0: failed to create $tmpdir\n";
- die "Fail\n";
- }
-
system ("$ssconvert --export-graphs $src $tmpdir/image-%n.svg");
my @images = sort <$tmpdir/image-[0-9]*.svg>;
if (@images == 0) {
@@ -59,10 +59,6 @@ foreach my $src (@sources) {
if ($good) {
print STDERR "Checked ", scalar @images, " generated image files.\n";
$ngood++;
- if (!rmdir $tmpdir) {
- print STDERR "$0: failed to remove $tmpdir\n";
- die "Fail\n";
- }
} else {
$nbad++;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]