]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: fix the return value of test-wrap-argv
authorJán Tomko <jtomko@redhat.com>
Tue, 26 Jul 2016 11:33:36 +0000 (13:33 +0200)
committerJán Tomko <jtomko@redhat.com>
Thu, 18 Aug 2016 11:37:08 +0000 (13:37 +0200)
The script was returning success unless it failed on the last file.
This went unnoticed because sc_prohibit_long_lines forbids lines
longer than 90 characters in .arg[sv] files.

tests/test-wrap-argv.pl

index 289815680d6c13399d817ec81b2a920cba99cb96..f0d3c0ba2d109651f8eefbae6ce3a6025f004e18 100755 (executable)
@@ -39,8 +39,8 @@ if (@ARGV[0] eq "--in-place") {
     shift @ARGV;
 }
 
+$ret = 0;
 foreach my $file (@ARGV) {
-    $ret = 0;
     if (&rewrap($file) < 0) {
         $ret = 1;
     }