[libgsf] Tests: use 7z for archive testing when available.



commit c855e469db42fd72d757e5a5425eda21eb2f11bd
Author: Morten Welinder <terra gnome org>
Date:   Sat Jun 4 19:57:20 2016 -0400

    Tests: use 7z for archive testing when available.

 ChangeLog           |    9 +++++++++
 NEWS                |    6 +++++-
 tests/LibGsfTest.pm |    9 ++++++---
 3 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 89385e6..a8fb9a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2016-06-04  Morten Welinder  <terra gnome org>
+
+       * gsf/gsf-outfile-zip.c (zip_trailer64_write): Fix ZIP64 EOCD size
+       to exclude leading 12 bytes.  From Felix Bünemann
+       <buenemann louis info>
+
+       * tests/LibGsfTest.pm: Use 7z for archive testing when available.
+       It's stricter.
+
 2016-05-30  Morten Welinder <terra gnome org>
 
        * configure.ac: Post-release bump.
diff --git a/NEWS b/NEWS
index 5a37456..09a0e95 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,11 @@
 libgsf 1.14.38
 
 Felix B�nemann:
-       * BSD compatibility for test.
+       * BSD compatibility for test.  [#767044]
+       * Fix zip64 problem.  [#767043]
+
+Morten:
+       * Improve testing.
 
 --------------------------------------------------------------------------
 libgsf 1.14.37
diff --git a/tests/LibGsfTest.pm b/tests/LibGsfTest.pm
index dbd0244..b7ec875 100644
--- a/tests/LibGsfTest.pm
+++ b/tests/LibGsfTest.pm
@@ -15,13 +15,14 @@ $| = 1;
 @LibGsfTest::EXPORT_OK = qw(junkfile $unzip $zipinfo);
 
 use vars qw($topsrc $top_builddir $PERL $verbose);
-use vars qw($gsf $unzip $zipinfo);
+use vars qw($gsf $unzip $zipinfo $sevenz);
 
 $PERL = $Config{'perlpath'};
 $PERL .= $Config{'_exe'} if $^O ne 'VMS' && $PERL !~ m/$Config{'_exe'}$/i;
 
 $unzip = &find_program ("unzip");
 $zipinfo = &find_program ("zipinfo");
+$sevenz = &find_program ("7z", 1);
 
 $topsrc = $0;
 $topsrc =~ s|/[^/]+$|/..|;
@@ -112,7 +113,7 @@ sub dump_indented {
 }
 
 sub find_program {
-    my ($p) = @_;
+    my ($p,$qoptional) = @_;
 
     if ($p =~ m{/}) {
        return $p if -x $p;
@@ -125,6 +126,8 @@ sub find_program {
        }
     }
 
+    return undef if $qoptional;
+
     &report_skip ("$p is missing");
 }
 
@@ -301,7 +304,7 @@ sub test_zip {
 
     $args{'create-arg'} = 'createzip';
     $args{'ext'} = 'zip';
-    $args{'archive-tester'} = [$unzip, '-q', '-t'];
+    $args{'archive-tester'} = $sevenz ? [$sevenz, 't'] : [$unzip, '-q', '-t'];
     $args{'independent-cat'} = [$unzip, '-p'];
     $args{'infofunc'} = \&zipinfo_callback;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]