]> AND Public Git Repository - simgrid.git/blobdiff - buildtools/Cmake/Scripts/tesh.pl
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
In tesh.pl, with "output display", print contents of array, and not a reference to it.
[simgrid.git] / buildtools / Cmake / Scripts / tesh.pl
index 0b819b184198a621037c825910db138e05280203..5635c4c487eed5024107d5d88ed3d90bfecc0f5e 100755 (executable)
@@ -373,10 +373,14 @@ sub parse_out {
   # Check the result of execution 
   ###
   my $diff;
-  if (!defined($cmd{'output ignore'})){
+  if (defined($cmd{'output display'})){
+    print "[Tesh/INFO] Here is the (ignored) command output:\n";
+    map { print "||$_\n" } @got;
+  }
+  elsif (!defined($cmd{'output ignore'})){
     $diff = build_diff(\@{$cmd{'out'}}, \@got);
   }else{
-  print "(ignoring the output of <$cmd{'file'}:$cmd{'line'}> as requested)\n"
+    print "(ignoring the output of <$cmd{'file'}:$cmd{'line'}> as requested)\n"
   }
   if (length $diff) {
     print "Output of <$cmd{'file'}:$cmd{'line'}> mismatch:\n";
@@ -522,6 +526,13 @@ LINE: while (not $finished and not $error) {
     }
     $cmd{'output ignore'} = 1;
   }
+  elsif($line =~ /^!\s*output display/){    #output display
+    if (defined($cmd{'cmd'})) {
+      exec_cmd(\%cmd);
+      %cmd = ();
+    }
+    $cmd{'output display'} = 1;
+  }
   elsif($line =~ /^!\s*expect signal (\w*)/) {#expect signal SIGABRT
     if (defined($cmd{'cmd'})) {
       exec_cmd(\%cmd);