Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Tesh sort removes empty lines, do it also with tesh.pl.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 28 Oct 2013 10:24:38 +0000 (11:24 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 28 Oct 2013 11:13:06 +0000 (12:13 +0100)
buildtools/Cmake/Scripts/tesh.pl

index 164ff0c..e103a8f 100755 (executable)
@@ -310,9 +310,16 @@ sub parse_out {
     }
     use sort 'stable';
     @got = sort mysort @got;
+    while (@got and $got[0] eq "") {
+      shift @got;
+    }
+
     #also resort the other one, as perl sort is not the same as the C one used to generate teshes
     if(defined($cmd{'out'})){
       @{$cmd{'out'}}=sort mysort @{$cmd{'out'}};
+      while (@{$cmd{'out'}} and ${$cmd{'out'}}[0] eq "") {
+        shift @{$cmd{'out'}};
+      }
     }
   }