open UNIT_TESTER, qq(tcsh -c "gpath $dir/$tsttgt; bin/rununittests"|);
while(<UNIT_TESTER>){
reportError($ignore{testabort},$tsttgt,"test problem detected for $tsttgt:$_ ") if /core dumped/;
reportError($ignore{testabort},$tsttgt,"test problem detected for $tsttgt:$_ ") if /\[ FAILED \]/;
writelog($tsttgt,$_);
}
close UNIT_TESTER;
我曾尝试使用此语法将 stderr 重定向到 stdout,但它不起作用:
open UNIT_TESTER, qq(tcsh -c "gpath $dir/$tsttgt; bin/rununittests >& "|);
我还阅读了关于 perl FAQ 的讨论,但那是与 bash 相关的:http ://www.perl.com/doc/FAQs/FAQ/oldfaq-html/Q5.15.html