plist 파일을 JUnit 스타일 XML로 변환하려고합니다. plist를 JUnit/ANT XML로 변환하는 xsl 스타일 시트가 있습니다. 여기 파일 perl을 열 수 없습니다.
내가 XML로 PLIST를 변환 실행 펄 코드 :모를 수가 : 허드슨/젠킨스에 펄 스크립트를 실행 한 후
my $parser = XML::LibXML->new(); my $xslt = XML::LibXSLT->new(); my $stylesheet = $xslt->parse_stylesheet_file("\\\~/Hudson/build/workspace/ui-automation/automation\\\ test\\\ suite/plist2junit.xsl"); my $counter = 1; my @plistFiles = glob('Logs/*/*.plist'); foreach (@plistFiles){ #Escape the file path and specify abosulte path my $plistFile = $_; $plistFile =~ s/([()])/\\$1/g; $path2plist = "\\\~/Hudson/build/workspace/ui-automation/automation\\\ test\\\ suite/$plistFile"; #transform the plist file to xml my $source = $parser->parse_file($path2plist); my $results = $stylesheet->transform($source); my $resultsFile = "\\\~/Hudson/build/workspace/ui-automation/automation\\\ test\\\ suite/JUnit/results$counter.xml"; #create the output file unless(open FILE, '>'.$resultsFile) { # Die with error message die "\nUnable to create $file\n"; } # Write results to the file. $stylesheet->output_file($results, FILE); close FILE; $counter++; }
,이 오류 메시지를 출력 t 개방 ~/허드슨/빌드/작업 공간// 자동화 UI 자동화 \ 테스트 \ 스위트/로그/실행 \ 1/자동화 \ Results.plist : 그런 파일이나 디렉토리
코드에서 my $source = $parser->parse_file($path2plist);
오류가 발생했습니다. 파일을 찾거나 읽을 수없는 이유를 알 수 없습니다.
누구든지 무슨 이유로 오류가 발생했는지 알고 계십니까?
정말요? '~/Hudson/build/workspace/ui-automation/automation \ test \ suite/Logs/Run \ 1/Automation \ Results.plist와 같은 파일 이름으로 :'왜 파일을 찾을 수 없는지 알 수 없습니다 ? – friedo
@friedo 무엇? 그것은 파일 경로 걸릴 수 없다 ??? – stackErr
@friedo 귀하의 의견에 어떤 의미가 있는지 잘 모르겠습니다. 설명해 주시겠습니까? – stackErr