forked from RobotLocomotion/drake
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix Bug 1950 . the improved text filtering killed the safety logic. w…
…ow. we’ve been running blind since Dec 6.
- Loading branch information
1 parent
d487e10
commit 4633126
Showing
1 changed file
with
10 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,23 +8,22 @@ | |
# This appears to be a necessary evil to get clean matlab output to ctest: | ||
# http://www.mail-archive.com/[email protected]/msg02175.html | ||
|
||
#use lib "./Text-Unidecode-0.04/lib"; | ||
#use Text::Unidecode; | ||
|
||
my $cmd = 'matlab'; | ||
foreach my $a(@ARGV) { | ||
$cmd .= " \"$a\""; | ||
} | ||
$cmd .= ' 2>&1 '; | ||
|
||
# use a pipe so as not to buffer output. in case matlab takes a vacation midstream | ||
open(my $command_stream, "-|", $cmd); | ||
while(<$command_stream>){ | ||
# le junque. on separate lines for readability | ||
$_ =~ s/.*exclude an item from Time Machine.*\n//g; | ||
$_ =~ s/[^\x{0009}\x{000a}\x{000d}\x{0020}-\x{D7FF}\x{E000}-\x{FFFD}]+//g; | ||
$_ =~ s/\x1b\[\?1h//g; | ||
$_ =~ s/\x1b=//g; | ||
$_ =~ s/\x1b\[\?1l\x1b>//g; | ||
print; | ||
} | ||
my $matlab_output = `$cmd`; | ||
my $retval = $? >> 8; | ||
|
||
$matlab_output =~ s/.*exclude an item from Time Machine.*\n//g; | ||
#$matlab_output = unidecode($matlab_output); # didn't seem to help | ||
$matlab_output =~ s/[^\x{0009}\x{000a}\x{000d}\x{0020}-\x{D7FF}\x{E000}-\x{FFFD}]+//g; | ||
|
||
print($matlab_output); | ||
exit($retval); | ||
|