[gnumeric] Tests: always run xmllint with --nonet



commit 7025e13d767a8b9156f97a23a5ded36acf1a17ec
Author: Morten Welinder <terra gnome org>
Date:   Wed Apr 25 19:59:19 2018 -0400

    Tests: always run xmllint with --nonet
    
    We don't want to download the same schemas over and over again.
    If anything is missing, the "extras" part of t6152 should be copied
    into the test that needs it.

 test/t6150-ods-syntax.pl      |    8 +++++---
 test/t6151-gnumeric-syntax.pl |    2 +-
 test/t8010-valgrind-ods.pl    |    1 -
 test/t8011-valgrind-xlsx.pl   |    1 -
 test/t9003-ssdiff-xml.pl      |    2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/test/t6150-ods-syntax.pl b/test/t6150-ods-syntax.pl
index 347e302..515e3e0 100755
--- a/test/t6150-ods-syntax.pl
+++ b/test/t6150-ods-syntax.pl
@@ -52,9 +52,11 @@ if (!-r $schema_manifest) {
 print STDERR "NOTE: Suggest rerunning with argument \"download\" to obtain missing schemas\n"
     if $suggest_download;
 
-my $checker = "$xmllint --noout" . ($schema ? " --relaxng $schema" : "");
-my $checker_ext = "$xmllint --noout" . ($schema_ext ? " --relaxng $schema_ext" : "");
-my $manifest_checker = "$xmllint --noout" . ($schema_manifest ? " --relaxng $schema_manifest" : "");
+my $common_checker = "$xmllint --noout --nonet";
+
+my $checker = $common_checker . ($schema ? " --relaxng $schema" : "");
+my $checker_ext = $common_checker . ($schema_ext ? " --relaxng $schema_ext" : "");
+my $manifest_checker = $common_checker . ($schema_manifest ? " --relaxng $schema_manifest" : "");
 my %checkers = ( 0 => $checker,
                 1 => $checker_ext,
                 2 => $manifest_checker);
diff --git a/test/t6151-gnumeric-syntax.pl b/test/t6151-gnumeric-syntax.pl
index 3bd2390..b7f8d39 100755
--- a/test/t6151-gnumeric-syntax.pl
+++ b/test/t6151-gnumeric-syntax.pl
@@ -36,7 +36,7 @@ foreach my $src (@sources) {
        die "Fail\n";
     }
 
-    my $out = `$xmllint --noout --schema $schema $tmp 2>&1`;
+    my $out = `$xmllint --nonet --noout --schema $schema $tmp 2>&1`;
     if ($out !~ /validates$/) {
        print STDERR "While checking $tmp:\n";
        &GnumericTest::dump_indented ($out);
diff --git a/test/t8010-valgrind-ods.pl b/test/t8010-valgrind-ods.pl
index a1b8089..1557b1a 100755
--- a/test/t8010-valgrind-ods.pl
+++ b/test/t8010-valgrind-ods.pl
@@ -9,7 +9,6 @@ $GnumericTest::default_corpus = 'random:5';
 
 &message ("Check the ods importer/exporter with valgrind.");
 
-my $xmllint = &GnumericTest::find_program ("xmllint");
 my $unzip = &GnumericTest::find_program ("unzip");
 
 my $format = "Gnumeric_OpenCalc:odf";
diff --git a/test/t8011-valgrind-xlsx.pl b/test/t8011-valgrind-xlsx.pl
index 0f9d77a..6b7a3df 100755
--- a/test/t8011-valgrind-xlsx.pl
+++ b/test/t8011-valgrind-xlsx.pl
@@ -9,7 +9,6 @@ $GnumericTest::default_corpus = 'random:5';
 
 &message ("Check the xlsx importer/exporter with valgrind.");
 
-my $xmllint = &GnumericTest::find_program ("xmllint");
 my $unzip = &GnumericTest::find_program ("unzip");
 
 my $format = "Gnumeric_Excel:xlsx";
diff --git a/test/t9003-ssdiff-xml.pl b/test/t9003-ssdiff-xml.pl
index c7f6f57..da797ea 100755
--- a/test/t9003-ssdiff-xml.pl
+++ b/test/t9003-ssdiff-xml.pl
@@ -27,7 +27,7 @@ for my $p (@pairs) {
 
     print STDERR "$first vs $second...\n";
 
-    my $cmd = "$ssdiff --xml $first $second | xmllint -noout - 2>&1";
+    my $cmd = "$ssdiff --xml $first $second | $xmllint --nonet --noout - 2>&1";
     print STDERR "$cmd\n" if $GnumericTest::verbose;
     my $output = `$cmd 2>&1`;
     my $err = $?; # from xmllint


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